Skip to content

Commit

Permalink
plugin: add WW command to clear the undo information
Browse files Browse the repository at this point in the history
  • Loading branch information
hbuxiaofei committed Sep 7, 2020
1 parent 452bada commit be2bb38
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vim/bundle/ll.vim/plugin/ll.vim
Original file line number Diff line number Diff line change
@@ -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 \<BS>\<Esc>"
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'
Expand Down

0 comments on commit be2bb38

Please sign in to comment.