leader shortcut to append modeline after last line in buffer
This commit is contained in:
parent
435de69a4a
commit
73226d9191
1 changed files with 12 additions and 0 deletions
12
.vimrc
12
.vimrc
|
|
@ -156,6 +156,18 @@ endfunction
|
|||
inoremap <tab> <c-r>=Smart_TabComplete()<CR>
|
||||
|
||||
|
||||
" Append modeline after last line in buffer.
|
||||
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX
|
||||
" files.
|
||||
function! AppendModeline()
|
||||
let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d :",
|
||||
\ &tabstop, &shiftwidth, &textwidth)
|
||||
let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
|
||||
call append(line("$"), l:modeline)
|
||||
endfunction
|
||||
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
|
||||
|
||||
|
||||
"switch spellcheck languages
|
||||
let g:myLang = 0
|
||||
let g:myLangList = [ "nospell", "fr_fr", "en_gb" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue