About: Graphics and Drawing in vimscript   Sponge Permalink

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

The title of this proposed tip is a bit ambitious: graphics and drawing? I'm not sure that this page is really useful without something showing how it could be useful. Echo is ok for an occasional message, but not for a GUI. Netrw is an example of a Vim script that does complex presentation, without echo. Several tips use echohl/echon, but none discuss it as a topic, but there are lots of Vim commands, and I'm not sure that a tip on each is useful. JohnBeckett (talk) 09:52, August 7, 2013 (UTC)

AttributesValues
rdfs:label
  • Graphics and Drawing in vimscript
rdfs:comment
  • The title of this proposed tip is a bit ambitious: graphics and drawing? I'm not sure that this page is really useful without something showing how it could be useful. Echo is ok for an occasional message, but not for a GUI. Netrw is an example of a Vim script that does complex presentation, without echo. Several tips use echohl/echon, but none discuss it as a topic, but there are lots of Vim commands, and I'm not sure that a tip on each is useful. JohnBeckett (talk) 09:52, August 7, 2013 (UTC)
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 0(xsd:integer)
Author
  • Q335r49
Subpage
  • /2013
Complexity
  • basic
Created
  • 2013-07-31(xsd:date)
ID
  • 0(xsd:integer)
NEXT
  • 0(xsd:integer)
abstract
  • The title of this proposed tip is a bit ambitious: graphics and drawing? I'm not sure that this page is really useful without something showing how it could be useful. Echo is ok for an occasional message, but not for a GUI. Netrw is an example of a Vim script that does complex presentation, without echo. Several tips use echohl/echon, but none discuss it as a topic, but there are lots of Vim commands, and I'm not sure that a tip on each is useful. JohnBeckett (talk) 09:52, August 7, 2013 (UTC) I found it useful because Vim comes so close to being a general purpose application scripting language but it is usally seen as lacks screen-drawing functions. There are patches that do expose the screen but they haven't been mainlined yet -- this method will obviously be obviated if they ever do. But it took me literally years to actually put all the parts together. For example, I have a nested list / dictionary editor that I've been sourcing for about 3 or 4 years which uses purely echo commands. This has the advantage of not needing to open a buffer and being a bit more straightfoward to code. The screen flicker is almost nonexistent even with the key held down, and certainly non-existent with single key presses. I went through a long time using "redraw! | echo" before I stumbled upon, randomly, the "se nomore" setting. And I went through a long time with it being monochromatic before I figured out that I can use "echon" to arbitrarily color texts -- so now the cursor selection is highlighted as "visual", I have different highlighting for types, and so on. It's really just a few lines of code away from being a nested file browser that doesn't need to load in a new tab. Basically, you can imagine it as a quick and dirty way for someone used to having minimal screen drawing functions to write some prettier scripts -- and it does actually work pretty well. Q335r49
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