OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:43 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: how does vim distinguish ESC key from the escape sequenc
PostPosted: Thu Aug 30, 2018 7:45 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

Sik wrote:
I honestly hate how terminals handle keystrokes for anything that isn't a normal character. I get it about old terminals, but how come none of the extensions over time ever fixed this mess? >​:​|


That's easy: it'd be like building a cable car on Mount Everest to make it easy for people to reach the top. Anything that makes the user interface slightly more user-friendly removes the ability for people to brag about mastering one of the worst possible user interfaces ever designed, so it'd ruin the entire point of using VIM in the first place.


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: how does vim distinguish ESC key from the escape sequenc
PostPosted: Thu Aug 30, 2018 8:58 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
My, aren't we confrontational today?

Nobody is trying to force you into using Vim, or anything other than your editor (or language, or compiler, or operating system, or interface in general) of choice.

Could you please refrain from calling those who made other choices than you names?

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: how does vim distinguish ESC key from the escape sequenc
PostPosted: Thu Aug 30, 2018 11:56 am 
Offline
Member
Member
User avatar

Joined: Wed Aug 17, 2016 4:55 am
Posts: 251
Yeah, my complaint wasn't even about vim (which I don't like but that's another topic), it was about terminal protocols themselves. It makes it a freaking pain to make TUI programs. It's not just the users who get screwed over it, it's also the developers who now have to restrict what they're allowed to do. That's not fun.

Amusingly, my suggestion would have made things easier for vim (as it could just check for CAN instead of doing the timing stuff and hope the stream isn't too laggy to screw that up). One can dream.


Top
 Profile  
 
 Post subject: Re: how does vim distinguish ESC key from the escape sequenc
PostPosted: Fri Feb 01, 2019 6:25 pm 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 812
Location: Hyperspace
Wow! So much waffle! And this from a guy who's waffled more than anyone else today! :twisted:

The simple answer to the original question is plainly visible if you use any vi in a TTY: it waits to see if there's a character coming immediately after the escape.

I've repeatedly found that delay to be a nuisance, temporarily confusing and alarming me as the editor gets behind my typing, and I curse the day DEC decided to use the escape character in their key sequences. It throws off my train of thought!

As for why it's such a long delay, I can only imagine it's designed to work with 75 baud serial lines, or maybe laggy ssh sessions.

_________________
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group