Learning has fun - @Xi Xiao

Vim key practice in visual studio code

Goal

Visual Studio Code (a.k.a VSC) is my often used editor, and vim key is my key preference.

Software engineers need to come back to fundamental skills and update them repeatly.

This action takes time and effort, but it is the subtleness that makes you an outlier professional software engineer. So it is worthy the time from long term perspective.

What do I do

I consult the book “Practical Vim”

By doing this, I know what functionalities are supported in VSC vim key, and what are not.

In addition, I reviewed the book content and updated my muscle memory.

Reading notes

(I come back to update this section from time to time)

  1. <c-a> and <c-x> can do simple arithmetic calculation in vim, and is now supported in vim key. This was not the case, but luckily it is now! I should start using it.
  2. gU{motion} to capitalize text, including guu and gUU.
  3. <c-w> delete previous word(typo?)
  4. <c-o> allows to use normal mode once without leaving insert mode. (But is this a good habit?)
  5. Some useful commands in insert mode:
    • <c-w> delete word to the left of cursor
    • <c-o D> delete everything to the right of cursor
    • <c-u> delete everything to the left of cursor
    • <c-h> backspace/delete
    • <c-t> indent current line
    • <c-d> un-indent current line