下载后可任意编辑 现在的工作是在 unix 平台,平常是用 UE 的 ftp 功能来写代码的,有时候文件大了,传输就很慢,而且常常不是很稳定。下定决心要学学 Vim (现在应该没有人用原始的 vi 了吧),在经过二周的使用后,发现 Vim 实在是非常不错的一个 editor,现在我在 Windows 上也装了一个 Vim,使用起来颇为顺手,基本上已经替代了 UE。 下面介绍一些我在使用 Vim 的过程中得到的一些心得:1. 在使用 Vim 之前一定要进行一些设置,否则你使用起来肯定会很不爽,下面是我的配置 1 " ============================================== 2 " General settings 3 " ============================================== 4 5 set nocp 6 set ru 7 " 使用 cindent 8 set cin 9 set cino = :0g0t0(sus10 11 set sm12 set ai13 " 缩近14 set sw=415 set ts=416 " 不展开 tab 为空格,反之 set et17 set noet18 19 set lbr20 set hls21 set backspace = indent , eol , start22 set whichwrap = b , s , < , > , [ , ] 23 set fo+ = mB24 set selectmode = 25 set mousemodel = popup26 set keymodel = 27 set selection = inclusive28 set matchpairs+ = <:>29 30 " ==============================================31 " Cursor movement32 " ==============================================33 nnoremap gj34 nnoremap gk下载后可任意编辑35 vnoremap gj36 vnoremap gk37 inoremap gj38 inoremap gk39 40 nnoremap g$41 nnoremap g042 vnoremap g$43 vnoremap g044 inoremap g$45 inoremap g046 47 nmap :confirm bd48 vmap :confirm bd49 omap :confirm bd50 map! :confirm bd51 52 " 打开语法高亮53 syntax on54 " 使用语法进行折叠55 set foldmethod=syntax56 57 if (has( " gui_running " ))58 set nowrap59 set guioptions+=b60 colo inkpot61 else62 set wrap63 colo ron64 endif65 66 " 设置 swap 文件的目录67 set dir = D:\vim\tmp68 "...