obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

How can I map G to G$ ?

Open rak-bn opened this issue 10 months ago • 1 comments

It seems 'nmap G G$' doesn't work as I expected. the G didn't take effect but only the $ did.

rak-bn avatar Feb 10 '25 03:02 rak-bn

I believe changing the configuration as follows will achieve the expected behavior:

noremap G G$

When using nmap, the G in the right-hand side G$ gets remapped again, causing an infinite loop. Instead, try using noremap which prevents remapping.

I suspect that in the original configuration, only $ was executed because there's a mechanism that stops processing a key when an infinite loop is detected.

ko-shin-ryo avatar Feb 12 '25 12:02 ko-shin-ryo