Seven habits of effective text editing

This section is a condensed version of Bram Moolenaar's article from 2000, and a subsequent presentation from 2007. It's rather good, give it a read on Bram's website: https://moolenaar.net/habits.html. In case you decide to skip reading the whole thing, here follows a very high-level summary.

Since developers spend so much time reading and editing code, Bram highlights an important cycle when it comes to improving your text-editing experience:

  1. Detect inefficiency
  2. Find a quicker way
  3. Make it a habit

Those three steps are augmented with numerous examples. Here's one of the examples for each:

  1. Detect inefficiency: Moving around takes a lot of time.
  2. Find a quicker way: Often, you're looking for something that's already there. You can search for a piece of text to move faster. Or you can take a step or two further:
    • Use * to search for a word under the cursor
    • Use :set incsearch to search as you type
    • Use :set hlsearch to highlight every instance of a search pattern on the screen
  1. Make it a habit: Use what you've learned! Set incsearch and hlsearch in your .vimrc. Use * every time you catch yourself using the / command to search for a pattern near your cursor.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.55.14