4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:motion — newest first
  • Habit breaking, habit making

    [Summary, full note in Shaarli]
    Habit breaking, habit making (Vimcasts, Feb 6, 2013).

    • Moving with the arrow keys is a bad habit. Disable them in your vimrc to get back to the home row (h j k l):
      noremap
      noremap
      noremap
      noremap
    • Next step: moving one line or column at a time is slow too, holding j is an anti-pattern. As an exercise, disable h j k l the same way (noremap h , ...) to force yourself to learn real motions. Each new motion is like a new word in a foreign language.
    • Wordwise motions, ~5x faster than h/l: w and b (start of next/previous word), then e and ge (end of word); W B E gE do the same for WORDs (:help word).
    • Character search within a line: f{char} jumps to the next {char}, t{char} to just before it, F/T backwards, ; repeats, , reverses. Aim at rare characters (punctuation, capitals): two keystrokes usually get you there. Set 'visualbell' to mute the beep.
    • Keep h and l for off-by-one corrections (f instead of t, neighbouring character).
    • The hardmode plugin toggles everything at once: :call HardMode() and :call EasyMode().
    June 10, 2015 - permalink - http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/
    arrow motion vim