vi commands

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

vi commands

sampei02@tiscali.it
I need to understand if VI can permit these operations:

1- to move cursor to next word, does it exist key-bindings to make it?
2- select specific part of text to copy it and to past it to another area inside the same file.
3- to insert tabs for indentation in multiple row, e.g. to move “ if “ instructions group in C code; I usually follow these steps moving cursor at the beginning of first line: esc’ + ‘I’ , insert tab by press ‘tab’ key, ‘esc’ again, press ‘j’ (next row), esc’ + ‘I’ , ‘tab’ key, … If I had many rows it will occur much time, is there way to speed up?

Thanks



   

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vi commands

Tony Mechelynck
On Sun, May 6, 2018 at 10:15 AM, [hidden email]
<[hidden email]> wrote:
> I need to understand if VI can permit these operations:
>
> 1- to move cursor to next word, does it exist key-bindings to make it?
> 2- select specific part of text to copy it and to past it to another area inside the same file.
> 3- to insert tabs for indentation in multiple row, e.g. to move “ if “ instructions group in C code; I usually follow these steps moving cursor at the beginning of first line: esc’ + ‘I’ , insert tab by press ‘tab’ key, ‘esc’ again, press ‘j’ (next row), esc’ + ‘I’ , ‘tab’ key, … If I had many rows it will occur much time, is there way to speed up?
>
> Thanks

1. see :help w
2. see
        :help y
        :help :yank
        :help p
        :help P
        :help :put
        :help visual.txt
3. By selecting a rectangular block of text with Ctrl-V (in Normal
mode) then moving the cursor, I (that's capital i) will repeat the
text you insert (anything, including hard tabs) in front of the block
at every line. Similarly with A (append) to insert after every line of
the block.

...and BTW, a good way to get acquainted with Vim is to run the
vimtutor program.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vi commands

David Woodfall
In reply to this post by sampei02@tiscali.it
On Sunday 6 May 2018 10:15,
[hidden email] <[hidden email]> put forth the proposition:
>I need to understand if VI can permit these operations:

See :help movement

>1- to move cursor to next word, does it exist key-bindings to make it?
>2- select specific part of text to copy it and to past it to another area inside the same file.
>3- to insert tabs for indentation in multiple row, e.g. to move “ if “ instructions group in C code; I usually follow these steps moving cursor at the beginning of first line: esc’ + ‘I’ , insert tab by press ‘tab’ key, ‘esc’ again, press ‘j’ (next row), esc’ + ‘I’ , ‘tab’ key, … If I had many rows it will occur much time, is there way to speed up?
>
>Thanks

One way is to select the lines of code that you need indenting with
shift+v and scrolling down, then press >

-Dave

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vi commands

sampei02@tiscali.it
Oh It’s wonderful!
Do you know if it works for every VIM environment? I don't usually install GUI in Linux server.


> On 6 May 2018, at 23:07, David Woodfall <[hidden email]> wrote:
>
> On Sunday 6 May 2018 10:15,
> [hidden email] <[hidden email]> put forth the proposition:
>> I need to understand if VI can permit these operations:
>
> See :help movement
>
>> 1- to move cursor to next word, does it exist key-bindings to make it?
>> 2- select specific part of text to copy it and to past it to another area inside the same file.
>> 3- to insert tabs for indentation in multiple row, e.g. to move “ if “ instructions group in C code; I usually follow these steps moving cursor at the beginning of first line: esc’ + ‘I’ , insert tab by press ‘tab’ key, ‘esc’ again, press ‘j’ (next row), esc’ + ‘I’ , ‘tab’ key, … If I had many rows it will occur much time, is there way to speed up?
>>
>> Thanks
>
> One way is to select the lines of code that you need indenting with
> shift+v and scrolling down, then press >
>
> -Dave
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> --- You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vi commands

sampei02@tiscali.it
In reply to this post by Tony Mechelynck
About point 2, these commands copy rows or words while I’m interesting to copy and paste marking both beginning and end of block, is’t possible?

> On 6 May 2018, at 23:01, Tony Mechelynck <[hidden email]> wrote:
>
> On Sun, May 6, 2018 at 10:15 AM, [hidden email]
> <[hidden email]> wrote:
>> I need to understand if VI can permit these operations:
>>
>> 1- to move cursor to next word, does it exist key-bindings to make it?
>> 2- select specific part of text to copy it and to past it to another area inside the same file.
>> 3- to insert tabs for indentation in multiple row, e.g. to move “ if “ instructions group in C code; I usually follow these steps moving cursor at the beginning of first line: esc’ + ‘I’ , insert tab by press ‘tab’ key, ‘esc’ again, press ‘j’ (next row), esc’ + ‘I’ , ‘tab’ key, … If I had many rows it will occur much time, is there way to speed up?
>>
>> Thanks
>
> 1. see :help w
> 2. see
>        :help y
>        :help :yank
>        :help p
>        :help P
>        :help :put
>        :help visual.txt
> 3. By selecting a rectangular block of text with Ctrl-V (in Normal
> mode) then moving the cursor, I (that's capital i) will repeat the
> text you insert (anything, including hard tabs) in front of the block
> at every line. Similarly with A (append) to insert after every line of
> the block.
>
> ...and BTW, a good way to get acquainted with Vim is to run the
> vimtutor program.
>
> Best regards,
> Tony.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vi commands

Keith Edmunds
> About point 2, these commands copy rows or words while I’m interesting
> to copy and paste marking both beginning and end of block, is’t possible?

If you use ^V instead of shift-V, you can mark the start and end points.
--
"One can never know for sure what a deserted area looks like" -
George Carlin
   

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.