VIM

https://fatosmorina.com/wp-content/uploads/2017/06/vim.png

VIM

IT IS MODAL EDITOR(DIFFERENT OPERATING MODE)

  • Normal mode(navigating around file)
    • (i)Insert mode(esc)
    • (r)replace mode(esc)
    • (v)visual mode(esc)
      • line mode(keyboard control)
      • black mode(mouse control)

code

Normal mode

:q —> to quit a windows
:q! —> to quit entire vim
:w —> to save file
:w *.txt —> to save new file
/words —> to search the words in that particular file
n —> to select the next words of matched pattern.
. —> to repeat the same editing.
ci —> to edit the words inside the paranthesis.


h —> to move cursor left
l —> to move cursor right
j —> to move cursor down
k —> to move cursor up
u —> undo the change
y —> to copy the character
yw —> to copy the words
p —> to past the words
v —> to enable visual mode of selection of text
o —> to open a line for editing


b —> backspace the cursor by a words
G —> to move at the end of the words
g —> to move at the first of the words
dw —> to delete the words
ce —> to delete the word and back to insert mode
x —> to delete the character
r —> to replace the words

Insert mode

To move from Normal mode to Insert mode you can do following things.

  1. press ’s'
  2. press ‘i’
  3. presh ‘gh’

To escape back to normal mode you may use ’esc’ key.