用Vim敲C代码

原文链接: https://yq.aliyun.com/articles/429619

加入语法高亮,自动缩进,快速编译几个功能,方便使用:

cat >> /root/.vimrc << "EOF"
  set syntax=on
  set cin
  set nu
  map :call CompileRunGcc()
  func! CompileRunGcc()
  exec "w"
  exec "!gcc % -o %<"
  exec "! ./%<"
  endfunc
EOF

本文转自运维笔记博客51CTO博客,原文链接http://blog.51cto.com/lihuipeng/749707如需转载请自行联系原作者


lihuipeng

你可能感兴趣的:(用Vim敲C代码)