Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I also "set undodir=/tmp" so that it doesn't litter my working directory with persistent undo files.


I prefer a variant of that. You can specify more than one place (that is, first choice, second choice, etc.) with a comma-separated list. I do this:

    " Vim 7.3, now with persistent undo
    set undofile
    set undodir=$HOME/.vim_undo,/tmp
That way, if I've remembered to create a .vim_undo folder, they go there (best option). Otherwise, /tmp. (You can do the same thing when specifying places for swap and backup files.)

As the comment suggests, the undo feature is only 7.3 or better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: