Sunday, May 1, 2011

VIM fundamental



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:


  1. :help to open Help page.
  2. Navigate:  using 'h-j-k-l' for 'left-down-up-right'
  3. :q -Quit
  4. :q! -Quit without saving  
  5. :set mouse=a Set mouse as in GUI editer   
  6. d  Delete one character:   
  7. dd -Delete a row:   
  8. y -copy
  9. yy -copy a line
  10. U: undo last change
  11. set number ->set line number
  12. set nonumber
  13. :rs/foo/bar/Substitute foo with barr 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