1753559 Members
5939 Online
108796 Solutions
New Discussion юеВ

Re: VI

 
SOLVED
Go to solution
SAM_24
Frequent Advisor

VI

Hi,

I set sw=3 , I want to apply it for all or set of lines.

1
.
.
7

I can do SHIFT+>> for each line to move right.
Is there any way I can apply it for all 7 lines.

Thanks.
Never quit
6 REPLIES 6
T G Manikandan
Honored Contributor

Re: VI

Can you elaborate?

Thanks
Dirk Wiedemann
Respected Contributor
Solution

Re: VI

Hello,

that's absolut simple (if I understand your question right):
Type 7 and then SHIFT+>> to do it for 7 lines.

regards
Dirk
John Strang
Regular Advisor

Re: VI

Hi,

You can set your preferences for vi in the
.exrc file in your home directory.

John
If you never make a mistake you'll never make anything.
Timo Ruiter
Advisor

Re: VI

Hi there,

Shifting 7 lines is very simple, just type:

7>>

when you are on the first line you want to shift.

Also, you can use an ex(1) command, like:

23,30>

which will shift lines 23 to 30 (inclusive) one shiftwidth to the right. Not that you use only one '>' in this case.

Hope that helps,
Timo
Confucius say: he who runs through forrest in straight line will hit tree
Timo Ruiter
Advisor

Re: VI

Sorry that ex command should be:

:23,30>

Timo
Confucius say: he who runs through forrest in straight line will hit tree
SAM_24
Frequent Advisor

Re: VI

Thanks Dirk. I didn't know that it is very simple.
Never quit