Difference between revisions of "Vim"
From Wasya Wiki
Line 6: | Line 6: | ||
=== syntax highlight === | === syntax highlight === | ||
:set syntax=html | :set syntax=html | ||
+ | |||
+ | === find and replace === | ||
+ | :%s/foo/bar/g |
Revision as of 22:13, 8 August 2018
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