本文介绍如何用强大的文本编辑器 Vim编程。只要配置得当,效果堪比一个IDE。
配置
基本配置:
"开启语法高亮
syntax on
"依文件类型设置自动缩进
filetype indent plugin on
"显示当前的行号列号:
set ruler
"在状态栏显示正在输入的命令
set showcmd
"关闭/打开配对括号高亮
"NoMatchParen
DoMatchParen
行号的显示与隐藏:
"显示行号:
set number
"为方便复制,用<F2>开启/关闭行号显示:
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
启用Model… Read More
How To Vimrc
There is just one rule you must follow when crafting your own .vimrc.
Don’t put any lines in your vimrc that you don’t understand.
There are tons of tutorials such as this one on the internet that contain all kinds of awesome hacks to make your Vim better, but the absolute worst way to make