Index ¦ Archives ¦ RSS

indenting with vim

Estimated read time: 1 minutes

probably you already faced with the following problem: if you past a shellscript to vim, then it's indented, so the last line of the script will have tons of whitespaces at the start of the line. there are two problems here:
  1. how to disable indenting temporarily? use :paste and :nopaste
  2. how to indent the text after the paste? mark the lines you want to indent in visual mode (use V) then == will indent them :)

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.