sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

simple_bookmarks.vim : Named bookmarks, storing both filename and cursor position

 script karma  Rating 31/10, Downloaded by 784    Comments, bugs, improvements  Vim wiki

created by
Andrew Radev
script type
Github project is at https://github.com/AndrewRadev/simple_bookmarks.vim

The plugin provides several commands to manage named bookmarks. This is similar to what you'd do with persistent marks, but brings the benefit of longer, more rememberable names.

Here's an example:

    :edit ~/.vimrc
    :Bookmark here

This will store a bookmark called "here" in the file "~/.vim_bookmarks" (changeable through a setting). To jump to the mark, use :GotoBookmark

    :GotoBookmark here

This will open the ~/.vimrc file and jump to the third line. The column is saved as well.

To delete the bookmark, use:

    :DelBookmark here

Both :GotoBookmark and :DelBookmark are tab-completed with all known bookmarks.

The command :CopenBookmarks will load all marks in the quickfix window for easier navigating.

Note that bookmarks should be synchronized between vim instances. Anytime you add a mark in one vim instance, it should be available in all others. In practice, this is achieved by simply reading and writing the whole file on each update. I have yet to experiment to find out if there are any performance issues or race conditions. If you find any issues, please open a bug report on github: https://github.com/AndrewRadev/simple_bookmarks.vim/issues
install details
There are several ways to install the plugin. The recommended one is by using Tim Pope's pathogen (http://www.vim.org/scripts/script.php?script_id=2332). In that case, you can clone the plugin's git repository like so:

    git clone git://github.com/AndrewRadev/simple_bookmarks.vim.git ~/.vim/bundle/simple_bookmarks

If your vim configuration is under git version control, you could also set up the repository as a submodule, which would allow you to update more easily. The command is (provided you're in ~/.vim):

    git submodule add git://github.com/AndrewRadev/simple_bookmarks.vim.git bundle/simple_bookmarks

Another way is to simply copy all the essential directories inside the ~/.vim directory: plugin, autoload, doc.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
simple_bookmarks.zip 0.1.0 2014-01-26 7.0 Andrew Radev - Delete and undo bookmarks from the quickfix list
- Improvements on highlighting and signs
simple_bookmarks.zip 0.0.2 2012-11-27 7.0 Andrew Radev - Signs and/or highlighting for bookmarked lines
- Optional extended quickfix view
- Auto-closing of quickfix window
- Optionally open bookmarks in new tabs
simple_bookmarks.zip 0.0.1 2011-11-28 7.0 Andrew Radev Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo