Skip to content

Instantly share code, notes, and snippets.

@sebastiancarlos
Last active September 6, 2023 09:06
Show Gist options
  • Save sebastiancarlos/9dd95a2c3d5957257e51d623972173f7 to your computer and use it in GitHub Desktop.
Save sebastiancarlos/9dd95a2c3d5957257e51d623972173f7 to your computer and use it in GitHub Desktop.
The less command... now with horizontal scrolling too!
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/watch?v=lSOVozD7Iio
### Add this to your .bashrc
export LESS="--RAW-CONTROL-CHARS --quit-if-one-screen --clear-screen --tilde"
# version of less that scrolls
alias less="less --chop-long-lines --status-column --rscroll='>'"
alias l="less"
# version of less that wraps lines
alias lesswrap="command less"
alias lw="lesswrap"
### Add this to your .config/lesskey
#command
h left-scroll
l right-scroll
j forw-scroll
k back-scroll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment