sponsor Vim development Vim logo Vim Book Ad

vmark.vim: Visual Bookmarking : Toggle visual bookmarking and jump through bookmarks

 script karma  Rating 34/21, Downloaded by 2408  Comments, bugs, improvements  Vim wiki

created by
Michael Zhou
 
script type
utility
 
description
Usage:
   Normal Mode
     mm     Toggle visual bookmark current line
     ma     Remove all bookmarks
     mn     Move to next bookmark below current line.  Will wrap around at end.
     <F2>   Same as above (mn)
     mp     Move to previous bookmark above current line.  Will wrap around at top.
     <F3>   Same as above (mp)

Configuration:
     b:vm_maxmarks - Max number of bookmarks allowed in a buffer
     b:vm_guifg    - Foreground color for bookmarked line in GVIM
     b:vm_guibg    - Background color for bookmarked line in GVIM
     b:vm_ctermfg  - Foreground color for bookmarked line in VIM
     b:vm_ctermbg  - Background color for bookmarked line in VIM

Limitation:
   If syntax highlighting based on keywords is turned on and the line being bookmarked starts with a keyword, the keyword may not be highlighted but the rest of the line after the keyword should be highlighted normally.

Acknowledgement:
   Took cues from Amit Sethi's highlight.vim (http://www.vim.org/scripts/script.php?script_id=1599)
 
install details
Copy vmark.vim to .vim/plugin directory
 

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
vmark.vim 1.3 2014-04-15 6.0 Michael Zhou Merged key mappings and other changes from serpent7776.  The plugin can also be accessed from https://github.com/michaelzhou999/vmark
vmark.vim 1.2 2012-06-13 6.0 Michael Zhou Added an autocmd to highlight all marked lines.  This fixed the issue where highlights are lost when a previous buffer is reloaded into vim/gvim.
vmark.vim 1.1 2012-05-19 7.0 Michael Zhou Fixed undefined variables defect for multiple buffers.
vmark.vim 1 2012-05-19 7.0 Michael Zhou Initial upload
ip used for rating: 3.22.181.209

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.
   
Vim at Github