Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Terminal text editors are an evolutionary dead-end

67,839 görüntüleme • 11 ay önce •via X (Twitter)

60 Yorum

HSVSphere profil fotoğrafı
HSVSphere11 ay önce

This is overall a benefit as there is no way of a program assuming the physical keys are what you want (many games do, even in text input boxes, latest one that I have interacted with that did was the OpenTTD console) which falls into the "make your API hard to misuse" but there

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Good games distinguish using physical key codes in actual gameplay, and gracefully giving you text events in input boxes. Point being - terminal programs just don't have this ability at all unless they (and emulator too!) implement some kitty protocol that doesn't really do it all that well and has its own quirks.

HSVSphere profil fotoğrafı
HSVSphere11 ay önce

I don't want the game to do that, as I have no idea where the [ or whatever key is on my keyboard when it is using the US layout. Just translate it all and let me remap, don't assume everyone knows the US layout.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Ah yeah I know what you mean. As a kid, you would open a game key remap menu, and it would show WASD and I have no fucking clue what WASD is because my keyboard doesn't have English keycaps :D But still, in a lot of cases a program that has enough information can gracefully handle keyboard layout change and not poop itself like neovim or helix do

HSVSphere profil fotoğrafı
HSVSphere11 ay önce

I guess the best thing would be to use the physical location _and_ show the localized keycaps

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Damn it works much better with youtube thumbnail

Chris McGee profil fotoğrafı
Chris McGee11 ay önce

Thanks for posting this. I hope that someday we can move away from the vt100 and into the modern and multilingual desktop world with our tools.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

We already sorta did I guess. Neovim is very niche outside of very narrow tech bubble, and helix (the other editor from the video) is researching gui options, which would fundamentally solve this issue.

Chris McGee profil fotoğrafı
Chris McGee11 ay önce

Editors are one class of tools that can be run in a terminal. I’m thinking of all the other classes of tools out there.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

oh yeah it's also an issue with terminal mail clients, database cliens, and pretty much everything else.

Chris McGee profil fotoğrafı
Chris McGee11 ay önce

Worse is that they all end up doing inconsistent things with their own terminal control libraries. It’s like the DOS days all over again. Every app works and looks different.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Theoretically, there could be something like kitty keyboard protocol but better, that just straight up forwards physical key codes as is without any preprocessing. But then you'll have 1.5 terminals and programs implementing it maybe in 5 years. And it will still have restrictions and edge cases that aren't handled

Pepe Aoriano profil fotoğrafı
Pepe Aoriano11 ay önce

“Dead end?” This is rage bait. If someone is using a non English key map they could either implement their input protocol (a-la kitty) or just figure out an input daemon (backed plugged). Terms stick to chars 'cause they're the cross-device (non-just OS) lingua franca. Muted

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Why non of the major terminal text editors just do it then? :)

Aram Hăvărneanu profil fotoğrafı
Aram Hăvărneanu11 ay önce

My text editor, Acme, is from 1994, but it's still using 20+ years more modern technology than what people consider good today. It's embarrassing.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Да-да, только теперь ctrl-c/ctrl-v надо отдельно маппить и настраивать. Всё те же костыли. И ctrl-z свернёт редактор кек

Ereechepeine Veeph profil fotoğrafı
Ereechepeine Veeph11 ay önce

И ctrl+z нихуя не свернёт.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

почему по-твоему тебя заставляют делать шифт+инсерт ) Это всё костыли. Суть в том, то терминальные приложения не видят нажатия кнопок на клавиатуре. Все способы это обойти ломаются, если на них посмотреть не под тем углом. У mc edit свой набор воркараундов. Здесь нет магии, которую мейнтейнеры неовима или любой другой программы могут просто сделать и все починить, к сожалению

Ereechepeine Veeph profil fotoğrafı
Ereechepeine Veeph11 ay önce

Вот не надо искать проблему не там, где она находится на самом деле. На самом деле все комбинации Ctrl+ и Alt+ должны выдавать нажатия в латинице, как того весь софт и ожидает.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Ты наверное еще думаешь, что на свете бывают только две раскладки - US ANSI и русский ЙЦУКЕН :) Чел, ты либо не понял сути ограничений, либо тебя оно почему-то лично задело.

Ereechepeine Veeph profil fotoğrafı
Ereechepeine Veeph11 ay önce

Ты как раз сам кое-чего не понял: раскладки должны быть для ввода букв, и только для ввода букв. А когда никаких букв подходящих нету в раскладке, то пусть отдают ASCII, чтобы не ломать UI.

Olex (Solo gamedev Diablo-like) 🇺🇸🇺🇦 profil fotoğrafı
Olex (Solo gamedev Diablo-like) 🇺🇸🇺🇦11 ay önce

Just like chopsticks and non-alphabet languages. :P

Omar Mahdi profil fotoğrafı
Omar Mahdi11 ay önce

Terminals, as a whole, are a dead end. The industry moving back to terminals (e.g., codex) is stupid. They are a subset of GUI programs with historical baggage we don't need. GUIs and human computer interfaces have barely been explored, and yet we are stuck in the 70s 💀.

Caleb Maclennan profil fotoğrafı
Caleb Maclennan11 ay önce

It's not a dead end! I use a Dvorak variant as my layout but frequently want to insert and edit Turkish or Russian. To do this setup a keymap so that all the VIM keys still work but inserted text is mapped to the other language. Here is my DVP→JCU map:

Petr Skocik profil fotoğrafı
Petr Skocik11 ay önce

Very nice vid but I disagree. Terminal editors are quite fit for their purpose as programmer editors capable of thriving in minimalist environments. Programmers use English. I'm bilingual too & my 2nd lang, Czech, kinda sucks with vim too. Solution: I just don't use vim with it.

Jesse S profil fotoğrafı
Jesse S11 ay önce

I'm familiar with the device input mapping (scan codes in this case) across Linux/macOS/Windows and how to solve this problem, I was scrolling before bed and saw this post, so I'll share some code tomorrow which handles everything seamlessly. (I code in C++ mainly, but same same)

Franek Kopara profil fotoğrafı
Franek Kopara11 ay önce

How you want to read physical key when you connect using ssh?

Deus Lemmus『旅鼠神』 profil fotoğrafı
Deus Lemmus『旅鼠神』11 ay önce

Right. I'll just keep using emacs. I have no issues with any glyphs, keyboards, tabs or anything special. thanks though.

meatball profil fotoğrafı
meatball11 ay önce

i love vim and agree

Multiple Systems profil fotoğrafı
Multiple Systems11 ay önce

i fully agree with what you said given that i'm using my own keyboard layout that is not used by almost anyone else:

MoiSoto 🪐 profil fotoğrafı
MoiSoto 🪐11 ay önce

Very interesting video. But are there real people that only use Terminal for “EVERYTHING”? I mean, I’m a terminal junky but even I only use for specific technical stuff.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

With text editors in particular, it's quite stupid to use one text editor "only for code" and then have to have some other editor for writing "normal text" :/

T. Vuorinen profil fotoğrafı
T. Vuorinen11 ay önce

I like my Micro, but sometimes it doesn't recognize the keyboard correctly. Then again, WSL shells are absolutely garbage in that regard anyways, which carries to GUI software too. Oh the workarounds!

Milen Todev profil fotoğrafı
Milen Todev11 ay önce

I use vim keybindings in VSCode and face same issues with the Bulgarian language.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

It's because vim plugin for vscode goes through actual neovim afaik, and that one needs characters instead of key codes, so you just get screwed for the same reason lol

Milen Todev profil fotoğrafı
Milen Todev11 ay önce

yeah.. we have to spam layout change to keep using our native languages

Christopher / クリス profil fotoğrafı
Christopher / クリス11 ay önce

Couldn't we fix this via terminal emulators (and i think some do? Havent written TUIs in a while)? Although getting all terminal emulators to support that new protocol would also be a big pain

azeke profil fotoğrafı
azeke11 ay önce

bigger problem is that modal editors use [], ctrl+Letter and shift+Letter to begin with, how's that different from normie VS Code F4 I'm of half mind to dedicate time to remap Helix bindings for my 34-key latin-colemak+3 other different languages and stuff like this blocks me

Diego profil fotoğrafı
Diego11 ay önce

No, the problem is the terminal. It's not an editor issue.

Dmitry Suzdalev profil fotoğrafı
Dmitry Suzdalev11 ay önce

How would you do that in gui emacs? If I press "M-b" in ru layout, it still interprets it as "M-и" and fails to execute the command. I know that there's an option to switch the layout from within emacs, but that makes for 2 ways of switching: DE and emacs, meh.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

Emacs doesn't handle it because it's old and bad, not because it inherently can't, so it's kind of special haha :) Its workaround is to switch layouts inside if emacs, M-x set-input-method

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

I guess they just historically didn't do it and nobody bothered implementing it after emacs became a gui program. Or maybe for backwards compatibility, idk

Dmitry Suzdalev profil fotoğrafı
Dmitry Suzdalev11 ay önce

Yeah, maybe it's something like that. But at least it's possible!

Quiveron profil fotoğrafı
Quiveron11 ay önce

Good video

SimpleCoffee profil fotoğrafı
SimpleCoffee11 ay önce

I'm surprised no one made an updated protocol for terminals with better UI support. the VT standard should be updated for modern day. Perhaps with some client side scripting for better responses. Maybe asm-html, just the bare bones everything else can be built with scripting.

Victor Hugo profil fotoğrafı
Victor Hugo11 ay önce

Wouldn't a set of alias + the keymap solve the issue? I know it is not optimal, but no piece of software is perfect out of the box and always needs some config effort

KDev profil fotoğrafı
KDev11 ay önce

Works for me.

gordo profil fotoğrafı
gordo11 ay önce

i've been thinking about this ever since i watched it. how is the russian in your example using the terminal CLI at all? they certainly `cd` around, pipe programs, write some awk, etc. -- all ascii -- where they would have problems long before vim.

Railander profil fotoğrafı
Railander11 ay önce

would it still be a problem with something with mouse support?

Brian Spragge profil fotoğrafı
Brian Spragge11 ay önce

Is it because your terminal is set to Russian, and is it possible to terminal source a different language from within nvim, so that the terminal language changes and not necessarily the nvim language? That way, the terminal is expecting english and allows movement and <ctrl+[>.

Mastergrill profil fotoğrafı
Mastergrill11 ay önce

I'm interested in knowing how this issue could be solved. I'm curious to know if the physical keybinds can be passed through the terminal emulator directly to the terminal application.

Nuri Yuri (SP.QR) profil fotoğrafı
Nuri Yuri (SP.QR)11 ay önce

I'm not sure about this whole physical key stuff. I have french keyboard, the [ is on 5 and the ] is on the key after 0. I'd need to know where [ and ] are on qwerty to type them and get them act like it should.

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

The point is that if you knew physical key locations you wouldn't care about [ or ] - you would just know that it's that key in the top-right somewhere

Nuri Yuri (SP.QR) profil fotoğrafı
Nuri Yuri (SP.QR)11 ay önce

Yes of course, but for that we need the UI to show the virtual key from the keyboard because I wouldn't know that I have to press $ instead of ] ^^

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

This is not a problem to implement... Unless the program runs in a terminal, which circles back to the topic of my video :D

FallenOne profil fotoğrafı
FallenOne11 ay önce

seems like all the terminal emulator devs could band together and make a standardized "extension" that allows direct crossplatform keymap reading

Valentin Ignatev profil fotoğrafı
Valentin Ignatev11 ay önce

There is kitty keyboard protocol, but it's not that good, and also adoption is, well, you know

FallenOne profil fotoğrafı
FallenOne11 ay önce

I've had these problems you mentioned in the past, but my current approach (I speak croatian, basically latin english but with additional "č, ć, dž, đ, lj, nj, š, and ž" letters, what works is the "Linux Compose Key", and here is the cheatsheet:

FallenOne profil fotoğrafı
FallenOne11 ay önce

I don't think it works with cyrillic, but with compose key I can just hold alt, type " c' ", and get "ć"

Lolleka profil fotoğrafı
Lolleka11 ay önce

No. Terminal emulators and terminal text editors will forever be peak.

Benzer Videolar

Islamists are not on the same evolutionary branch.
0:29

Sensitive content

Islamists are not on the same evolutionary branch.

Ryan Williams

148,980 görüntüleme • 7 ay önce