正在加载视频...

视频加载失败

Terminal text editors are an evolutionary dead-end

67,839 次观看 • 11 个月前 •via X (Twitter)

60 条评论

HSVSphere 的头像
HSVSphere11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
HSVSphere11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
HSVSphere11 个月前

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

Valentin Ignatev 的头像
Valentin Ignatev11 个月前

Damn it works much better with youtube thumbnail

Chris McGee 的头像
Chris McGee11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
Chris McGee11 个月前

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 的头像
Valentin Ignatev11 个月前

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

Chris McGee 的头像
Chris McGee11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
Pepe Aoriano11 个月前

“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 的头像
Valentin Ignatev11 个月前

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

Aram Hăvărneanu 的头像
Aram Hăvărneanu11 个月前

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 的头像
Valentin Ignatev11 个月前

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

Ereechepeine Veeph 的头像
Ereechepeine Veeph11 个月前

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

Valentin Ignatev 的头像
Valentin Ignatev11 个月前

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

Ereechepeine Veeph 的头像
Ereechepeine Veeph11 个月前

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

Valentin Ignatev 的头像
Valentin Ignatev11 个月前

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

Ereechepeine Veeph 的头像
Ereechepeine Veeph11 个月前

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

Olex (Solo gamedev Diablo-like) 🇺🇸🇺🇦 的头像
Olex (Solo gamedev Diablo-like) 🇺🇸🇺🇦11 个月前

Just like chopsticks and non-alphabet languages. :P

Omar Mahdi 的头像
Omar Mahdi11 个月前

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 的头像
Caleb Maclennan11 个月前

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 的头像
Petr Skocik11 个月前

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 的头像
Jesse S11 个月前

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 的头像
Franek Kopara11 个月前

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

Deus Lemmus『旅鼠神』 的头像
Deus Lemmus『旅鼠神』11 个月前

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

meatball 的头像
meatball11 个月前

i love vim and agree

Multiple Systems 的头像
Multiple Systems11 个月前

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 🪐 的头像
MoiSoto 🪐11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
T. Vuorinen11 个月前

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 的头像
Milen Todev11 个月前

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

Valentin Ignatev 的头像
Valentin Ignatev11 个月前

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 的头像
Milen Todev11 个月前

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

Christopher / クリス 的头像
Christopher / クリス11 个月前

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 的头像
azeke11 个月前

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 的头像
Diego11 个月前

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

Dmitry Suzdalev 的头像
Dmitry Suzdalev11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
Dmitry Suzdalev11 个月前

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

Quiveron 的头像
Quiveron11 个月前

Good video

SimpleCoffee 的头像
SimpleCoffee11 个月前

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 的头像
Victor Hugo11 个月前

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 的头像
KDev11 个月前

Works for me.

gordo 的头像
gordo11 个月前

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 的头像
Railander11 个月前

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

Brian Spragge 的头像
Brian Spragge11 个月前

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 的头像
Mastergrill11 个月前

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) 的头像
Nuri Yuri (SP.QR)11 个月前

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 的头像
Valentin Ignatev11 个月前

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) 的头像
Nuri Yuri (SP.QR)11 个月前

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 的头像
Valentin Ignatev11 个月前

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 的头像
FallenOne11 个月前

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

Valentin Ignatev 的头像
Valentin Ignatev11 个月前

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

FallenOne 的头像
FallenOne11 个月前

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 的头像
FallenOne11 个月前

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

Lolleka 的头像
Lolleka11 个月前

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

相关视频

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

Sensitive content

Islamists are not on the same evolutionary branch.

Ryan Williams

148,980 次观看 • 8 个月前