Add setting for less

This commit is contained in:
Tom Willemse 2016-11-24 21:47:18 +01:00
parent e9a82253b6
commit a6a88fd424

View file

@ -128,3 +128,21 @@ Autoload any ZSH function from =$HOME/.zsh/functions=.
autoload -Uz compinit
compinit
#+END_SRC
* Less
I use a terminal that's always 80 columns wide. This means that a
lot of output doesn't fit on a single line. I use the less command a
lot to look at output that's too big and wide to view in my
terminal. The default doesn't make this any better though, so I use
these switches. Most of these I originally got from what git uses.
#+BEGIN_SRC sh
export LESS="FXRSi"
#+END_SRC
This causes less to immediately quit if there is no need to use a
pager (everything fits in a single screen) (=-F=). Doesn't clear the
screen when less is closed (=-X=). Handles ANSI colors (=-R=). Stops
long lines from wraping (=-S=). And makes searches case-insensitive
(=-i=).