nnn: kitty preview is not updated when file is modified
I noticed that after editing the file, kitty preview stops working.
/find any text fileeedit this text file- done! kitty preview don’t refresh.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 49 (26 by maintainers)
Commits related to this issue
- Workaround #621: preview is updated on redraw (^L) — committed to jarun/nnn by jarun 4 years ago
I don’t have the full history here, but @jarun has constantly rejected previews as an nnn feature. To this day, previews are not built-in to nnn. nnn just writes stuff out to a FIFO. It just so happens that previewers read that FIFO.
This FIFO is so much more powerful than a previewer because it has the entire history of everything that is accessed. This would enable users to write a plugin that jumps in to different directories in the session’s history.
Not really. When we say power, think in terms of 1000s of files. Not a directory with 20 files. Say you are searching for an executable. There can be many and you can’t just rely on the icon or color. And in that full directory you can’t keep scrolling. What we try to emphasize in
nnnis - the only way to reliably find a file is by it’s name. So you filter. We even support PCRE regex. That is the only way to get to that file accurately. For an organized user, 50 videos will be together and 50 documents will be together. And there is no way to determine by color or icon which one you are looking for.Because we have enough users (from desktop or laptop) asking for it now. If you noticed, the
NNN_FIFOfeature can be compiled out. This ensures people who do not or cannot use them don’t need to burden the CPU. But my current concern is the time we are spending on it. While devs are trying to help users, I have to keep 2 things in mind - we have other interesting features to add as well and the people I work with do it spending their own free time. I had been working with guys in academics who would spend all their time in open source contributions. That’s something I strongly discourage. Previews is one of those features where we have spent a lot of effort already. I have tried to address your concern despite a very very busy personal schedule yesterday but as I can see it’s not to your liking. So I prefer in these cases that users get their hands dirty rather than @leovilok (who is kind of working on this alone for several weeks) spending more time working on more complex solutions.It’s was a bug and I have addressed this already. My question was more on user experience, features etc.