4 ms·
Wow, I’ve been a vim user for like 8+ years and didn’t know about 0p even though I run into that problem all the time. I had even re-bound yank/paste to use a d
by maddyboo 5y ago
Wow, I’ve been a vim user for like 8+ years and didn’t know about 0p even though I run into that problem all the time. I had even re-bound yank/paste to use a different register. Thanks for the pointer!
This is what I love about vim, there’s always something new to learn.
- linsomniac 5y agoLunarVim has a "show b̶u̶f̶f̶e̶r̶s̶ registers" plugin enabled so when you type " it brings up a window showing the contents of various buffers, so you can eyeball it rather than remembering.
- maddyboo 5y agoOh, just realized I misread the original comment. I ignored the “, so I thought they were saying you could just use 0p (on my phone, otherwise would’ve tested it in vim). I use registers often but I admit I haven’t memorized the meaning of the auto-populated ones like 0.
- leephillips 5y agoI guess you mean registers. You can see a list of them in default Vim using the command :reg.
- Graziano_M 5y agohttps://github.com/junegunn/vim-peekaboo https://github.com/junegunn/vim-peekaboo
- maddyboo 5y agowhich-key.nvim too, plus more features. Really useful for remembering/learning new plugin mappings. https://github.com/folke/which-key.nvim https://github.com/folke/which-key.nvim
- Lio 5y agoTo be perfectly honest I'm regularly surprised by techniques I don't know using plain old vi let alone Vim/NeoVim. That's still useful for situations where you only have say busybox vi. I'm sure it's very well known but the "greatest stack overflow answer of all time" is an example[1] (IMHO obviously :D ) Vim Golf (also well known) is another invaluable and surprising resource[2]. 1. https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118 https://stackoverflow.com/questions/1218390/what-is-your-mos... 2. http://www.vimgolf.com/ http://www.vimgolf.com/