If multiple lines of code are selected, how to indent the selected code segments at the same time?
光阴似箭催人老,日月如移越少年。
Select the code, Press < or add a number 3< to indent forward Press > or add a number 3> to indent backward
<
3<
>
3>
Press the > key to indent the current line Press the 3 >> key to indent the two lines starting from the current one and after
3 >>
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 = + shift 5, first press =, then press shift and 5 at the same time Indent a few lines of code: just number + ==, such as 3==, if there are more lines, press more numbers, such as 100== Indent an entire file of code: Press gg to get to the top of the file, then press =, then simultaneously press shift g
Indent the current line: just ==
==
Indent a function: Move the cursor to the opening brace or closing brace of a function, press = + shift 5, first press =, then press shift and 5
shift
5
Indent a few lines of code: just number + ==, such as 3==, if there are more lines, press more numbers, such as 100==
3==
100==
Indent an entire file of code: Press gg to get to the top of the file, then press =, then simultaneously press shift g
gg
shift g
Select multiple lines, then press >(shift + .), it will shrink the length of one tab, and then press . to repeat the indentation operation just now.
Select all, shift+tab
Select the code,
Press
<
or add a number3<
to indent forwardPress
>
or add a number3>
to indent backwardPress the
>
key to indent the current linePress the
3 >>
key to indent the two lines starting from the current one and afterI usually use
=
,Select multiple lines, then press >(shift + .), it will shrink the length of one tab, and then press . to repeat the indentation operation just now.
Select all, shift+tab