Re:Why, oh why, do those nutheads use vi? (2007)
by szszrk on Tuesday December 07, 2021 @08:04AM
(#29471981)
Didn't realize I could do `di"`... that's so neat.
I always at least whip through such articles about vim as there may be something I don't use daily, but could. There always is such a thing.
I love to use all the zero-configuration things that are already present in Vi/Vim at work. IDE's are cool for devs or people who do everything from a stable workstation. I rarely have such comfort, jumping from one server to another, from one image to another. And Vi or Vim are always there. Thanks for all those hints.
Re:Why, oh why, do those nutheads use vi? (2007)
by WithinReason on Tuesday December 07, 2021 @08:16AM
(#29472121)
For VSCode users:
ctrl+backspace: `printf("World\n");`
ctrl+delete: `printf("Hello \n");`
alt+shift+right, alt+shift+right, delete: `printf();`
Reiterating point 3 from the article: e.g. if the cursor is at | in:
With vim, you could manipulate the text in different ways by using different motions, e.g.:`db` would give `printf("World\n");` (b for backwards),
`de` would give `printf("Hello \n");` (e for end-of-word),
`di"` would give `printf("");` (inside `"`),
`di(` would give `printf();` (inside `(`),
or instead of deleting, some actions could be useful, like changing to uppercase: e.g.
`gUi"` would give `printf("HELLO WORLD\n");`