Re:Why not just embed Neovim?
by mrgoldenbrown on Thursday June 13, 2024 @04:06PM
(#40674061)
What is a typical R use case for you? R doesn't feel worth it to me. If I'm changing a word, cw is almost always better, unless maybe the new word has the exact same number of chars as the old word.
[ Parent
| on HN ]
It's practically mandatory when editing cells of hand-written table-likes.
It's faster than `ct<somechar>` for replacing part of a word.
Using `<Insert>` to toggle the mode is also something I do fairly regularly ...
I'm past the point of consciously doing these things so I probably use it more than this.
I just use 'a' or 'i'. I don't think I have ever used 'Insert'.
That requires pressing <Esc> or whatever to leave insert mode first. I'll do it if I need to do some nontrivial motions first (because i_^O is just awkward outside of mappings), but otherwise no.
I would just cw and space it back to correct alignment. I too edit ascii table by hand, and quite often and just find R not very useful in even this case.
Or use cw, and then use a plugin like e.g. junegunn/vim-easy-align.
Also table_format.vim.
In the original vi, if you use cw to change it into a longer word, you can't just use <DEL> to remove spaces after the word, but have to use <ESC> and x. So R is often more practical, and it got into my muscle memory before vim existed.
Re:Why not just embed Neovim?
by seanhunter on Friday June 14, 2024 @09:31AM
(#40680756)
Yeah exactly. So if I'm editing text that is somehow quasi fixed width like a table cell but doesn't fit the classic vim definition of a word or a neatly delimited thing that I can use ci/ca with.
So for example this morning I was editing cells in a latex array. They are delimited by "&" and each one is some sort of equation that doesn't fit a normal vim word definition. R to the rescue. If I need more characters than are there in the cell then I go <esc>I to carry on but this morning, R was perfect.
I never toggle insert mode with an ins key because I got in the habit of using minimalist keyboards with weird custom mappings that didn't have that key (or not that readily available) often.