14

Is there any way to add space or tab(4 spaces) in front of several selected lines? Because now if change the code I hava to press command + click select each line.

Thanks.

user1775888
  • 3,147
  • 13
  • 45
  • 65

4 Answers4

15

Have you tried

CTRL + ]
CTRL + [

(square brackets).

Or use

Edit -> Line -> Reindent
ATOzTOA
  • 34,814
  • 22
  • 96
  • 117
9

To insert individual spaces, click on the beginning of the line, then use cmd (for Mac) or ctrl (for Windows) and click on the beginning of other lines. It's the same way as how you select multiple files at once. Now when you add a space in front, it will add to all the lines that you selected.

Dao Lam
  • 2,837
  • 11
  • 38
  • 44
  • 1
    Ya, that's actually how I do it now, but I want one where you "highlight" the lines instead of Cmd-click, because dragging the cursor to make a selection include lines is suuuper easy. – tscizzle Jan 16 '15 at 17:10
  • 9
    Or on a mac click the first line you want to move, hold option, drag straight down and this will select multiple lines. Then just add tabs or spaces at will. Works like a charm. – Maximus Jun 19 '15 at 15:38
2

First set your TAB(4 spaces) width by selecting

View > Indentation > Tab Width: 4 

then select the number of lines(text blocks) that you wanna shift towards RIGHT.

Finally Hit(On MAC)

Command + Tab    OR
Command + [

and Hit (On Windows)

Ctrl + Tab       OR
Ctrl + [
hygull
  • 8,464
  • 2
  • 43
  • 52
0

To use indentation with 2 SPACES

View > Indentation > Indent Using Spaces

View > Indentation > Tab Width: 2
v3rlly
  • 824
  • 4
  • 7