commit 201de554a5a6c08a1f19ef7f85c588f5e59cfa4c Author: Brian Wang Date: Tue Mar 15 00:00:00 2005 +0000 Version 0.3 Important bug fixes: - Now the script should work for the console version of VIM. (The sign list is sorted in gvim, but in vim, it is not...) - Map "mm" to toggle visual marks diff --git a/README b/README new file mode 100644 index 0000000..520ec76 --- /dev/null +++ b/README @@ -0,0 +1,12 @@ +This is a mirror of http://www.vim.org/scripts/script.php?script_id=1026 + +This script uses Vim's "sign" capability to provide visual marks, similar to UltraEdit's bookmark. + +1. For gvim, use "Ctrl + F2" to toggle a visual mark. + For both vim and gvim, use "mm" to toggle a visual mark. +2. Use "F2" to navigate through the visual marks forward in the file. +3. Use "Shift + F2" to navigate backwards. + +If you do not like the highlighting scheme, you could change "SignColor" in the script. Feedbacks are welcome. :-) + + diff --git a/plugin/visualmark.vim b/plugin/visualmark.vim new file mode 100644 index 0000000..4e19b66 --- /dev/null +++ b/plugin/visualmark.vim @@ -0,0 +1,335 @@ +" Visual Mark +" 2005-03-15, brian wang +" +" Acknowledgements: +" - Thanks to Hari Krishna Dara's genutils.vim (http://vim.sourceforge.net/scripts/script.php?script_id=197) +" - Thanks to Mr. Charles E. Campbell, Jr. for making this script more plugin-like :-) +" - Thanks to Mr. Charles E. Campbell, Jr. for making this script adapt to +" dark/light backgrounds + +if exists("loaded_VisualMark") + finish +endif +let loaded_VisualMark = 1 +if !has("signs") + echoerr "***sorry*** [".expand("%")."] your vim doesn't support signs" + finish +endif + +if &bg == "dark" + highlight SignColor ctermfg=white ctermbg=blue guifg=white guibg=RoyalBlue3 +else + highlight SignColor ctermbg=white ctermfg=blue guibg=grey guifg=RoyalBlue3 +endif + +" --------------------------------------------------------------------- +" Public Interface: +if !hasmapto('Vm_toggle_sign') + map Vm_toggle_sign + map mm Vm_toggle_sign +endif +nnoremap