You can look at the project-page of this plugin to see it in action github-repo.

This plugin allows to see markings of file at the left bar before line-numbers.

To The Point

Usages of vim markings and vim-signature

Vim Marks:

  • You can jump right to the place where you left writing your code/blog-post/whatever.
  • You can sign a place that is important in project you are working on to remember about something in there (as opposite to #FIXME/ #TODO which lefts data in code)

Vim Signature plugin

  • Allows to see where the markings are set instead of making call to :marks

How to install plugin

Usually with Vundle add this to your vimrc file:

Plugin 'kshenoy/vim-signature'

Between those vim-config lines:

call vundle#begin()

call vundle#end()            " required

Now you need to install your plugin with:

vim +InstallPlugin +qall

And re-bash to new shell with installed vim-plugin.

Using Markings and Vim-Signature plugin

Vim Signature will display all markings at the left side.

To use markings you should follow this awesome guide

  1. Making new mark: Press m and some letter like a so : press: ma on the line that you want to place an a marking.
  2. Jumping to the a mark with keys: \a`
  3. Listing all markings with vim-command: :marks

Snippets

Posting here some of the marking command combinations from Vim.Wikia.com as a reference:

Command         Description
ma              set mark a at current cursor location
'a              jump to line of mark a (first non-blank character in line)
`a              jump to position (line and column) of mark a
d'a             delete from current line to line of mark a
d`a             delete from current cursor position to position of mark a
c'a             change text from current line to line of mark a
y`a             yank text to unnamed buffer from cursor to position of mark a
:marks          list all the current marks
:marks aB       list marks a, B



]'              jump to next line with a lowercase mark
['              jump to previous line with a lowercase mark
]`              jump to next lowercase mark
[`              jump to previous lowercase mark

The above commands take a count. For example, 5]` jumps to the fifth mark after the cursor. 

Command         Description
`.              jump to position where last change occurred in current buffer
`"              jump to position where last exited current buffer
`0              jump to position in last file edited (when exited Vim)
`1              like `0 but the previous file (also `2 etc)
''              jump back (to line in current buffer where jumped from)
``              jump back (to position in current buffer where jumped from)
`[ or `]        jump to beginning/end of previously changed or yanked text
`< or `>        jump to beginning/end of last visual selection 


:delmarks a     delete mark a
:delmarks a-d   delete marks a, b, c, d
:delmarks abxy  delete marks a, b, x, y
:delmarks aA    delete marks a, A
:delmarks!      delete all lowercase marks for the current buffer (a-z) 

Acknowledgements

Auto-promotion

Related links

Thanks!

That's it :) Comment, share or don't - up to you.

Any suggestions what I should blog about? Post me a comment in the box below or poke me at Twitter: @anselmos88.

See you in the next episode! Cheers!



Comments

comments powered by Disqus