mirror of https://github.com/akelge/vim
Removed snipmate and added supertab
This commit is contained in:
parent
a2040e2c29
commit
23ffeab69c
43
vimrc
43
vimrc
|
@ -51,13 +51,14 @@ Plugin 'robbles/logstash.vim'
|
||||||
Plugin 'sclo/haproxy.vim'
|
Plugin 'sclo/haproxy.vim'
|
||||||
Plugin 'evanmiller/nginx-vim-syntax'
|
Plugin 'evanmiller/nginx-vim-syntax'
|
||||||
|
|
||||||
" Snipmate
|
" " Snipmate
|
||||||
Plugin 'MarcWeber/vim-addon-mw-utils'
|
" Plugin 'MarcWeber/vim-addon-mw-utils'
|
||||||
Plugin 'tomtom/tlib_vim'
|
" Plugin 'tomtom/tlib_vim'
|
||||||
Plugin 'garbas/vim-snipmate'
|
" " Plugin 'garbas/vim-snipmate'
|
||||||
|
" Plugin 'ervandew/snipmate.vim'
|
||||||
|
" Plugin 'honza/vim-snippets'
|
||||||
|
|
||||||
" Optional: snippets for snipmate
|
Plugin 'ervandew/supertab'
|
||||||
Plugin 'honza/vim-snippets'
|
|
||||||
|
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
|
|
||||||
|
@ -139,22 +140,22 @@ colorscheme wombat256
|
||||||
" COMPLETION & INDENTATION
|
" COMPLETION & INDENTATION
|
||||||
" """""""""""""""""""""""""
|
" """""""""""""""""""""""""
|
||||||
|
|
||||||
" Function that returns tab if called on an "empty" line
|
" " Function that returns tab if called on an "empty" line
|
||||||
" C-N elsewhere
|
" " C-N elsewhere
|
||||||
function! CleverTab()
|
" function! CleverTab()
|
||||||
if &ft=="text"
|
" if &ft=="text"
|
||||||
return "\<Tab>"
|
" return "\<Tab>"
|
||||||
elseif strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
|
" elseif strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
|
||||||
return "\<Tab>"
|
" return "\<Tab>"
|
||||||
else
|
" else
|
||||||
return "\<C-N>"
|
" return "\<C-N>"
|
||||||
endfunction
|
" endfunction
|
||||||
" map the function to Tab
|
" " map the function to Tab
|
||||||
inoremap <C-\> <C-R>=CleverTab()<CR>
|
" inoremap <C-\> <C-R>=CleverTab()<CR>
|
||||||
inoremap <Tab> <C-R>=CleverTab()<CR>
|
" inoremap <Tab> <C-R>=CleverTab()<CR>
|
||||||
" map Shift-Tab to Snipmate
|
" map Shift-Tab to Snipmate
|
||||||
imap <S-Tab> <Plug>snipMateNextOrTrigger
|
" imap <S-Tab> <Plug>snipMateNextOrTrigger
|
||||||
smap <S-Tab> <Plug>snipMateNextOrTrigger
|
" smap <S-Tab> <Plug>snipMateNextOrTrigger
|
||||||
|
|
||||||
set completeopt=longest
|
set completeopt=longest
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue