xralf
xralf

Reputation: 3742

vimscript using another file instead of .viminfo

I installed a vimscript written by expert in this question.

But there is one problem in the script. When I restart the computer, the bookmarks saved by the script will disappear.

Is it possible to store the bookmarks to another file (e.g. mybookmarks.txt) instead of .viminfo file? Bookmarks stored in .viminfo disappear unpredictably.

Upvotes: 0

Views: 265

Answers (2)

anon
anon

Reputation:

Since it seems like a good tool in general, I extracted it to a plugin: http://www.vim.org/scripts/script.php?script_id=3826. This would store bookmarks only, regardless of viminfo settings, in ~/.vim_bookmarks. The filename is configurable by changing g:simple_bookmarks_filename.

Since it's a full blown plugin now, you can send bug reports on the issue tracker, so if it's not working quite right, let me know.

Cheers.

Upvotes: 2

johnsyweb
johnsyweb

Reputation: 141918

Yes. Use the 'viminfo n' option.

From :he 'viminfo':

Name of the viminfo file. The name must immediately follow the 'n'. Must be the last one! If the "-i" argument was given when starting Vim, that file name overrides the one given here with 'viminfo'. Environment variables are expanded when opening the file, not when setting the option.

Upvotes: 3

Related Questions