View Single Post
  #1   (View Single Post)  
Old 14th October 2018
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default vi (=nvi from base) prob.: a character declared printable a day keeps the cursor away

Default behaviour, vi testfile:
Code:
RRP: \xc2\xa329.99. You Save: \xc2\xa316.40
So I add the following to ~/.exrc
Code:
set print="¡¢£¤¥¦§¨©ª«¬¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
Let's try again, vi testfile:
Code:
RRP: £29.99. You Save: £16.40
Now we're talking...

I can also enter German umlaute in vi just by entering the ä-Key on my keyboard, for instance.

But there's a catch! For each character contained in the 'set print' statement (2nd 'Code:' block above) that I type into vi in INSERT mode the cursor moves one space to the right, away from its usual position. After typing sth. like this:
Code:
These are German umlaute:_
I end up with sth. like this:
Code:
These are German umlaute: äöü   _
(The underscore '_' indicates the cursor position after typing 'ä', 'ö', and 'ü' respectively.)


I'm not ruling out any misconfiguration or stupid mistake on my side. So my question to the pros here is, can anything be done about this annoying behaviour?
Reply With Quote