Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 707 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 707 Bytes

Finally a Good VimCat!

This vimcat

  • is fast
  • generates output that can be embedded
  • has a userfriendly interface
  • has many options
  • does not clear the screen

Install the script by running

sudo ./vimcat --install

Use it in your ranger config!

Embedding in ranger

In scope.sh:

# ranger provides these as arguments
FILE_PATH="$1"
PREVIEW_WIDTH="$2"
PREVIEW_HEIGHT="$3"

# [...]

case "$mimetype" in
  text/* | */xml | */json | */javascript)
    vimcat "$FILE_PATH" -ecl "$PREVIEW_WIDTH" "$PREVIEW_HEIGHT" && exit 5
    exit 2
    ;;
  # [...]
esac