Skip to content

Instantly share code, notes, and snippets.

@yewscion
Forked from jftuga/less.md
Created August 9, 2024 22:06
Show Gist options
  • Save yewscion/84c49669c413bf7a1f240bfb22f838f2 to your computer and use it in GitHub Desktop.
Save yewscion/84c49669c413bf7a1f240bfb22f838f2 to your computer and use it in GitHub Desktop.

Revisions

  1. @jftuga jftuga revised this gist May 5, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions less.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    set `LESS` environment variable to: `-SXIFRs`
    set `LESS` environment variable to: `-SXIFRs` in your .bash_profile or .bashrc:

    * `-S`: chop lines, side scroll with left/right arrow keys
    * `-X`: leave contents on screen when less exits
    * `-I`: ignore case
    * `-I`: ignore case when searching with `/` or `?`
    * `-F`: quit immediately when the entire file fits in one screen
    * `-R`: enable colored output
    * `-s`: squeeze blank lines into a single blank line
  2. @jftuga jftuga revised this gist Dec 7, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions less.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,11 @@
    set `LESS` environment variable to: `-SXIFR`
    set `LESS` environment variable to: `-SXIFRs`

    * `-S`: chop lines, side scroll with left/right arrow keys
    * `-X`: leave contents on screen when less exits
    * `-I`: ignore case
    * `-F`: quit immediately when the entire file fits in one screen
    * `-R`: enable colored output
    * `-s`: squeeze blank lines into a single blank line

    **useful:**

    @@ -13,7 +14,6 @@ set `LESS` environment variable to: `-SXIFR`
    * `-R`: Causes `raw` control characters to be displayed, but only ANSI "color" escape sequences
    * `-p`: equivalent to specifying +/pattern;
    * * that is, it tells less to start at the first occurrence of pattern in the file
    * `-s`: squeeze blank lines into a single blank line
    * `--incsearch`: incremental search
    * `--mouse --wheel-lines=10`: let the mouse wheel scroll `10` lines at a time
    * To start at a specific line number, say line 150, use `less +150 filename`
  3. @jftuga jftuga revised this gist Jun 2, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion less.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    set `LESS` environment variable to: `-SXIFR`

    * `-S`: chop lines, side scroll
    * `-S`: chop lines, side scroll with left/right arrow keys
    * `-X`: leave contents on screen when less exits
    * `-I`: ignore case
    * `-F`: quit immediately when the entire file fits in one screen
  4. @jftuga jftuga revised this gist Mar 14, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion less.md
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,6 @@ set `LESS` environment variable to: `-SXIFR`
    * `-s`: squeeze blank lines into a single blank line
    * `--incsearch`: incremental search
    * `--mouse --wheel-lines=10`: let the mouse wheel scroll `10` lines at a time
    * To start at a specific line number, say line 150, use "less +150 filename"
    * To start at a specific line number, say line 150, use `less +150 filename`

    **note:** these options are compatible with [bat](https://github.com/sharkdp/bat)
  5. @jftuga jftuga revised this gist Mar 14, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions less.md
    Original file line number Diff line number Diff line change
    @@ -16,5 +16,6 @@ set `LESS` environment variable to: `-SXIFR`
    * `-s`: squeeze blank lines into a single blank line
    * `--incsearch`: incremental search
    * `--mouse --wheel-lines=10`: let the mouse wheel scroll `10` lines at a time
    * To start at a specific line number, say line 150, use "less +150 filename"

    **note:** these options are compatible with [bat](https://github.com/sharkdp/bat)
  6. @jftuga jftuga revised this gist Mar 14, 2021. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions less.md
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,15 @@ set `LESS` environment variable to: `-SXIFR`
    * `-F`: quit immediately when the entire file fits in one screen
    * `-R`: enable colored output

    **useful**
    **useful:**

    * `-N`: line numbers
    * `-F`: force open non-regular files
    * `-R`: Causes `raw` control characters to be displayed, but only ANSI "color" escape sequences
    * `-p`: equivalent to specifying +/pattern;
    * * that is, it tells less to start at the first occurrence of pattern in the file
    * `-s`: squeeze blank lines into a single blank line
    * `--incsearch`: incremental search
    * `--mouse --wheel-lines=10`: let the mouse wheel scroll `10` lines at a time

    **note:** these options are compatible with [bat](https://github.com/sharkdp/bat)
    **note:** these options are compatible with [bat](https://github.com/sharkdp/bat)
  7. @jftuga jftuga created this gist Mar 14, 2021.
    14 changes: 14 additions & 0 deletions less.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    set `LESS` environment variable to: `-SXIFR`

    * `-S`: chop lines, side scroll
    * `-X`: leave contents on screen when less exits
    * `-I`: ignore case
    * `-F`: quit immediately when the entire file fits in one screen
    * `-R`: enable colored output

    **useful**

    * `-N`: line numbers
    * `-F`: force open non-regular files

    **note:** these options are compatible with [bat](https://github.com/sharkdp/bat)