How is the undo tree used in Vim?

前端 未结 8 649
面向向阳花
面向向阳花 2020-12-22 14:53

This answer says:

Vim\'s undo/redo system is unbeatable. Type something, undo, type something else, and you can still get back the first thing you typed

8条回答
  •  悲哀的现实
    2020-12-22 15:48

    The package undotree is written in pure vimscript so no requirement.

    And add this to your vimrc before it is too late:

      set nobackup
      set noswapfile
      set nowritebackup
      set undolevels=10000         " use many levels of undo
      set history=10000    " After nocompatible
    
      if has('persistent_undo')
        set undodir=$HOME/.vim/undo
        set undofile 
      endif 
    

提交回复
热议问题