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

vim-signature : Plugin to toggle, display and navigate marks and signs

 script karma  Rating 219/66, Downloaded by 1458    Comments, bugs, improvements  Vim wiki

created by
Kartik Shenoy
script type
Note: The github mirror https://github.com/kshenoy/vim-signature will always contain the latest version

vim-signature is a plugin to place, toggle and display marks.  
Apart from the above, you can also  
* Navigate forward/backward by position/alphabetical order  
* Displaying multiple marks (upto 2, limited by the signs feature)  
* Placing custom signs !@#$%^&*() as visual markers  

### Screenshots  

## Requirements  
Requires Vim to be compiled with +signs to display marks.  

## Installation
I highly recommend using Pathogen or Vundler to do the grunt work for you.  
If for some reason, you do not want to use any of these excellent plugins,  
then unzip it to your ~/.vim directory. You know how it goes...  

Once that's done, out of the box, the followings mappings are defined by default  

  m[a-zA-Z]    : Toggle mark
  m<Space>     : Delete all marks
  m,           : Place the next available mark
  ]`           : Jump to next mark
  [`           : Jump to prev mark
  ]'           : Jump to start of next line containing a mark
  ['           : Jump to start of prev line containing a mark
  `]           : Jump by alphabetical order to next mark
  `[           : Jump by alphabetical order to prev mark
  ']           : Jump by alphabetical order to start of next line containing a mark
  '[           : Jump by alphabetical order to start of prev line containing a mark

  m[0-9]       : Toggle the corresponding marker !@#$%^&*()
  m<S-[0-9]>   : Remove all markers of the same type
  ]-           : Jump to next line having same marker
  [-           : Jump to prev line having same marker
  m<BackSpace> : Remove all markers

This will allow the use of default behavior of m to set marks and, if the line already contains the mark, it'll be unset.
The default behavior of ]', [', `] and [` is supported and enhanced by wrapping around when beginning or end of file is reached.

The command `:SignatureToggle` can be used to show/hide the signs. This is a buffer-specific command.
Note that this does not delete any of the marks but only hides them.

If for some reason, the marks and their sign displays go out of sync, use `:SignatureRefresh` to refresh them.

For more details on customization refer the help

## Thanks to...
* Sergey Khorev for [mark-tools](http://www.vim.org/scripts/script.php?script_id=2929)
* Zak Johnson for [vim-showmarks](https://github.com/zakj/vim-showmarks)

## ToDo:
* Add support for non-Alphabetical marks
* Tie the Signature functions to vim commands that affect mark placement
install details
For those of you -
* Pathogen: Unzip contents of the zip file to .vim/bundle folder
* Vundle/NeoBundle: Add 'Bundle "kshenoy/vim-signature" ' to .vimrc

I highly recommend using a plugin manager to do the dirty work for you.
If you still insist on not using one, unzip the contents of the vim-signature folder to your .vim folder.

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
vim-signature.zip 2.0 2013-12-26 7.0 Kartik Shenoy Changed the way the plugin handles mappings.
Full changelist is here https://github.com/kshenoy/vim-signature/commit/0117f59f8cfb633baa3058ba77cdc31c315de911
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