mirror of https://github.com/akelge/vim
Added myFuynx.vim for local functions
Added AppendModeLine function
This commit is contained in:
parent
731b236ba4
commit
1484a69fb9
|
@ -0,0 +1,11 @@
|
|||
" Append modeline after last line in buffer.
|
||||
" Use substitute() (not printf()) to handle '%%s' modeline in LaTeX files.
|
||||
function! AppendModeline()
|
||||
let save_cursor = getpos('.')
|
||||
let append = ' vim: set ts='.&tabstop.' sw='.&shiftwidth.' tw='.&textwidth.' ft='.&filetype.' : '
|
||||
$put =substitute(&commentstring, '%s', append, '')
|
||||
call setpos('.', save_cursor)
|
||||
endfunction
|
||||
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
|
||||
|
||||
" vim: set ts=4 sw=4 tw=78 ft=vim :
|
|
@ -38,6 +38,7 @@ augroup newfiles
|
|||
if has("gui_running")
|
||||
autocmd BufWritePost ~/.gvimrc so ~/.gvimrc
|
||||
endif
|
||||
autocmd BufRead,BufNewFile *.mako set ft=mako
|
||||
|
||||
" Set up python support
|
||||
augroup END
|
||||
|
|
Loading…
Reference in New Issue