Live data from Hacker News

Show HN: Yode-Nvim – Focused Code Editing for Neovim

github.com

1–10 of 23 posts

Re: Show HN: Yode-Nvim – Focused Code Editing for Neovim

#3
An off-topic comment:

Interesting for the “GIF” section to have links to .mp4 videos — the “GIF” word now seems to be synonymous to short playable animations. Love that the author did that though, I’ve seen too many repos with multiple giant (~10MB) GIFs on the README and burn my mobile data plan.

Re: Show HN: Yode-Nvim – Focused Code Editing for Neovim

#4

This looks great, nicely done! I didn’t know I needed this :) Does anyone know if this exists for Emacs? I use both nvim and Emacs but primarily Emacs and would love to have this on both.

Well you can hide the rest of the buffer and focus on a specific part of a file with the narrow-to-* functions (defun, region, or page).

However, this plugin seems to be a little fancier and instead creates different buffers for each selection. The analogous feature set in Emacs are indirect buffers. Try binding a key to run the clone-indirect-buffer and narrow-to-region commands in sequence.

This library might help too: https://www.emacswiki.org/emacs/NarrowIndirect

Re: Show HN: Yode-Nvim – Focused Code Editing for Neovim

#6

An off-topic comment: Interesting for the “GIF” section to have links to .mp4 videos — the “GIF” word now seems to be synonymous to short playable animations. Love that the author did that though, I’ve seen too many repos with multiple giant (~10MB) GIFs on the README and burn my mobile data plan.

Unfortunately I just see this error on Firefox 96.0.3 on Linux though:

https://i.imgur.com/DgQLXqj.png

EDIT: looks like there is already an issue about it. https://github.com/hoschi/yode-nvim/issues/4

Re: Show HN: Yode-Nvim – Focused Code Editing for Neovim

#9

How does Yode compare with tree-sitter?

Yode (the POC 4 years before) itself only worked with a (JavaScript) AST to create seditors. Tree-sitter would have helped here to provide an AST for different programming languages uniformly directly in NeoVim. Yode-Nvim is more powerful than the first version because it operates on lines to create seditors. In this respect Tree-sitter doesn't matter for Yode-Nvim. If someone uses Tree-sitter to select code in visual mode, he can easily create seditors for code objects like functions. This is also possible without Tree-sitter, but you have to select the function yourself.

Re: Show HN: Yode-Nvim – Focused Code Editing for Neovim

#10
post #8

What’s the advantage of this over creating splits and navigating to the relevant code? This is what I do all the time, having a hard time understanding how this would improve that.

Splits are not based on content, but are controlled by a layout algorithm. For horizontal splits, for example, the size changes every time you create a new one. Yode-Nvim is based on the size of the seditors and enlarges/reduces them automatically. There are more layouting algorithms planned and they can be different for each tab, the code is already set up for that.
Post reply on HN