Vim ?? What's that ??
Vim is an editor to create or edit a text file.
There are three modes in vim.
Insert Mode:
Changing mode from one to another
From command mode to insert mode type a/A/i/I/o/O ( see details below)
From insert mode to command mode type Esc (escape key).
Command Mode:
Last Line Mode:
Short Description Video - Vim Editor command
By Linux-Care
Vim is an editor to create or edit a text file.
There are three modes in vim.
- Insert mode - Adding text
- Command mode - Modifying text
- Last line mode - Save & quit
Insert Mode:
Changing mode from one to another
From command mode to insert mode type a/A/i/I/o/O ( see details below)
From insert mode to command mode type Esc (escape key).
Command Mode:
- yy - to copy a line.
- yw - to copy a word.
- yl - to copy a letter.
- dd - to delete a line.
- dw - to delete a word.
- dl - to delete a letter.
- x - to delete a letter.
- D - to delete from cursor location towards end of line.
- cc - to cut a line.
- cw - to cut a word.
- cl - to cut a letter.
- p - to paste below the cursor.
- P - to paste above the cursor.
- u - to undo the changes.
- ctrl + r - to redo the changes.
- G - goto last line of the file.
- gg - goto first line of the file.
- /string - forward search for text.
- ?string - backward search for text.
- zz - to save & quit.
- d) - delete from cursor location towards end of the file.
- d( - delete from cursor location towards start of the file.
- e - goto end of next word.
- b - goto start of previous word.
- n - search.
Last Line Mode:
- noh - to remove text highlight.
- wq / x - save & quit.
- wq! / x! - save & quit forcefully.
- q - quit.
- q! - quit forcefully.
- w - to save.
- w! - save forcefully.
- set nu - to set numbers.
- set nonu - to remove numbers.
- !pwd - to know path.
- !tty - to know terminal.
- :w anyname - for save as.
- :set ic - search case sensitive.
- :set noic - ignores case sensitive.
- vim + line number filename - search and go to specific line.
- vim + /string filename - search and go to specific string.
- vim -o file1 file 2 - modify two files.
- nl filename - indicates number lines.
Short Description Video - Vim Editor command
By Linux-Care
properly explained .. nice !!!
ReplyDeleteThank You Deepti :)
Delete