Difference between revisions of "Vim"
From Wasya Wiki
(Created page with "Why not use tabs (introduced in Vim 7)? You can switch between tabs with :tabn and :tabp, With :tabe <filepath> you can add a new tab; and with a regular :q or :wq you close a...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | === multiple buffers and tabs === | ||
+ | |||
Why not use tabs (introduced in Vim 7)? You can switch between tabs with :tabn and :tabp, With :tabe <filepath> you can add a new tab; and with a regular :q or :wq you close a tab. If you map :tabn and :tabp to your F7/F8 keys you can easily switch between files. | Why not use tabs (introduced in Vim 7)? You can switch between tabs with :tabn and :tabp, With :tabe <filepath> you can add a new tab; and with a regular :q or :wq you close a tab. If you map :tabn and :tabp to your F7/F8 keys you can easily switch between files. | ||
+ | |||
+ | === syntax highlight === | ||
+ | :set syntax=html | ||
+ | |||
+ | === find and replace === | ||
+ | :%s/foo/bar/g | ||
+ | |||
+ | === case insensitive search === | ||
+ | |||
+ | You can use the \c escape sequence anywhere in the pattern. For example: | ||
+ | |||
+ | /\ccopyright or /copyright\c or even /copyri\cght |
Latest revision as of 19:13, 22 March 2022
Contents
multiple buffers and tabs
Why not use tabs (introduced in Vim 7)? You can switch between tabs with :tabn and :tabp, With :tabe <filepath> you can add a new tab; and with a regular :q or :wq you close a tab. If you map :tabn and :tabp to your F7/F8 keys you can easily switch between files.
syntax highlight
:set syntax=html
find and replace
:%s/foo/bar/g
case insensitive search
You can use the \c escape sequence anywhere in the pattern. For example:
/\ccopyright or /copyright\c or even /copyri\cght