Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design: leave paging to less(1)? #4

Open
kiedtl opened this issue May 10, 2020 · 7 comments
Open

Design: leave paging to less(1)? #4

kiedtl opened this issue May 10, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@kiedtl
Copy link

kiedtl commented May 10, 2020

From what I see this tool is doing two things: markdown parsing/formatting and paging.

Why not just do md formatting and leave the rest for less? That way users are free to use a pager of choice (or none at all) and you don't need to duplicate the functionality of less.

Thoughts?

@Titor8115
Copy link
Owner

I’m planning on adding -o flag for simply format the buffer and output it to file if anyone wants to use other pager or no pager at all.

Honestly, the reason that flag wasn’t in the functionality is because I’m not too familiar with the syntax and functionality of less/more.

@Titor8115 Titor8115 added the enhancement New feature or request label May 11, 2020
@alexmyczko
Copy link
Contributor

I would prefer if it would respect PAGER variable

@okbob
Copy link

okbob commented May 12, 2020

Syntax of less commands is not hard - you can get inspiration from pspg - https://github.com/okbob/pspg. Is good to know a less functionality because defacto it is UNIX (Linux) standard - so it is good to respect keyboard commands, options, .. It is good source of inspiration, although it is not based on ncurses.

I think so the decision to use or not to use less is not easy. Less is great pager - but it is generic pager. It cannot to support special formats, special searching, walk through document structure.

@alexmyczko
Copy link
Contributor

The point is one can use PAGER or pipe it to a printer or grep it or whatever.

@Titor8115
Copy link
Owner

Titor8115 commented May 12, 2020

Syntax of less commands is not hard - you can get inspiration from pspg - https://github.com/okbob/pspg. Is good to know a less functionality because defacto it is UNIX (Linux) standard - so it is good to respect keyboard commands, options, .. It is good source of inspiration, although it is not based on ncurses.

I think so the decision to use or not to use less is not easy. Less is great pager - but it is generic pager. It cannot to support special formats, special searching, walk through document structure.

Thanks for the resources!

Update on current todo list:

  • Piping capability
  • Line fold/wrap on white space
  • Optimized resizing

Meanwhile, anyone have any idea about Mac OS? There is an issue where A_ITALIC macro not detected while compiling.

@alexmyczko
Copy link
Contributor

I have access to macOS can try to create a macbrew port

@Titor8115
Copy link
Owner

I have access to macOS can try to create a macbrew port

That would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants