Windows下用Cygwin,VIM搭建Mainframe开发环境(九)---更强的文件浏览和自动完成
树形文件浏览:NerdTree
Vim自带的Netrw虽然功能够多,但是问题也不少,用起来还是不够方便,于是有人又写了个NerdTree,
树
形文件浏览,支持多个tab(前台或后台在新tab中打开文件),书签,多窗口分割等实用方便的功能
我的设置:
let
NERDTreeIgnore=['/.bat$', '/.sys$', '/.db$', '/.ini$', '/.DOS$',
'/.COM$', '/.BAK$']
let NERDTreeShowLineNumbers=1
let
NERDTreeAutoCenter=1
let NERDTreeChDirMode=2
http://linux.chinaunix.net/techdoc/desktop/2009/05/01/1109687.shtml
自
动完成:NeoComplCache
AutoCompPop用起来很方便,有些小问题就是完成准确度不够高,
NeoComplCache
是一个采用缓存自动完成的插件,准确度高了不少,而且提示模式也很丰富:
1.使用缓存,自动补全时效率高
2.生成的关键词列表准确
3.
支持下划线分割的关键词,如apple_boy_cat,就可以只输入a_b_c,然后补全
4.支持驼峰格式匹配关键词,如
AppleBoyCat,就可以只输入ABC,然后补全
5.既可以像AutoComplPop那样在Vim中输入的同时自动弹出补全列表,又可以
自定义快捷键手动触发
6.支持从文件名和目录名中匹配补全条件
7.对于程序源文件,支持从语言API中匹配补全条件
http://sinolog.it/?p=1399
我
的设置:
let g:NeoComplCache_EnableAtStartup = 1
let
g:NeoComplCache_SmartCase = 1
" Use camel case completion.
let
g:NeoComplCache_EnableCamelCaseCompletion = 1
" Use underbar
completion.
let g:NeoComplCache_EnableUnderbarCompletion = 1
let
g:NeoComplCache_MinSyntaxLength = 3
" Set minimum keyword length.
let
g:NeoComplCache_MinKeywordLength = 3
let
g:NeoComplCache_CachingPercentInStatusline = 1
let
g:NeoComplCache_DisableSelectModeMappings = 1
let
g:NeoComplCache_EnableSkipCompletion = 1
" Define dictionary.
let
g:NeoComplCache_DictionaryFileTypeLists = {
/ 'default' : '',
/ 'vimshell' : $HOME.'/.vimshell_hist',
/ }
" Define
keyword.
if !exists('g:NeoComplCache_KeywordPatterns')
let
g:NeoComplCache_KeywordPatterns = {}
endif
let
g:NeoComplCache_KeywordPatterns['default'] = '/h/w*'
let
g:NeoComplCache_SnippetsDir = $HOME.'/snippets'
" Plugin
key-mappings.
imap <silent><C-K>
<Plug>(neocomplcache_snippets_expand)
smap
<silent><C-K>
<Plug>(neocomplcache_snippets_expand)