About: Repeat command on each line in visual block   Sponge Permalink

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

Another thing i do a lot is to record a quick macro in the "a" register and then play it back a number of times. while @@ can be used to repeat the last register used, my recorded macros sometimes use other registers so @@ doesn't necessarily give me the same results as @a. also, i have mapped ' to ` because i like to go to the precise location of my marks -- always -- and never to the beginning of the line. this leaves my ` key unused. so: " make ` execute the contents of the a register nnoremap ` @a vnoremap ` :normal @a as an example, say i have the following lines of java code: ^cf_"$r"

AttributesValues
rdfs:label
  • Repeat command on each line in visual block
rdfs:comment
  • Another thing i do a lot is to record a quick macro in the "a" register and then play it back a number of times. while @@ can be used to repeat the last register used, my recorded macros sometimes use other registers so @@ doesn't necessarily give me the same results as @a. also, i have mapped ' to ` because i like to go to the precise location of my marks -- always -- and never to the beginning of the line. this leaves my ` key unused. so: " make ` execute the contents of the a register nnoremap ` @a vnoremap ` :normal @a as an example, say i have the following lines of java code: ^cf_"$r"
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 83(xsd:integer)
Author
  • Salman Halim
Complexity
  • basic
Created
  • 2001-06-29(xsd:date)
ID
  • 84(xsd:integer)
NEXT
  • 85(xsd:integer)
Rating
  • 194(xsd:integer)
abstract
  • Another thing i do a lot is to record a quick macro in the "a" register and then play it back a number of times. while @@ can be used to repeat the last register used, my recorded macros sometimes use other registers so @@ doesn't necessarily give me the same results as @a. also, i have mapped ' to ` because i like to go to the precise location of my marks -- always -- and never to the beginning of the line. this leaves my ` key unused. so: " make ` execute the contents of the a register nnoremap ` @a then, in keeping with the visual . above, i did the same for the ` -- is thexecutes @a once on each highlighed line. vnoremap ` :normal @a as an example, say i have the following lines of java code: public String m_asdf; public String m_lkhj; public int m_hjkhjkh; and, for some reason, i need to get the following: "asdf" "lkhj" "hjkhjkh" I record the following into a: ^cf_"$r" the ^ is because my java code is indented and i don't want to go to column 0 and the is an actual escape i hit to exit insert mode. then, i simply select (visually) the other lines (only two in case -- admittedly not an overly useful example) and just hit `.
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