If multiple lines of code are selected, how to indent the selected code segments at the same time?
某草草2017-05-27 17:46:19
Select the code,
Press <
or add a number 3<
to indent forward
Press >
or add a number 3>
to indent backward
phpcn_u15822017-05-27 17:46:19
Press the >
key to indent the current line
Press the 3 >>
key to indent the two lines starting from the current one and after
淡淡烟草味2017-05-27 17:46:19
I usually use =
,
Indent the current line: just
==
Indent a function: Move the cursor to the opening brace or closing brace of a function, press
at the same time=
+ shift 5, first press=
, then pressshift
and5
Indent a few lines of code: just number +
==
, such as3==
, if there are more lines, press more numbers, such as100==
Indent an entire file of code: Press
gg
to get to the top of the file, then press=
, then simultaneously pressshift g
伊谢尔伦2017-05-27 17:46:19
Select multiple lines, then press >(shift + .), it will shrink the length of one tab, and then press . to repeat the indentation operation just now.