Skip to content

miku86

Vim love

I love vim.

Although I used vim for some months now, I always did some tasks with vscodium, e.g.:

  • removing leading/trailing characters in multiple lines
  • search and replace

But because opening files in vim is so much faster than in vscodium, especially if I only want to edit one file, I searched for some vim-esque solutions:

  • removing in multiple lines: go into visual block mode (ctrl + v), highlight the correct block, do your thing (e.g. x to remove character)
  • removing in multiple lines: go into visual line mode (shift + v), highlight the correct lines, do your thing in command mode (e.g. :'<,'>norm x)
  • search and replace: go into command mode (:), search in all lines (%), substitute vim with emacs and ask on each occurrency (s/vim/emacs/c)

So as we can see, there are multiple solutions for different problems.

But actually both problems can get destructured into simple steps.

I think this kind of thinking also leads to better problem solving.