[Solved] Mappings for buffer-next and buffer-previous not working

I have three mappings configured:

map global user y '<a-|>xclip -i -selection clipboard<ret>'
map global user p 'buffer-previous'
map global user n 'buffer-next'

I just copied the snippet above with ,y, but ,p and ,n are not working.

With ,n and ,p it just acts like pressing “b” (selecting backwards) and says “nothings left to undo”

map global user p ': buffer-previous<ret>'
map global user n ': buffer-next<ret>'

Although these commands just cycle through the buffers in the order you see them suggested when typing :b<space>. Not something I find very useful. ga takes you to the last buffer you edited and is much more useful IMO.

1 Like

Thanks. It worked.

Agree. I use:
map global user <tab> ga

map global user y ‘<a-|>xclip -i -selection clipboard’

Is there any way to implement a + and/or * registries that will yank into system clipboard ?

Kakoune doesn’t support "+ or "* registers by default, and it does not provide a way to add new registers. However, with the RegisterModified hook in the latest release,
you can make any register forward to the system clipboard, including the default (double-quote) register.

1 Like