HackerTrans
TopNewTrendsCommentsPastAskShowJobs

hou32hou

no profile record

Submissions

Show HN: Ki Editor – Multicursor syntactical editor

ki-editor.github.io
138 points·by hou32hou·2년 전·71 comments

comments

hou32hou
·4개월 전·discuss
Please feel free to ask for help in https://ki-editor.zulipchat.com/join/zzhagqzl6wyzpqfeqxcsrki... :)
hou32hou
·4개월 전·discuss
Have you actually tried it?
hou32hou
·4개월 전·discuss
Have you used `*` to pick the keyboard layout?
hou32hou
·4개월 전·discuss
In Ki you don't have to know the name of the syntax node, you can just press `d m`, and the editor will show the labels of all the syntax node visible that you can jump to.
hou32hou
·4개월 전·discuss
"Emacs is an editor" is as true as "Toyota Hilux is a gattling gun carrier"
hou32hou
·4개월 전·discuss
TBH, it's actually not as hard as you think, most of the time, what I do is just select the whole syntax node and delete it, copy it, or replace it, and only 20% of the time would actually require deliberate understanding of how the AST is structured in the current language I'm coding in.
hou32hou
·4개월 전·discuss
Sorry for derailing a bit, the search and replace using a query make sense for purly textual (non-syntactic) editing, but if you want to apply consistent syntactic modifications across multiple locations in the same file, you will need both multi-cursor and syntax node selection/navigation/modification.

It's hard to explain unless you actually try Ki, because it is a paradigm shift
hou32hou
·4개월 전·discuss
We have one underway in https://codeberg.org/alicealysia/ki-bindings.nvim
hou32hou
·4개월 전·discuss
> It shows the creator comes from VSCode

Hey, one of the creators here, I actually daily drove Neovim for two years, before switching to Helix for a while, then finally Ki.

> multi-cursor is a useless feature

I was a Neovim macro user until I figured out how insane that was compared to multi-cursor after using Helix.
hou32hou
·4개월 전·discuss
It's good at least in my case because I switch between Dvorak (Corne) and Qwerty (laptop's keyboard) all the time, without positional keymap, I would have to develop two sets of muscle memory
hou32hou
·4개월 전·discuss
It's not generated by LLM, it was actually my idea, but grammar-corrected by LLM, but you are not wrong either, the docs are really subpar in a lot of ways, and not clearly explaining why is one of them, and of course, the potentially cringey sentences too, someone complained the docs read like a Vogue magazine before lol
hou32hou
·4개월 전·discuss
> How does the machine I ssh to know my keyboard layout

Why does it need to? If you are using say, Dvorak, you can just pick the keyboard layout by pressing `*` (a keybinding which is not affected by the chosen keyboard layout)
hou32hou
·4개월 전·discuss
> For large edits, most selections will be out of the scroll window and not really helping.

That's why the Ki editor has a feature called Reveal Cursors (https://ki-editor.org/docs/normal-mode/space-menu#-cursor-re...), which is specifically made to solve this issue
hou32hou
·2년 전·discuss
Honestly they're just a bunch of data transformers plugged together to create the illusion of behaving like a human.
hou32hou
·2년 전·discuss
Do you mind sharing the Emacs package that does "tree based selection expanding" so I can better highlight their differences?
hou32hou
·2년 전·discuss
Multi-cursor, yes; structural selection, not so much, they are more like an afterthought for most editors, there’s a big difference between being treated as first-class and second-class.
hou32hou
·2년 전·discuss
Thank you for trying!

For character-based movement, simply press 'z' to enter the column mode.

Regarding the built-in tutor, yes I really have to put in the effort, because it's so much harder than authoring documentation.

And yes, a lot more has to be improved, Ki needs a lot of polishing around the edges.
hou32hou
·2년 전·discuss
I think it's significantly better, because you don't need to know the specific type of node you want to select.

In Ki, you only need to use `s` for any syntax node, while in nvim-treesitter-textobject, you need to use `vaf` for functions, `vac` for classes, and so on. Additionally, this also depends on how well the Tree-sitter queries are written, or if they're written at all.
hou32hou
·2년 전·discuss
Selection modes are sticky, so it would be “w l l l l l”
hou32hou
·2년 전·discuss
Künstliche Intelligenz. Sounds super cool, not gonna lie.