Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert spaces in front of selected lines?

Tags:

sublimetext2

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.

like image 444
user1775888 Avatar asked Dec 19 '12 04:12

user1775888


People also ask

How do I add a space in front of every line in notepad?

Press Alt and select the line no. move curser till the line no you want to have space . Now you can enter spaces as many you want or anything and save it.

How do you put a space in a selected line?

Select the paragraphs you want to change. Go to Home > Line and Paragraph Spacing. Choose the number of line spaces you want or select Line Spacing Options, and then select the options you want under Spacing.


2 Answers

Have you tried

CTRL + ]
CTRL + [

(square brackets).

Or use

Edit -> Line -> Reindent
like image 179
ATOzTOA Avatar answered Oct 04 '22 17:10

ATOzTOA


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.

like image 42
Dao Lam Avatar answered Oct 04 '22 17:10

Dao Lam