Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Debian GNU/Linux Reference Guide
Prev Home Next

11.3.1 Vim hints

Read the "VIM - main help file" document by pressing <F1> while running the program.

     <F1>           Help
     <esc>          Back to normal mode
     V              Visual mode
     i              Insert mode
     :              Command-line commands
     :set tw=72     Set text width to 72
     <F11>          Insert (paste) mode
     :r! date -R    Insert RFC-822 date
     qa             Record keystrokes into register a
     q              Stop keystroke recording
     @a             Execute keystrokes from register a
     :edit foo.txt  Edit another file by loading foo.txt
     :wnext         Write current file and edit next file

q and @ can be used for simple macro recording and playback. For instance, to create a macro that inserts HTML italics tags around the word at the cursor, you could enter qii<i>^[ea</i>^[q (where ^[ is the ESC key). Then typing @i at the start of a word would add the tags <i> and </i>.

See also Using GnuPG with Vim, Section 14.4.2.


Debian GNU/Linux Reference Guide
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire