So, since I am just starting out with Kakoune (used (neo)vim for many months and emacs for a few weeks by now) I wanted to try and set some config options interactively, and then add them to my rc.
First thing I looked is whether I could paste it using something like :debug history or :debug commands. No luck.
Even more intricate would be a command to add the last command straight to the rc file, actually.
The thing is, I couldn't even use the dirty option: press :<up> and mark it with shift-arrow keys or my cursor, as kakoune apparently doesn't expose it as proper text to the terminal.
So in the end I resorted to rewriting the command, which, if you're just getting started and trying to figure out and configure some stuff quickly, is quite tedious.
":p should get you the latest command.
" to select register, : last entered command register, p to paste.
(I couldn't get it to work with my current config, but it's probably just some plugin that broke it somehow haha.)
I鈥檓 on my phone right now so I can鈥檛 test, but the : register holds the command history.
Try:
":<a-p>
It should paste and select the commands.
Thank you very much, I had no idea that registers were the place too look :)
Though a question remains: Why can't I copy text directly from kakoune?
Why can't I copy text directly from kakoune?
It's using ncurses, so you can hold shift to select text, otherwise Kakoune will receive the mouse input.
You may also want to define a shortcut to copy the main selection to the system clipboard, for example
map global normal <c-y> %{<a-|>xclip -selection clipboard >/dev/null 2>&1<ret>}
is there a way to sync it, like in vim? I really like that behavior.
The RegisterModified hook lets you automatically send your Kakoune clipboard to the system clipboard, but since Kakoune doesn't know about the system clipboard there's no ClipboardModified hook to sync in the opposite direction.
The wiki has a lot of suggestions and alternatives.
Thank you :)
Most helpful comment
":pshould get you the latest command."to select register,:last entered command register,pto paste.(I couldn't get it to work with my current config, but it's probably just some plugin that broke it somehow haha.)