http://qs321.pair.com?node_id=848078


in reply to No Hard Tabs in Code

Most of my changes of indentation require zero keystrokes. My editor knows that if the previous line ends with a {, the next line should have an extra level of indent. And if I start a line with }, the indentation should be lowered by one level.

If I want to shift a line, it requires two keystrokes: >> or <<. Three keystrokes to do two lines: 2>> or 2<<. Two keystrokes to do the rest of the paragraph, the rest of the screen, or the rest of the file: <}, <L or <G. Three for the next five paragraphs: <5}.

Note that's quite independent of whether I use tabs or spaces for indentation. I've set up my editor to not insert tabs when hitting the tab key (but if I really want to, I can do ^V^I (two keystrokes)) - it will use spaces. But I seldomly have the need to use the tab key (well, unless in "command mode", then it cycles between visible buffers).

Note that removing 4 internal spaces doesn't require 4 keystrokes: 4x or 4X will do. For multiple lines of code that need 4 spaces to be removed, I navigate to a corner of the rectangle, mark its place: ma, move to its opposite corner, and delete the block: d\a.