Skip to main content

In addition to statox's methods, you can:

  • Position the cursor at the beginning of the leading whitespace and type dw
  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left

Update

What I actually usually do in such cases is:

  • Visually select all the lines as above, type < to move them left by one shiftwidth, then type . until they're shifted all the way to the left margin.

In addition to statox's methods, you can:

  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left

Update

What I actually usually do in such cases is:

  • Visually select all the lines as above, type < to move them left by one shiftwidth, then type . until they're shifted all the way to the left margin.

In addition to statox's methods, you can:

  • Position the cursor at the beginning of the leading whitespace and type dw
  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left

Update

What I actually usually do in such cases is:

  • Visually select all the lines as above, type < to move them left by one shiftwidth, then type . until they're shifted all the way to the left margin.
added 221 characters in body
Source Link
garyjohn
  • 6.5k
  • 22
  • 22

In addition to statox's methods, you can:

  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left

Update

What I actually usually do in such cases is:

  • Visually select all the lines as above, type < to move them left by one shiftwidth, then type . until they're shifted all the way to the left margin.

In addition to statox's methods, you can:

  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left

In addition to statox's methods, you can:

  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left

Update

What I actually usually do in such cases is:

  • Visually select all the lines as above, type < to move them left by one shiftwidth, then type . until they're shifted all the way to the left margin.
Source Link
garyjohn
  • 6.5k
  • 22
  • 22

In addition to statox's methods, you can:

  • Position the cursor anywhere in the leading whitespace and type diw
  • Position the cursor at the first non-space character of the line and type d0
  • Visually select all the lines you want to move left, e.g., by typing V on the first line and moving the cursor to the last line, then executing :left