Tips for using markers in vim
Within vim's command mode
ma
Sets the marker "a" at the current cursor position.
marks
Shows you the markers you have placed.
Moving around
'a
Moves to the first non-blank character on the line for maker "a".
`a
Moves to the first character (blank or otherwise) on the line for marker "a".
Uses
d'a
Will delete everything from the current cursor position all the way up to and including the line containing maker "a".
y'a
Will yank everything from the current cursor position all the way up to and including the line containing "a".
Fun uses
'as/Lorem/lorem/g
Replaces "Lorem" with "lorem" at marker "a".
,'ds/Lorem/lorem/g
Replaces "Lorem" with "lorem" from the current cursor position all the way up to and including the line containing marker "d".
Written by Andrew Sledge
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#