vifm: Replace glow with bat markdown preview
For some reason (glow 2.0.0 release?) markdown preview with glow does _not_ work anymore within my vifm. It regresses to showing errors all over the place instead.
This commit is contained in:
parent
23086828d3
commit
f3fb0998f5
1 changed files with 4 additions and 42 deletions
|
@ -617,9 +617,10 @@ fileviewer */
|
||||||
\ tree -L 2,
|
\ tree -L 2,
|
||||||
|
|
||||||
" markdown text
|
" markdown text
|
||||||
fileviewer *.md
|
fileviewer *.md,*.markdown,*.mkd,*.mdx,*.rmd,*.Rmd,*.quarto,*.mdwiki
|
||||||
\ [ "$TERM_DARK" = "true" ] && glow --style=dark %c || glow --style=light %c,
|
\ bat --color=always --style=plain --language md | less -FRX
|
||||||
\ bat --color=always --style=plain
|
" glow has ceased to work w/ version 2.0.0
|
||||||
|
" \ [ "$TERM_DARK" = "true" ] && glow -p --style=dark %c || glow -p --style=light %c,
|
||||||
|
|
||||||
" use custom viewer script for rest
|
" use custom viewer script for rest
|
||||||
fileviewer * vifm-default-viewer %c
|
fileviewer * vifm-default-viewer %c
|
||||||
|
@ -627,45 +628,6 @@ fileviewer * vifm-default-viewer %c
|
||||||
" use our own custom opener
|
" use our own custom opener
|
||||||
filetype * open
|
filetype * open
|
||||||
|
|
||||||
" Syntax highlighting in preview
|
|
||||||
"
|
|
||||||
" Explicitly set highlight type for some extensions
|
|
||||||
"
|
|
||||||
" 256-color terminal
|
|
||||||
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
|
|
||||||
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
|
|
||||||
"
|
|
||||||
" 16-color terminal
|
|
||||||
" fileviewer *.c,*.h highlight -O ansi -s dante %c
|
|
||||||
"
|
|
||||||
" Or leave it for automatic detection
|
|
||||||
"
|
|
||||||
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
|
||||||
|
|
||||||
" Displaying pictures in terminal
|
|
||||||
"
|
|
||||||
" fileviewer *.jpg,*.png shellpic %c
|
|
||||||
|
|
||||||
" Open all other files with default system programs (you can also remove all
|
|
||||||
" :file[x]type commands above to ensure they don't interfere with system-wide
|
|
||||||
" settings). By default all unknown files are opened with 'vi[x]cmd'
|
|
||||||
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
|
|
||||||
" for unknown file types.
|
|
||||||
" For *nix:
|
|
||||||
" filetype * xdg-open
|
|
||||||
" For OS X:
|
|
||||||
" filetype * open
|
|
||||||
" For Windows:
|
|
||||||
" filetype * start, explorer
|
|
||||||
|
|
||||||
" }}}
|
|
||||||
|
|
||||||
" Various customization examples
|
|
||||||
|
|
||||||
" Add additional place to look for executables
|
|
||||||
"
|
|
||||||
" let $PATH = $HOME.'/bin/fuse:'.$PATH
|
|
||||||
|
|
||||||
" Block particular shortcut
|
" Block particular shortcut
|
||||||
"
|
"
|
||||||
" nnoremap <left> <nop>
|
" nnoremap <left> <nop>
|
||||||
|
|
Loading…
Reference in a new issue