Mercurial > vim
comparison runtime/doc/usr_05.txt @ 43:f55897d6921d v7.0026
updated for version 7.0026
author | vimboss |
---|---|
date | Wed, 29 Dec 2004 21:03:02 +0000 |
parents | cc049b00ee70 |
children | 8b0ee9d57d7f |
comparison
equal
deleted
inserted
replaced
42:c75153d791d0 | 43:f55897d6921d |
---|---|
1 *usr_05.txt* For Vim version 7.0aa. Last change: 2004 Aug 27 | 1 *usr_05.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 |
2 | 2 |
3 VIM USER MANUAL - by Bram Moolenaar | 3 VIM USER MANUAL - by Bram Moolenaar |
4 | 4 |
5 Set your settings | 5 Set your settings |
6 | 6 |
148 defines the "Q" command to do formatting with the "gq" operator. This is how | 148 defines the "Q" command to do formatting with the "gq" operator. This is how |
149 it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you | 149 it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you |
150 will not need it. | 150 will not need it. |
151 | 151 |
152 > | 152 > |
153 vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc> | 153 vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR> |
154 | 154 |
155 This is a complicated mapping. It will not be explained how it works here. | 155 This mapping yanks the visually selected text and searches for it in C files. |
156 What it does is to make "p" in Visual mode overwrite the selected text with | 156 This is a complicated mapping. You can see that mappings can be used to do |
157 the previously yanked text. You can see that mappings can be used to do quite | 157 quite complicated things. Still, it is just a sequence of commands that are |
158 complicated things. Still, it is just a sequence of commands that are | |
159 executed like you typed them. | 158 executed like you typed them. |
160 | 159 |
161 > | 160 > |
162 if &t_Co > 2 || has("gui_running") | 161 if &t_Co > 2 || has("gui_running") |
163 syntax on | 162 syntax on |