Fork me on GitHub
#vim
<
2018-04-24
>
eraserhd15:04:39

I've always wanted a CodeBubbles like environment for Vim.

eraserhd15:04:02

Vim doesn't have buffers that are projections of other buffers. I wonder how hard that would be to implement in VimL. e.g. a buffer which is just one function from a file, focused.

dave15:04:05

that doesn't sound too terribly complicated you can make read-only buffers in vim, and erase them + write to them using vimscript you could use vim's job control to start a job that reads a file, calls a vimscript function to modify the contents (a string), erases the buffer contents, and writes your new contents

dave15:04:08

then somehow call the job in a loop

dave15:04:20

maybe jobs can dispatch other jobs... if so, that ought to do the trick

eraserhd16:04:53

I suspect the right way to do it is to have the full file in a (possibly hidden) buffer, and just sync the "focus" buffer to the real buffer on changes.

eraserhd16:04:15

Although, the modified status of the focus buffer should appear the same as the other buffer, too.

eraserhd16:04:18

I know emacs has this. I wonder what they call it?

dave16:04:10

that sounds good too. off-hand, i know that calling :e with a buffer focused refreshes its contents

dave16:04:28

there is also some setting that does that for you automatically, but you can't expect every user to have that in his/her vimrc

dominicm16:04:30

Neovim wants to offer this via the change API, it's one of the motivations

eraserhd16:04:55

You know, I tried to find where Neovim developers discuss things and failed. Is it on IRC?

eraserhd16:04:04

The mailing list is dead dead dead

dominicm16:04:18

I think the node plugin stuff is better as of last week, I'm going to look at upgrading refactor.

Jarrod Taylor (Clojure team)18:04:47

+1 for a refactor upgrade 👍

dominicm16:04:22

I use gitter for talking to neovim devs

tylerw18:04:03

In emacs they call it narrowing. There are some narrow region plugins for Vim.