vim配置文件
2011-12-23 11:00
134 查看
贴一下我的.vimrc,部分带注释
此博文中有较详尽的vimrc配置解释:http://blog.chinaunix.net/space.php?uid=20366132&do=blog&id=1698970
另附上vim的官网:http://www.vim.org/ 上面有最全的插件和学习资料
set syntax=on set tabstop=4 set nobackup set cindent "有时中文会显示乱码,用一下几条命令解决 let &termencoding=&encoding set fileencodings=utf-8,gbk "默认缩进4个空格大小 set shiftwidth=4 "去掉边框 set go= "设置配色,这里选择的是desert,也有其他方案,在vim中输入:color 在敲tab键可以查看 color desert "设置背景色,每种配色有两种方案,一个light、一个dark set background=light "show command in status line set showcmd "set the helpdoc language "if version>=603 by LGP2011年12月22日 星期四 15时47分16秒 " set helplang = cn "endif "set the line number set nu "cancel the line number map ,n :set nu!<CR> "taglist的插件映射键 "nnoremap <silent> <F8> :TlistToggle<CR> "注释掉一行的快捷键函数 function MyContent() let tmphehe=getline(".") call setline(line("."),"/*") call append(line(".")," *".tmphehe." by LGP".strftime("%c")) call append(line(".")+1,"*/") endf map <F3> <Esc>:call MyContent()<CR><Esc> "自定义头文件函数.......... function Mytitle() call setline(1,"/***************************************") call append(line("."),"作者:LGP") call append(line(".")+1,"时间:".strftime("%c")) call append(line(".")+2,"文件名:".expand("%")) call append(line(".")+3,"描述:") call append(line(".")+4,"***************************************/") endf map <home> <Esc>:call Mytitle()<CR><Esc>:{1}lt;Esc>o "映射为<home>键 "头文件和源文件相互切换函数....... "映射至<F6>键 imap <F6> <Esc>:call CppToFunc()<CR> func! CppToFunc() "保存文件 :w "头文件和cc文件转换 :A endfunc "press control+s to save imap <C-s> <ESC>:w<CR>i<Right> "for encode "set fileencodings=utf-8,gb2312,gbk,gb18030 "set termencoding = utf-8 "set encoding = prc
此博文中有较详尽的vimrc配置解释:http://blog.chinaunix.net/space.php?uid=20366132&do=blog&id=1698970
另附上vim的官网:http://www.vim.org/ 上面有最全的插件和学习资料
相关文章推荐
- vim配置文件解析
- Square 技术团队的开源其 Vim 配置文件
- vim设置(非常全面),即.vimrc文件的配置
- 【CentOS 7】 Vim配置文件 c/c++ 风格
- 再发一个vim配置文件(ubuntu)
- vim 配置文件
- 【转】VIM学习笔记&nbsp;配置文件(…
- 强大的vim配置文件,让编程更随意
- vim配置文件说明
- (小升级版)vim修改时自动备份配置文件小脚本
- vim配置文件和插件管理
- vim编辑器配置文件
- 强大的vim配置文件,让编程更随意
- 我的vim配置文件 以及 插件
- 强大的vim配置文件,让编程更随意
- 我的VIM配置文件vimrc
- 我的vim配置文件.vimrc以及用到的几个插件(持续更新)
- gVim7.3(Vim7.3)文本编辑器详细配置文件和配色方案
- 【配置】gvim和vim的配置文件的位置
- linux配置:直接用VIM默认打开文件