diff --git a/vim/bundle/ll.vim/plugin/ll.vim b/vim/bundle/ll.vim/plugin/ll.vim index f7352ef..810d4d7 100644 --- a/vim/bundle/ll.vim/plugin/ll.vim +++ b/vim/bundle/ll.vim/plugin/ll.vim @@ -1,3 +1,14 @@ +" To force clearing the undo information +" From MANUAL of undo +function! LLvimWriteWithCleareUndo() + let s:old_undolevels = &undolevels + set undolevels=-1 + exe "normal a \\" + let &undolevels = s:old_undolevels + unlet s:old_undolevels +endfunction +com! -bar WW cal LLvimWriteWithCleareUndo() + autocmd BufNewFile *.sh,*.py exec ":call LeeAutoSetFileHead()" function! LeeAutoSetFileHead() if &filetype == 'sh'