Answers for "vim commands"

C
5

vim commands

************* VIM commands ***************


1. shift v ---> starts visual mode for selecting the lines and we can perform operation on that

2. y ---> yank/copy the visual lines

3. p ---> paste the yanked lines

4. esc :u ---> undo

5. esc :start_line_no,end_line_no.y ---> copy the lines from "start_line_no" to "end_line_no"

6. = % ---> indentation

7. esc :se ic ---> set ignore case

8. esc :se nu ---> set line numbers in the file

9. % (i.e; shift 5) ---> takes us to the closing or ending scope of a function/snippet

10. ctrl } ---> takes us to the definition of the tag

11. shift g ---> end of file

12. esc :line_no ---> takes us to the line number in the file

13. esc /keyword ---> search for a keyword in bottom up fashion [OR]  backward search

14. esc ?keyword ---> search for a keyword in top down fashion [OR] forward search

15. esc :q! ---> trashes all changes and quit the file

16. esc :w ---> write the changes to the file

17. esc :wq ---> write the changes to the file and exit the file

18. dd ---> delete single/multiple line(s). 2dd to delete two lines, number can be changed for deleting the number of consecutive lines, like; 3dd.
Posted by: Guest on September-07-2021
7

vim commands

vim filename 
i
*Insert/Edit Text*
*Esc*
:wq       (save the file and exit to commands)
Posted by: Guest on June-06-2020
3

vim insert

i - insert before the cursor

I - insert at the beginning of the line

a - insert (append) after the cursor

A - insert (append) at the end of the line

o - append (open) a new line below the current line

O - append (open) a new line above the current line

ea - insert (append) at the end of the word
Posted by: Guest on March-27-2020
4

how to use vim

:help
Posted by: Guest on November-24-2020
2

edit in vim

Press i letter on your keyboard to start editing (Insert Mode). When youre done press the ESC key to exit insert mode
Posted by: Guest on September-08-2020

Code answers related to "C"

Browse Popular Code Answers by Language