Git Product home page Git Product logo

Comments (8)

vonshednob avatar vonshednob commented on May 24, 2024 1

Good idea; I donโ€™t use another viewer than my editor, but I see how it can be useful.

Thanks a lot for contributing as much as you do, Iโ€™m really grateful!

from pter.

vonshednob avatar vonshednob commented on May 24, 2024 1

I'm not sure yet how to do this, but have a look at this commit: it's possible to use the note parameter in hooks.

Maybe there's a way here to (for example), have pter run in something like tmux and set up the on-select hook to automatically open (reuse?) a note viewer in a split panel right next to pter. Maybe. I don't have the time to check how to do this in detail, but it should be possible.

Anyway, I'll still pull your changes in ๐Ÿ˜

from pter.

andrei-a-papou avatar andrei-a-papou commented on May 24, 2024 1

After more testing, I've switched to viewer = nano --restricted --view --nohelp instead of less. I use nano as the external editor, so this makes sense. And nano is used as a fallback value for editor anyway.

I've also discovered that when a pager like less or batcat --pager always is used, you can press Ctrl-C to exit the viewer abnormally, which crashes pter. Perhaps Ctrl-C can be trapped, I don't know, but I've set up nano as both editor and viewer with a custom nanorc and this works great for me.

In any case, I would suggest defaulting to nano --view as a fallback viewer.

from pter.

vonshednob avatar vonshednob commented on May 24, 2024 1

less works fine once Ctrl+C is caught. So I used less and more as the fallbacks. Also -- it's in!

from pter.

andrei-a-papou avatar andrei-a-papou commented on May 24, 2024

No problem, happy to help!

from pter.

andrei-a-papou avatar andrei-a-papou commented on May 24, 2024

Sounds like a good idea. I had some problems running pter in tmux (I think some keys failed to work, but this may have been fixed by now.) I'll check it out!

from pter.

andrei-a-papou avatar andrei-a-papou commented on May 24, 2024

Just in case, here's the same patch set, only against https://codeberg.org/vonshednob/pter/commit/0f1a4bcfd045f0123be2604d75e4714a396740a9:

96-view-note-1.diff.gz
96-view-note-2.diff.gz
96-view-note-3.diff.gz
96-view-note-4.diff.gz
96-view-note-5.diff.gz

from pter.

andrei-a-papou avatar andrei-a-papou commented on May 24, 2024

less works fine now, yes!

from pter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.