5 ms·
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 exac
by mrgoldenbrown 2y ago
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.
- o11c 2y agoIt'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.
- cwbriscoe 2y agoI just use 'a' or 'i'. I don't think I have ever used 'Insert'.
- o11c 2y agoThat 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.
- ddfs123 2y agoI 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.
- setopt 2y agoOr use cw, and then use a plugin like e.g. junegunn/vim-easy-align.
- wruza 2y agoAlso table_format.vim.
- gpvos 2y agoIn 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.
- seanhunter 2y agoYeah 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.