App-ansicolumn
view release on metacpan or search on metacpan
`--no-ignore-space` option to disable this.
- **--**\[**no-**\]**white-space**
Allow white spaces at the top of each pane, or clean them up. Default
true. Negated by the `--document` option.
- **--**\[**no-**\]**isolation**
Allow a line to be isolated at the bottom of a pane when preceded by
a blank line. Default true. If false, move it to the top of the next
pane. This applies to both single-line paragraphs (such as titles)
and the first line of multi-line paragraphs. Negated by the
`--document` option.
- **--tabstop**=# (DEFAULT: 8)
Set tab width.
- **--tabhead**=#
- **--tabspace**=#
Set the head and following space characters. Both are space by default.
If the option value is longer than a single character, it is evaluated
as a Unicode name.
- **--tabstyle**, **--ts**
- **--tabstyle**=_style_, **--ts**=...
- **--tabstyle**=_head-style_,_space-style_ **--ts**=...
Set how tabs are expanded. Select `symbol` or `shade` for
example. If two style names are combined, like
`squat-arrow,middle-dot`, use `squat-arrow` for tabhead and
`middle-dot` for tabspace.
Shows the available style list if called without a parameter. Styles
are defined in the [Text::ANSI::Fold](https://metacpan.org/pod/Text%3A%3AANSI%3A%3AFold) library.
- **--ambiguous**=`wide`|`narrow` (DEFAULT: `narrow`)
Specifies how to treat Unicode ambiguous width characters. Takes a
value of `narrow` or `wide`. Default is `narrow`.
- **--pages**
Split file content by formfeed characters, and treat each part as an
individual file. Use with the `--parallel` option.
# DEFAULT ALIASES
The following options are defined in `App::ansicolumn::default.pm`.
- **--board-color** _fg-color_ _bg-color_
This option is defined as follows:
option --board-color \
--bs=inner-box \
--cm=BORDER=$<2>,TEXT=$<shift>/$<shift>
The resulting text is displayed in an _fg-color_ font on an
_bg-color_ panel.
- **--white-board**
- **--black-board**
- **--green-board**
- **--slate-board**
Use the `--board-color` option to display text on white, black,
green, or dark slate panels.
# CALCULATION
For the `--height`, `--width`, `--pane`, `--up` and `--pane-width`
options, besides giving numeric digits, you can calculate the number
using the terminal size. If the expression contains a non-digit
character, it is evaluated as an RPN (Reverse Polish Notation)
expression with the terminal size pushed on the stack. The initial
value for `--height` is the terminal height, and the terminal width
for others.
OPTION VALUE
================= =========================
--height 1- height - 1
--height 2/ height / 2
--height 1-2/ (height - 1) / 2
--height dup2%-2/ (height - height % 2) / 2
Space and comma characters are ignored in the expression. So `1-2/`
and `1Â -Â 2Â /` and `1,-,2,/` are all the same. See `perldoc
Math::RPN` for details.
The next example selects the number of panes by dividing the terminal
width by 85:
ansicolumn --pane 85/
If you need to handle the case where the terminal width is less than 85:
ansicolumn --pane 85/,DUP,1,GE,EXCH,1,IF
This RPN means `$width/85 >= 1 ? $width/85 : 1`.
# STARTUP
This command is implemented with the [Getopt::EX](https://metacpan.org/pod/Getopt%3A%3AEX) module, so the
~/.ansicolumnrc
file is read at startup. If you always want to use
`--no-white-space`, put this line in your `~/.ansicolumnrc`:
option default --no-white-space
The command can also be extended with custom modules using the `-M`
option. See `perldoc Getopt::EX` for details.
# INSTALL
## CPANMINUS
( run in 2.810 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )