What is VIM? is VI iMprovement , and advanced of VIM.
Whenever you jump into Linux or Unix-like environment , Hence if you need to manipulate as coding/ configure with any text file (that contain the ASCII character ) with any extension like conf, xml, c, cpp....
VIM has 2 modes: Command(esc)/Insert(i)/Visual(v)
Following are some basic manupilations:
- :help to open Help page.
- Navigate: using 'h-j-k-l' for 'left-down-up-right'
- :q -Quit
- :q! -Quit without saving
- :set mouse=a Set mouse as in GUI editer
- d Delete one character:
- dd -Delete a row:
- y -copy
- yy -copy a line
- U: undo last change
- set number ->set line number
- set nonumber
- :rs/foo/bar/a Substitute foo with bar. r determines the range and a determines the arguments. (r=nothing : current line , r=number at the line,r=% whole file)
Update more later
No comments:
Post a Comment