Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

sir_lichtkind (5541)

  (email not shown publicly)

(brave) Perl monk from Eastern Germany
Saturday November 28, 2009
09:47 AM

User is (should be) King

[ #39957 ]
In recent Kephra refactorings, I changed a behaviour of the autoconverter. It works now a bit differently then in common editors, but it is not a big thing. The mindset behind it I find important. It's also very satisfying to see it working in Kephra the way i feel is right.

The topic is EOL, which is the 3 letter acronym for the end of line character, the things you usually name in perl "\r\n". And what is an autoconverter? That is an algorithm that changes a file content while loading it into the editor, before you can touch the text. Don't worry, it will be done only in case you request it by changing the default settings for opened files (file > defaultsettings > open). Sometimes its what you want and I believe in freedom.

However I prefer to notice it, when my editor changes something without asking. I prefer it also to redo this kind of change easily. but please no popups or special widgets or visual noise of any kind.

The solution I found was embarrassingly simple. after loading the file I reset the undo history and make the formater after it, followed by a save call. You will notice that a formater did something, because the redo button has color. normally the button is disabled when you open a file. and if you like, just push the redo button. I love it.

There are many details more ...
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.