vim配置文件

vim配置文件

1 ” 不要使用vi的键盘模式,而是vim自己的 2 set nocompatible 3 ” 语法高亮 4 set syntax=on 5 “配色方案 6 colorscheme torte 7 ” 去掉输入错误的提示声音 8 set noeb 9 ” 在处理未保存或只读文件的时候,弹出确认 10 set confirm 11 ” 自动缩进 12 set autoindent 13 set cindent 14 ” 自动换行 15 set wrap 16 ” 整词换行 17 set linebreak 18 ” Tab键的宽度 19 set tabstop=4 20 ” 统一缩进为4 21 set softtabstop=4 22 set shiftwidth=4 23 ” 不要用空格代替制表符 24 set noexpandtab 25 ” 在行和段开始处使用制表符 26 set smarttab 27 ” 显示行号 28 set number 29 ” 历史记录数 30 set history=1000 31 “禁止生成临时文件 32 set nobackup 33 set noswapfile 34 “搜索忽略大小写 35 set ignorecase 36 “搜索逐字符高亮 37 set hlsearch 38 set incsearch 39 “行内替换 40 set gdefault 41 “编码设置 42 set enc=utf-8 43 set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936 44 “语言设置 45 set helplang=cn 46 set encoding=utf8 47 set langmenu=zh_CN.UTF-8 48 set imcmdline 49 source $VIMRUNTIME/delmenu.vim 50 source $VIMRUNTIME/menu.vim 51 ” 设置字体。 52 set guifont=Liberation\Mono\ 12 53 54 “set guifont=Fixedsys\Excelsior\3.01\ 14 55 56 ” 我的状态行显示的内容(包括文件类型和解码) 57 set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\”%d/%m/%y\ -\ %H:%M\”)} 58 “set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%] 59 ” 总是显示状态行 60 set laststatus=2 61 ” 在编辑过程中,在右下角显示光标位置的状态行 62 set ruler 63 ” 命令行(在状态行下)的高度,默认为1,这里是2 64 set cmdheight=2 65 ” 侦测文件类型 66 filetype on 67 ” 载入文件类型插件 68 filetype plugin on 69 ” 为特定文件类型载入相关缩进文件 70 filetype indent on 71 ” 保存全局变量 72 set viminfo+=! 73 ” 带有如下符号的单词不要被换行分割 74 set iskeyword+=_,$,@,%,#,- 75 ” 字符间插入的像素行数目 76 set linespace=0 77 ” 增强模式中的命令行自动完成操作 78 set wildmenu 79 ” 使回格键(backspace)正常处理indent, eol, start等 80 set backspace=2 81 ” 允许backspace和光标键跨越行边界,h,l 83 ” 可以在buffer的任何地方使用鼠标(类似office中在工作区双击鼠标定位) 84 set mouse=a 85 set selection=exclusive 86 set selectmode=mouse,key 87 ” 通过使用: commands命令,告诉我们文件的哪一行被改变过 88 set report=0 89 ” 启动的时候不显示那个援助索马里儿童的提示 90 set shortmess=atI 91 ” 在被分割的窗口间显示空白,香港服务器租用,便于阅读 92 set fillchars=vert:\ ,stl:\ ,stlnc:\ 93 ” 高亮显示匹配的括号 94 set showmatch 95 ” 匹配括号高亮的时间(单位是十分之一秒) 96 set matchtime=5 97 ” 光标移动到buffer的顶部和底部时保持3行距离 98 set scrolloff=3 99 ” 为C程序提供自动缩进100 set smartindent101 ” 只在下列文件类型被侦测到的时候显示行号,普通文本文件不显示102 if has(“autocmd”)103 autocmd FileType xml,html,c,cs,java,perl,shell,bash,cpp,python,vim,php,ruby set number’o’>o–>”>o*/108 109 autocmd FileType html,text,php,vim,c,java,xml,bash,shell,perl,python setlocal textwidth=100110 111 autocmd Filetype html,xml,xsl source $VIMRUNTIME/plugin/closetag.vim112 113 autocmd BufReadPost * (“$”) | 116 117 \ exe “normal g`\”” |118 119 \ endif120 121 endif ” has(“autocmd”)

posted on

Copyright ©2013 AhJesus Powered by: 博客园 模板提供:沪江博客

,免备案空间,服务器空间同时也用对她的怀念来惩罚自己。

vim配置文件

相关文章:

你感兴趣的文章:

标签云: