mirror of
https://github.com/akelge/vim
synced 2025-07-01 21:09:13 +00:00
Changed Clevertab to return <Tab> in text files
This commit is contained in:
@ -90,7 +90,9 @@ colorscheme railscasts
|
|||||||
" 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 strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
|
if &ft=="text"
|
||||||
|
return "\<Tab>"
|
||||||
|
elseif strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
|
||||||
return "\<Tab>"
|
return "\<Tab>"
|
||||||
else
|
else
|
||||||
return "\<C-N>"
|
return "\<C-N>"
|
||||||
@ -234,9 +236,11 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Map Ctrl-T to new tab and Ctrl-W to close tab
|
" Map Ctrl-T to new tab and Ctrl-W to close tab
|
||||||
|
" Map Ctrl-S to save
|
||||||
if !(has('mac') || has('macunix'))
|
if !(has('mac') || has('macunix'))
|
||||||
nnoremap <silent> <C-T> :tabnew<CR>
|
nnoremap <silent> <C-T> :tabnew<CR>
|
||||||
nnoremap <silent> <C-W> :tabclose<CR>
|
nnoremap <silent> <C-W> :tabclose<CR>
|
||||||
|
nnoremap <silent> <C-S> :w<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" <Leader>hh opens my help file
|
" <Leader>hh opens my help file
|
||||||
|
Reference in New Issue
Block a user