Hacker News new | past | comments | ask | show | jobs | submit login

A friend of mine started working on an experimental Emacs mode to provide structural navigation of code based on tree-sitter: https://cs.tvl.fyi/depot/-/tree/users/Profpatsch/emacs-tree-...

The potential for this is essentially something like Paredit, but for all languages.




Can someone point some examples of what `paredit` for other languages provide? I do various lisp programming occasionally but have not used `paredit` yet.


Check out this video for a quick demo: http://emacsrocks.com/e14.html

If you know a Lisp I recommend just giving paredit a spin for a few minutes, it's an interesting experience.


Looks like it's mainly tree/code manipulation. Typing code on the keyboard is probably the least taxing thing when it comes to software development. But I guess it will be nice once it has become a "reflex" rather then a conscious key-combo.


It's not so much about reducing the amount of characters typed, and instead moving the way you think about code from the character level to a more structural level.

Calling it a "reflex" is an interesting phrase! Tools like magit let me encode complicated processes into muscle memory, in a way where retrieval doesn't have to go through remembering and typing a string. Structural editing is similar.


It's not about easier typing.

It's about typing code, as opposed to typing text, with all the structural, highlighting, auto-formatting, auto-completion, error-detection, etc advantages this brings.


I only started using it a few months ago. It's such a natural way to edit code, it only took me about a day for it to become reflexive.

Now it just feels vaguely annoying to work without it. It's fine, it's just one of those ergonomic changes that nags at you a bit. Kind of like the opposite of that feeling of taking off uncomfortable business clothes at the end of the day. Or what I imagine people who are better at vim than me keep talking about.


It's not just saving keystrokes. It eliminates a whole class of errors. I recently did ~4-500 lines of Clojure in CodeMirror and wanted to kill myself by the end of it.


Can someone recommend what's the best material to learn emacs and lisp at the same time




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: