OpenLink Software

Usage stats on Newlines and nulls in Vim script

 Permalink

an Entity in Data Space: 134.155.108.49:8890

When is stored in a Vim variable/register/etc, it is stored as a NULL, and then translated back to a real newline under circumstances such as "put". Try inserting a newline in insert mode, i.e. ^V^J (or ^Q^J if you're using the mswin behavior). You will see a <00> show up. Now try these to help understand further: let @a = "a" . " " . "b" or let @a = "a" . "\x0a" . "b" and put it into the buffer using "ap or :put a You should see: a b "put" is especially smart about translating the newlines from NULLs back to 0x0a. Now do: call setline(".", @a) or call append("$", @a) You should see:

Identifier (URI)Rank
dbkwik:resource/klupo9DnzjYeEUHt1fOKZw==5.88129e-14
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] This material is Open Knowledge Creative Commons License Valid XHTML + RDFa
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Copyright © 2009-2012 OpenLink Software