Differences between version 6 and predecessor to the previous major change of VimHowto.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 6 | Last edited on Thursday, July 3, 2003 3:45:25 am | by MisterHyde | Revert |
Older page: | version 4 | Last edited on Tuesday, May 13, 2003 3:14:55 pm | by SamJansen | Revert |
@@ -15,9 +15,9 @@
After leaving insert mode, Vim returns back to normal mode. The key to normal mode is the colon key, ':'. Pressing the colon key allows commands to be typed into Vim. Some simple commands follow:
:w[[rite] Write, or save the current file.
- :q[[uit] Quit Vim (will not exit of
there are unsaved changes)
+ :q[[uit] Quit Vim (will not exit if
there are unsaved changes)
:e[[dit] <file> Edit/load a new file.
:help <topic> Open up a help window displaying topic.
The above commands are usually just abbreviated ':w' and such, there isn't really any point in typing ':write'.
@@ -37,8 +37,17 @@
> Indent the current selection.
< De-indent the current selection.
While in normal mode, pressing 'p' will paste.
+
+----
+! Search and replace
+
+In normal mode,
+ :s/(search regex)/(replace string)/
+to replace text on the current line, or
+ :%s/regex/replace/
+for the whole buffer.
----
! Navigating Multiple Files