Clear certain criteria from .viminfo file

前端 未结 5 593
深忆病人
深忆病人 2021-01-31 08:25

How can I clear certain criteria from my .viminfo file?

I want to clear the command line history, file marks, jumplist, etc.

However,

5条回答
  •  时光取名叫无心
    2021-01-31 09:06

    You can use vim itself to modify the file, and your changes will stay put if you invoke it like this:

    $ vim -i NONE ~/.viminfo
    

    Starting vim with the -i option sets which viminfo file to use for that session. The special value NONE means that nothing is saved at all. This can be handy for editing other auto-generating files or sensitive data.

    From man vim:

    -i {viminfo}
    When using the viminfo file is enabled, this option sets the filename
    to use, instead of the default ~/.viminfo. This can also be used to
    skip the use of the viminfo file, by giving the name NONE.

提交回复
热议问题