About: Search for visually selected text   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Nothing is needed if you want to search for the word under the cursor, just press *. To search for visually selected text, put this line in your vimrc: vnoremap // y/" The :vnoremap command maps // in visual mode to run the commands y/ " which copies the visually selected text, then starts a search command and pastes the copied text into the search. represents Ctrl-R and represents carriage return (Enter). Note that this mapping will search selected text as a regular expression. Thus certain characters like '.' ([. vnoremap // 'y/\V'.escape(@",'\').''

AttributesValues
rdfs:label
  • Search for visually selected text
rdfs:comment
  • Nothing is needed if you want to search for the word under the cursor, just press *. To search for visually selected text, put this line in your vimrc: vnoremap // y/" The :vnoremap command maps // in visual mode to run the commands y/<c-r> " <cr></cr> </c-r> which copies the visually selected text, then starts a search command and pastes the copied text into the search. represents Ctrl-R and represents carriage return (Enter). Note that this mapping will search selected text as a regular expression. Thus certain characters like '.' ([. vnoremap // 'y/\V'.escape(@",'\').''
Version
  • 6(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 168(xsd:integer)
Category
  • Searching
Author
  • Raymond Li
Complexity
  • basic
Created
  • 2001(xsd:integer)
ID
  • 171(xsd:integer)
NEXT
  • 172(xsd:integer)
Rating
  • 83(xsd:integer)
abstract
  • Nothing is needed if you want to search for the word under the cursor, just press *. To search for visually selected text, put this line in your vimrc: vnoremap // y/" The :vnoremap command maps // in visual mode to run the commands y/<c-r> " <cr></cr> </c-r> which copies the visually selected text, then starts a search command and pastes the copied text into the search. represents Ctrl-R and represents carriage return (Enter). To use the mapping, visually select the characters that are wanted in the search, then type // to search for the next occurrence of the selected text. Then press n to search for the next occurrence. Note that this mapping will search selected text as a regular expression. Thus certain characters like '.' ([. help /.]) or '*' ([ help /*]) have special meaning. If you want to search as exact text, not a regular expression, use \V ([ help /\V]) at the start of the search pattern to turn on "very no-magic" mode: vnoremap // y/\V" This still will not work as intended if your selected text contains any '\' characters. To also handle those, you need an expression mapping to escape the backslashes: vnoremap // 'y/\V'.escape(@",'\').''
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software