Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use lowercase marks as global in vim?

Tags:

vim

How can one use the lowercase marks as global buffers too?

The marks are a-z, so there's really no need for me to have the lowercase ones reserved for buffer-only marks, since I don't have more than a few marks / buffer.

So I will almost always want to have global marks, but ma is so much easier to type than mA, same goes for 'a vs 'A.

like image 226
Prody Avatar asked Oct 16 '25 13:10

Prody


1 Answers

You can just map them by the look of it. Eg in your vimrc

nnoremap ma mA
nnoremap 'a 'A
nnoremap `a 'A

Although I suspect this approach might trip up plugins that aren't using nnoremap.

like image 95
michael Avatar answered Oct 19 '25 10:10

michael