In visual mode, / and ? will update the visual selection just like any other cursor-movement command. In order to actually search within the visual selection, you will need to use the \%V atom, or use the markers defined by the visual selection with \%>'< and \%<'> atoms. This is best done by leaving the visual selection with <esc> before entering your search. You may want to consider a mapping to automatically leave visual selection and enter the appropriate atom(s). For example:
Vim documentation: syntax - 0 views
-
\z1 ... \z9 */\z6* */\z7* */\z8* */\z9* *E66* *E67* Matches the same string that was matched by the corresponding sub-expression in a previous start pattern match.
mapping Tab in the command line - vim_use | Google Groups - 0 views
-
set wildmenu set wildmode=list:longest,full set wcm=<C-Z> map <leader>a :b <C-Z>
Vim: My new "IDE" | Justin Lilly - 0 views
Opening every buffer in its own tab - vim_use | Google Groups - 0 views
-
s Ben Fritz says, all you need is wildmenu completion on :b <Tab> An example, to show just how powerful this is: :set wildmenu wildmode=full
automatic type along completion as in Notepad++? - vim_use | Google Groups - 0 views
-
augroup foo au! au CursorMovedI,InsertEnter * if search('\k\{2,}\%#\k\@!','ncb') | \ call feedkeys("\<c-n>\<c-p>","t") | endif augroup END inoremap <expr><cr> pumvisible()?"\<c-n>\<c-y> ":"\<cr>" Pressing return-key will accept the first match. Be ready to exit the editor.
Different colors in statusline? - vim_use | Google Groups - 0 views
-
> Hello, Is there a way to hilight different portions of statusline > using different colors? Thanks!
Search for visually selected text - Vim Tips Wiki - a Wikia wiki - 0 views
-
With the following, you can use g/ (or g?) to search forwards (or backwards) for the currently selected text.
Applying substitutes to a visual block - Vim Tips Wiki - a Wikia wiki - 0 views
-
Applying substitutes to a visual block
Daily Vim: Vim to Postscript - 0 views
-
Here's a little Vim trick that might be of interest. If you're on a non-Windows machine, you can make the Vim hardcopy command print to a postscript file instead of a real printer. Try issue the following::hardcopy > file.ps
Vim documentation: eval - 0 views
-
:au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
shortcut for ex ranges - vim_use | Google Groups - 0 views
-
> Hi, > After reading the thread on asynchronous processes I was just looking > at the help for the ! command which I rarely use, and after playing > with it I realized that it translates a motion from normal mode into a > range for an ex command, i.e. doing !2j gives you an ex command line > of :.,+2! to start your filter with. This made me wonder: Is there a > way to do this without the filter? In other words, instead of having > to type :.,+2s I could get there with a 2j combined with something. I > realize I can do it with the ! itself by just backspacing over the ! > at the end of the ex command, but is there a more 'official' way to do > this? No, there isn't. But in your example, you know the number of lines you want to get in your range, so you can type 3: to get :.,.+2 In general: !2j has the form {operator}{motion} :h operator You can create a custom operator (and name it e.g. "g:") with :h g@ Once it has been done here (from Jan 2008, see the whole discussion) http://groups.google.com/group/vim_dev/msg/c6fb56645c188244 The details are somewhat tricky (if this reads better than ugly ...).
Daily Vim: Repeat Last Command Line - 0 views
-
Repeat Last Command Line To repeat the last command-line given in ex mode, you can simply enter a count followed by "@:".
Preexisting code indentation - Vim Tips Wiki - a Wikia wiki - 0 views
-
lternative: if your file has indent 4 and you want an indent of 3 and gg=G is not working as expected, try :set inde=indent(v:lnum)/4*3 then go ahead with the well known gg=G use tabs or spaces, doesn't matter
‹ Previous
21 - 40 of 42
Next ›
Showing 20▼ items per page