在vim中的HTML文件中按tab键将转到下一个空标记对,而不是扩展完成

在vim中的HTML文件中按tab键将转到下一个空标记对,而不是扩展完成,vim,snipmate,Vim,Snipmate,我不确定在HTML文件中标记到下一个空标记对的功能来自哪里。我想完全禁用它 问题只出现在同时使用SuperTab和SnipMate时,如果我删除SuperTab,tab将恢复正常扩展,如果我删除SnipMate,tab将恢复显示完成 在过去,我一直都工作得很好,我想再这样做一次 我正在使用: http://github.com/msanders/snipmate.vim http://github.com/scrooloose/snipmate-snippets http://github.co

我不确定在HTML文件中标记到下一个空标记对的功能来自哪里。我想完全禁用它

问题只出现在同时使用SuperTab和SnipMate时,如果我删除SuperTab,tab将恢复正常扩展,如果我删除SnipMate,tab将恢复显示完成

在过去,我一直都工作得很好,我想再这样做一次

我正在使用:

http://github.com/msanders/snipmate.vim
http://github.com/scrooloose/snipmate-snippets
http://github.com/ervandew/supertab

使用vim更新包。两者的默认配置。我启用的其他选项是启用语法。自动缩进。智能缩进。展开选项卡。无可挑剔。打开文件类型缩进插件。

SnipMate和SuperTab都使用⇥, 这使得他们的组合非常恼人和不可预测

在经历了多年的TextMate之后,⇥ 扩展是我不能/不想放弃的一个习惯,所以我很快抛弃了SuperTab,并学会了热爱Vim自带的Omni Completion:

inoremap <leader>, <C-x><C-o>
inoremap <leader>: <C-x><C-f>
inoremap <leader>= <C-x><C-l>
inoremap,
inoremap:
inoremap=

要获得更精简的体验,它出人意料地快速和智能。

适合我需要的解决方案是

它是autocomplpop、supertab和snipmate的完美结合。好吧,代码片段部分只是有点问题,但是非常有用

但是我不使用⇥ 要展开,在第三个书写字符后弹出omnicompletion。你跟着我走⇥ 通过列表,用CtrlK展开代码段(一个la textmate),但您可以将其映射到您的选择

这些是我的
.vimrc
设置

        """"""""""""""""""""""""""""""
        " => neocomplcache plugin
        """"""""""""""""""""""""""""""
        " TODO: Still need to tweak behavior with <TAB> to expand
        "       snippets, change throughout the autocompletion list

        " Use neocomplcache.
        let g:neocomplcache_enable_at_startup = 1
        " Use smartcase.
        let g:neocomplcache_enable_smart_case = 1
        " Use camel case completion.
        let g:neocomplcache_enable_camel_case_completion = 1
        " Use underbar completion.
        let g:neocomplcache_enable_underbar_completion = 1
        " Set minimum syntax keyword length.
        let g:neocomplcache_min_syntax_length = 3
        let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
        let g:neocomplcache_snippets_dir = '~/.vim/snippet/'
        " Define dictionary.
        let g:neocomplcache_dictionary_filetype_lists = {
                    \ 'default' : '',
                    \ 'vimshell' : $HOME.'/.vimshell_hist',
                    \ 'scheme' : $HOME.'/.gosh_completions'
                    \ }

        " Define keyword.
        if !exists('g:neocomplcache_keyword_patterns')
            let g:neocomplcache_keyword_patterns = {}
        endif
        let g:neocomplcache_keyword_patterns['default'] = '\h\w*'

        " Plugin key-mappings.
        imap <C-k>     <Plug>(neocomplcache_snippets_expand)
        smap <C-k>     <Plug>(neocomplcache_snippets_expand)
        inoremap <expr><C-g>     neocomplcache#undo_completion()
        inoremap <expr><C-l>     neocomplcache#complete_common_string()

        " SuperTab like snippets behavior.
        imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"

        " Recommended key-mappings.
        " <CR>: close popup and save indent.
        " inoremap <expr><CR>  neocomplcache#smart_close_popup() . "\<CR>"
        " <TAB>: completion.
        inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
        " <C-h>, <BS>: close popup and delete backword char.
        inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
        inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
        inoremap <expr><C-y>  neocomplcache#close_popup()
        inoremap <expr><C-e>  neocomplcache#cancel_popup()

        " AutoComplPop like behavior.
        "let g:neocomplcache_enable_auto_select = 1

        " Shell like behavior(not recommended).
        "set completeopt+=longest
        "let g:neocomplcache_enable_auto_select = 1
        "let g:neocomplcache_disable_auto_complete = 1
        "inoremap <expr><TAB>  pumvisible() ? "\<Down>" : "\<TAB>"
        "inoremap <expr><CR>  neocomplcache#smart_close_popup() . "\<CR>"

        " Enable omni completion.
        autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
        autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
        autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
        autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
        autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags

        " Enable heavy omni completion.
        if !exists('g:neocomplcache_omni_patterns')
            let g:neocomplcache_omni_patterns = {}
        endif
        let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
        "autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
        let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'

        au BufNewFile,BufRead *.snip set syntax=snippet ft=snippet foldmethod=indent
“”
“=>neocomplcache插件
""""""""""""""""""""""""""""""
“TODO:仍然需要调整行为以扩展
“代码段,在整个自动完成列表中更改
“使用新Complcache。
让g:neocomplcache在启动时启用=1
“使用smartcase。
设g:neocomplache\u enable\u smart\u case=1
“用例完成。
设g:neocomplcache_enable_camel_case_completion=1
“使用下杆完成。
设g:neocomplcache\u enable\u underbar\u completion=1
“设置最小语法关键字长度。
设g:neocomplcache_min_syntax_length=3
设g:neocomplache\u lock\u buffer\u name\u pattern='\*ku\*'
设g:neocomplcache_snippets_dir='~/.vim/snippet/'
定义字典。
设g:neocomplache\u dictionary\u filetype\u list={
\“默认值”:“,
\“vimshell”:$HOME./.vimshell_hist',
\“方案”:$HOME./.gosh_完成”
\ }
“定义关键字。
如果!存在('g:Neocompcache_关键字_模式')
设g:neocompcache_关键字_模式={}
恩迪夫
设g:neocompcache_关键字_模式['default']='\h\w*'
“插件键映射。
imap(新编译代码片段扩展)
smap(新编译片段扩展)
inoremap neocomplcache#撤消完成()
inoremap neocomplcache#complete_common_string()
“类似SuperTab的代码段行为。
imap neocomplcache#源代码#代码片段#完整#可扩展()?“\(neocomplcache\u代码段\u扩展)”:pumvisible()?"\" : "\"
“推荐的密钥映射。
“:关闭弹出窗口并保存缩进。
“inoremap neocomplcache#智能关闭弹出窗口()。\”
“:完成。
inoremap pumvisible()?"\" : "\"
“,:关闭弹出窗口并删除backword字符。
inoremap neocomplcache“智能”关闭弹出()
inoremap neocomplcache“智能”关闭弹出()
inoremap neocomplcache#关闭(弹出窗口)
inoremap neocomplcache#cancel_popup()
“类似pop的行为。
“让g:neocomplcache\u enable\u auto\u select=1
“类似外壳的行为(不推荐)。
“set completeopt+=最长
“让g:neocomplcache\u enable\u auto\u select=1
“设g:neocomplcache\u disable\u auto\u complete=1
“inoremap pumvisible()?"\" : "\"
“inoremap neocomplcache#智能关闭弹出窗口()。\”
“启用全方位完成。
autocmd文件类型css setlocal omnifunc=csscomplete#CompleteCSS
autocmd文件类型html,标记setlocal omnifunc=htmlcomplete#CompleteTags
autocmd文件类型javascript setlocal Omnifnc=javascriptcomplete#CompleteJS
autocmd文件类型python setlocal omnifunc=pythoncomplete#Complete
autocmd文件类型xml setlocal omnifunc=xmlcomplete#CompleteTags
“启用重型全方位完成。
如果!存在('g:neocompcache\u omni\u patterns')
设g:neocomplcache_omni_patterns={}
恩迪夫
设g:neocomplcache\u omni\u patterns.ruby='[^.*\t]\.\w*\\h\w*:'
“autocmd文件类型ruby setlocal omnifunc=rubycomplete#Complete
设g:neocompcache\u omni\u patterns.php='[^.\t]->\h\w*\\124;\ h\w*:'
au BufNewFile,BufRead*.snip集合语法=snippet ft=snippet foldmethod=缩进

我以前也遇到过同样的问题,只是因为SuperTab和Sparkup。同样的问题+=降价文件。