[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ranger-users] preview .txt-files?

From: Ludo Beckers
Subject: Re: [Ranger-users] preview .txt-files?
Date: Sun, 6 Jan 2013 13:13:21 +0100

I don't see any editor mentioned here:

case "$mimetype" in
    # Syntax highlight for text files:
    text/* | */xml)
        highlight --out-format=ansi "$path" | head -n $maxln
        success && exit 5 || exit 2;;
    # Ascii-previews of images:
        img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
    # Display information about media files:
    video/* | audio/*)
        # Use sed to remove spaces so the output fits into the narrow window
        mediainfo "$path" | sed 's/  \+:/: /;'
        success && exit 5 || exit 1;;

On Sat, Jan 5, 2013 at 6:08 PM, Miodrag Milic <address@hidden> wrote:
to use gvim just set EDITOR=gvim in your bashrc 

Text files work here as expected. Check out scope.sh file in ranger config which is responsible for preview and see if it contains "case $mimetype" text. In anyway you can edit this file to set up any extension.

On Sat, Jan 5, 2013 at 5:10 PM, Ludo Beckers <address@hidden> wrote:
When I hit enter standing on a txt-file it opens with vim, but the preview column doesn't work for these files.
I do see preview for pdf2txt and such though - what setting did I miss to preview txt?
Also, is it ok to change all "vim" entries in ranger configuration files to "gvim"? (still getting my feet wet here ;-))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]