huyz / less.vim

A "less" pager with color syntax highlighting
http://huyz.us/2011/a-less-like-pager-with-color-syntax-highlighting/
20 stars 2 forks source link

ANSI escape sequences #1

Open phunehehe opened 13 years ago

phunehehe commented 13 years ago

When comparing the results of

MANPAGER=m man ls

and

MANPAGER=less man ls

m didn't catch up with less on escape codes yet :) I have been looking for a solution to this, but no thing seems simple enough so far.

huyz commented 13 years ago

Hey you may want to check out this thing I ran into: http://www.vim.org/scripts/script.php?script_id=1723 If you do, please let me know how it goes.

phunehehe commented 12 years ago

This one puzzled me. It works for man, and git log, i.e:

MANPAGER=/path/to/vimpager man ls

and

PAGER=/path/to/vimpager git log

produce the nice colorful output.

However, it doesn't work for grep, i.e

grep a data.txt --color=always | /path/to/vimpager

still output weird characters. Probably coloring in grep uses another escaping scheme?

artm commented 12 years ago

vimpager doesn't use ansi colors to color man pages, it sets filetype to man and that does normal pattern based highlighting

stdcall commented 12 years ago

It would be nice to have ansi colors support for ruby's ri reference api frontend in vimpager. Currently I have shell wrapper setting PAGER to less before invoking ri.