0% found this document useful (0 votes)
28 views

Vim (Vi Improved) For Dummies: Prepared By: Rituparna Sonowal B.Tech (IT)

This document provides a summary of basic commands for the Vim text editor. It outlines commands for starting and editing files, entering and moving text, basic editing functions like deleting and replacing text, moving around within a file using line numbers and screen positions, and closing and saving files. The document is intended as an introduction to basic Vim functionality for new users.

Uploaded by

Ranjan Sonowal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Vim (Vi Improved) For Dummies: Prepared By: Rituparna Sonowal B.Tech (IT)

This document provides a summary of basic commands for the Vim text editor. It outlines commands for starting and editing files, entering and moving text, basic editing functions like deleting and replacing text, moving around within a file using line numbers and screen positions, and closing and saving files. The document is intended as an introduction to basic Vim functionality for new users.

Uploaded by

Ranjan Sonowal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Vim(vi improved) For dummies

Prepared By : Rituparna Sonowal B.Tech(IT)

STARTING vi vi filename edit a file named "filename" vi newfile create a new file named "newfile"

ENTERING TEXT i a insert text left of cursor append text right of cursor

MOVING THE CURSOR h j k l left one space down one line up one line right one space

BASIC EDITING x nx X dw ndw dd ndd D r cw ncw C o O J nJ u U delete character delete n characters delete character before cursor delete word delete n words delete line delete n lines delete characters from cursor to end of line replace character under cursor replace a word replace n words change text from cursor to end of line insert blank line below cursor (ready for insertion) insert blank line above cursor (ready for insertion) join succeeding line to current cursor line join n succeeding lines to current cursor line undo last change restore current linez

MOVING AROUND IN A FILE w forward word by word b backward word by word $ to end of line 0 (zero) to beginning of line H to top line of screen M to middle line of screen L to last line of screen G to last line of file 1G to first line of file <Control>f scroll forward one screen <Control>b scroll backward one screen <Control>d scroll down one-half screen <Control>u scroll up one-half screen n repeat last search in same direction N repeat last search in opposite direction

CLOSING AND SAVING A FILE ZZ :w :q! save file and then quit save file discard changes and quit file

THAN

K YOU !

You might also like