大学里,有一年多是在Fedora core 4下度过的,现在依然怀念Linux下方便的开发方式,一些用惯了的工具在windows下还真找不到替代品。还好,有很多好心人做了很多移植工作,比如unixutils包里面包含了大量的*nix环境下的工具的win32版,都特别好用。
在平时的工作,学习中,个人比较习惯用vim做编辑器,装上vim71 for windows 后,在网上找了些配置和脚本,完了以后就贴出来,大家看看。下面是我的_vimrc(vim runtime configuration)文件的内容,附效果图一张。
" This is my _vimrc under windows platform " and it can be used on *nix too " all the difference of them is the font setting session " happy Viming, guys! " copyLeft (#) Abruzzi John set linebreak " line break set nocompatible " no compatible set history=400 " history set ruler set number " line number set hlsearch " highlight search set noincsearch " no in C search set expandtab " expand table set t_vb= "close bell set foldmethod=marker set tabstop=4 " table step set shiftwidth=4 set nobackup " don't backup set smarttab " smart table set smartindent " smart indent set autoindent " auto indent set cindent "cindent set cursorline " hightlight cursor line colorscheme pyte " color scheme let g:calendar_diary="c:/diary" " for calendar plugin only let Tlist_Use_Right_Window=0 " for tag_list plugin only let Tlist_File_Fold_Auto_Close=1 " for tag_list plugin only let g:winManagerWindowLayout="FileExplorer|TagList" " for winmanager filetype plugin indent on " filetype setting set completeopt=longest,menu " for code complete " the following function is used for show the status bar on the buttom function! CurrectDir() let curdir = substitute(getcwd(), "", "", "g") return curdir endfunction set statusline=\ [File]\ %F%m%r%h\ %w\ \ [PWD]\ %r%{CurrectDir()}%h\ \ %=[Line]\ %l,%c\ %=\ %P " this is a setting of font if has("win32") set guifont=Courier_New:h10:cANSI endif " make sure that syntax always on if exists("syntax_on") syntax reset else syntax on endif " that's all, folks!
下边是效果图:
Taglist 插件安装以后,跟ctags配合,可以支持标签,可以轻易的编辑比较大的源码工程。
效果图:
怎么样,还挺漂亮吧,相关的插件的安装我就不说了,网上有很多比较好的教程。
参考:
http://www.gracecode.com 这个是i.feelinglucky兄的博客首页,大家可以去看看,里边关于vim的文章都很好
http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx 这里有篇比较好的文章,主要讲如何把vim配置成一个好的IDE
vim 主页:
http://www.vim.org/
关于vim的使用技巧,我会随后贴上。