From c7138335d138bf31885f354dfa07ad7303bb3eb5 Mon Sep 17 00:00:00 2001 From: samedamci Date: Wed, 18 Mar 2020 12:53:51 +0100 Subject: [PATCH] Update vifm config --- botfiles/.config/vifm/colors/biual.vifm | 13 +- botfiles/.config/vifm/vifmrc | 186 +++--------------------- 2 files changed, 35 insertions(+), 164 deletions(-) diff --git a/botfiles/.config/vifm/colors/biual.vifm b/botfiles/.config/vifm/colors/biual.vifm index 64a813f..088adcf 100644 --- a/botfiles/.config/vifm/colors/biual.vifm +++ b/botfiles/.config/vifm/colors/biual.vifm @@ -1,3 +1,14 @@ +" +" ██ +" ░██ +" █████ ██████ ░██ ██████ ██████ ██████ +" ██░░░██ ██░░░░██ ░██ ██░░░░██░░██░░█ ██░░░░ +" ░██ ░░ ░██ ░██ ░██░██ ░██ ░██ ░ ░░█████ +" ░██ ██░██ ░██ ░██░██ ░██ ░██ ░░░░░██ +" ░░█████ ░░██████ ███░░██████ ░███ ██████ +" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░ + + highlight clear highlight Win ctermfg=white ctermbg=none cterm=none @@ -26,5 +37,5 @@ highlight TabLine ctermfg=9 ctermbg=0 cterm=none highlight TabLineSel ctermfg=default ctermbg=default cterm=none,reverse highlight /^.*\.(mp3|ogg|oga|flac|m4a)$/ ctermfg=magenta -highlight /^.*\.(jpg|jpeg|png|gif|tiff|webp|bmp|svg|svgz)$/ ctermfg=yellow +highlight /^.*\.(jpg|jpeg|png|gif|tiff|webp|bmp|svg|svgz)$/ ctermfg=green highlight /^.*\.(zip|gz|bz2|xz|tar|tgz|tbz2|7z|rar|iso|rpm|deb)$/ ctermfg=red diff --git a/botfiles/.config/vifm/vifmrc b/botfiles/.config/vifm/vifmrc index 4ff58c7..d042331 100644 --- a/botfiles/.config/vifm/vifmrc +++ b/botfiles/.config/vifm/vifmrc @@ -8,113 +8,44 @@ " ░░██ ░██ ░██ ███ ░██ ░██ " ░░ ░░ ░░ ░░░ ░░ ░░ -" Editor -set vicmd=nvim - -" This makes vifm perform file operations on its own instead of relying on -" standard utilities like `cp`. While using `cp` and alike is a more universal -" solution, it's also much slower when processing large amounts of files and -" doesn't support progress measuring. - -set syscalls - -" Trash Directory -" The default is to move files that are deleted with dd or :d to -" the trash directory. If you change this you will not be able to move -" files by deleting them and then using p to put the file in the new location. -" I recommend not changing this until you are familiar with vifm. -" This probably shouldn't be an option. - -set trash - -" This is how many directories to store in the directory history. - -set history=100 - -" Automatically resolve symbolic links on l or Enter. - -set nofollowlinks - -" With this option turned on you can run partially entered commands with -" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). - -" set fastrun - -" Natural sort of (version) numbers within text. - -set sortnumbers - -" Maximum number of changes that can be undone. - -set undolevels=100 - -" Use Vim's format of help file (has highlighting and "hyperlinks"). -" If you would rather use a plain text help file set novimhelp. - -set vimhelp - -" If you would like to run an executable file when you -" press return on the file name set this. - -set norunexec - -" Selected color scheme - colorscheme biual -" Format for displaying time in file list. For example: -" TIME_STAMP_FORMAT=%m/%d-%H:%M -" See man date or man strftime for details. - -set timefmt=%m/%d\ %H:%M - -" Show list of matches on tab completion in command-line mode - +set vicmd=nvim +set syscalls +set trash +set history=100 +set nofollowlinks +set sortnumbers +set undolevels=100 +set norunexec +set timefmt=%m/%d/%Y\ %H:%M set wildmenu - -" Display completions in a form of popup with descriptions of the matches - set wildstyle=popup - -" Display suggestions in normal, visual and view modes for keys, marks and -" registers (at most 5 files). In other view, when available. - set suggestoptions=normal,visual,view,otherpane,keys,marks,registers - -" Ignore case in search patterns unless it contains at least one uppercase -" letter - set ignorecase set smartcase - -" Don't highlight search results automatically - set nohlsearch - -" Use increment searching (search while typing) set incsearch - -" Try to leave some space from cursor to upper/lower border in lists - set scrolloff=4 -" Don't do too many requests to slow file systems - if !has('win') set slowfs=curlftpfs endif -" Set custom status line look - -set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d " - -" ------------------------------------------------------------------------------ - -" :mark mark /full/directory/path [filename] +set statusline="%A %10u:%-7g %=%15s %20d " mark b ~/bin/ mark h ~/ +" Sample mappings +nnoremap ` :cd ~ +nnoremap ~ :cd ~ +nnoremap s :shell +nnoremap S :sort +nnoremap w :view +vnoremap w :viewgv +nnoremap cc cw + " ------------------------------------------------------------------------------ " :com[mand][!] command_name action @@ -167,7 +98,7 @@ command! reload :write | restart " program. " Pdf -filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c +filextype *.pdf mupdf %c %i &, apvlv %c, xpdf %c fileviewer *.pdf pdftotext -nopgbrk %c - " PostScript @@ -186,8 +117,8 @@ filextype *.djvu " Audio filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus - \ {Play using ffplay} - \ ffplay -nodisp -autoexit %c, + \ {Play using mpd} + \ mpc clear && mpc add %c && mpc play, \ {Play using MPlayer} \ mplayer %f, fileviewer *.mp3 mp3info @@ -332,7 +263,7 @@ filextype *.pro qtcreator %f & filextype */ \ {View in thunar} \ Thunar %f &, - +filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mpv --no-audio-display --input-ipc-server=/tmp/mpvsoc$(date +%%s) %c " Syntax highlighting in preview " " Explicitly set highlight type for some extensions @@ -368,8 +299,6 @@ filextype */ " What should be saved automatically between vifm sessions. Drop "savedirs" " value if you don't want vifm to remember last visited directories for you. -set vifminfo=chistory,shistory, - \phistory,dirstack,registers,bookmarks,bmarks " ------------------------------------------------------------------------------ @@ -385,25 +314,6 @@ set vifminfo=chistory,shistory, " ------------------------------------------------------------------------------ -" Sample mappings - -" Start shell in current directory -nnoremap s :shell - -" Display sorting dialog -nnoremap S :sort - -" Toggle visibility of preview window -nnoremap w :view -vnoremap w :viewgv - -" Open file in existing instance of gvim -nnoremap o :!gvim --remote-tab-silent %f -" Open file in new instance of gvim -nnoremap O :!gvim %f - -" Open file in the background using its default program -nnoremap gb :file &l " Interaction with system clipboard if has('win') @@ -425,54 +335,4 @@ elseif executable('xsel') \ echo -n %c:p | xsel --clipboard --input %i endif -" Mappings for faster renaming -nnoremap I cw -nnoremap cc cw -nnoremap A cw - -" Open console in current directory -nnoremap ,t :!xterm & - -" Open editor to edit vifmrc and apply settings after returning to vifm -nnoremap ,c :write | edit $MYVIFMRC | restart -" Open gvim to edit vifmrc -nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC & - -" Toggle wrap setting on ,w key -nnoremap ,w :set wrap! - -" Example of standard two-panel file managers mappings -nnoremap :!less %f -nnoremap :edit -nnoremap :copy -nnoremap :move -nnoremap :mkdir -nnoremap :delete - -" ------------------------------------------------------------------------------ - -" Various customization examples - -" Use ag (the silver searcher) instead of grep -" -" set grepprg='ag --line-numbers %i %a %s' - -" Add additional place to look for executables -" -" let $PATH = $HOME.'/bin/fuse:'.$PATH - -" Block particular shortcut -" -" nnoremap - -" Export IPC name of current instance as environment variable and use it to -" communicate with the instance later. -" -" It can be used in some shell script that gets run from inside vifm, for -" example, like this: -" vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'" -" -" let $VIFM_SERVER_NAME = v:servername - - " vim: filetype=vifm