如何使用 Vim 的配置文件 .vimrc
1. .vimrc
基本介绍
:so peter.txt:h vimrc:scriptnames
function! Browser() let line = getline(".") exec "!firefox ".lineendfunction
2. 快捷键映射( mappings )
map ,w :call Browser()<cr>imap jj <esc>
:h map.txt
3. 选项设置( settings )
set nuset tabstop=2set tabstop=4
:h option-list:set nonu:set nu?:set tabstop?:options
4. 自运行命令( autocmd )
autocmd FileType c set tabstop=4autocmd FileType html set tabstop=2autocmd BufWritePost ~/my_proj/* !ctags -f ~/my_proj/tags ~/my_proj/*
:h autocmd.txt
5. 更多信息
:h usr_05.txt