I spent three months learning vim and the saddest thing I learned recently:
In vim, you can not extract (select or yank or delete)
var_one
from
var_two
var_three
var_very_long
int var_one = 1;
using standard keybindings. This is something I need every day.
int var_two = 2;
int var_three = 3;
int var_very_long = 4;
References:
- https://stackoverflow.com/questions/6300790/vim-non-rectangular-visual-block
- chatgpt:
You're correct that Vim, out of the box, cannot handle non-rectangular selections in visual block mode. The best options are: Writing custom Vimscript for automation. Using a regex substitution for quick tasks. Leveraging an external editor for flexible multicursor editing.