diff --git a/.config/vifm/colors/cfillion.vifm b/.config/vifm/colors/cfillion.vifm new file mode 100644 index 0000000..b6992b8 --- /dev/null +++ b/.config/vifm/colors/cfillion.vifm @@ -0,0 +1,21 @@ +set tuioptions=p + +highlight Win cterm=none ctermfg=default ctermbg=default +highlight Border cterm=none ctermfg=default ctermbg=default +highlight TopLine cterm=none ctermfg=48 ctermbg=235 +highlight TopLineSel cterm=bold ctermfg=default ctermbg=default +highlight StatusLine cterm=none ctermfg=48 ctermbg=235 +highlight CmdLine cterm=none ctermfg=default ctermbg=default + +highlight Selected cterm=none ctermfg=yellow ctermbg=234 +highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default +highlight WildMenu cterm=bold,reverse ctermfg=default ctermbg=default +highlight ErrorMsg cterm=none ctermfg=red ctermbg=default + +highlight Directory cterm=bold ctermfg=blue ctermbg=default +highlight Link cterm=underline ctermfg=cyan ctermbg=default +highlight BrokenLink cterm=underline ctermfg=red ctermbg=default +highlight Socket cterm=none ctermfg=magenta ctermbg=default +highlight Device cterm=bold ctermfg=cyan ctermbg=default +highlight Fifo cterm=none ctermfg=blue ctermbg=default +highlight Executable cterm=none ctermfg=green ctermbg=default diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index 0a7e8ef..00bda95 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -11,6 +11,7 @@ " If you would like to use another vi clone such as Elvis or Vile " you will need to change this setting. +" switched to neovim set vicmd=nvim " set vicmd=elvis\ -G\ termcap " set vicmd=vile @@ -19,7 +20,6 @@ set vicmd=nvim " 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 @@ -28,15 +28,12 @@ set syscalls " 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 @@ -45,79 +42,74 @@ set nofollowlinks " set fastrun " Natural sort of (version) numbers within text. - set sortnumbers " Maximum number of changes that can be undone. - set undolevels=100 " If you installed the vim.txt help file set vimhelp. " If would rather use a plain text help file set novimhelp. - -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 Default +colorscheme cfillion.vifm " 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=%d-%m\ %H:%M " Show list of matches on tab completion in command-line mode - 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 " +" decrease waiting time between input polling +set mintimeoutlen=50 + +" set the pre-key timeout really high, see https://git.io/fNm1d +set timeoutlen=5000 + " ------------------------------------------------------------------------------ " :mark mark /full/directory/path [filename] -mark b ~/bin/ mark h ~/ +mark d ~/downloads/ +mark p ~/projects/ +mark n ~/Nextcloud/Notes/ +mark t ~/.local/share/vifm/Trash/ " ------------------------------------------------------------------------------ @@ -134,12 +126,12 @@ mark h ~/ " %m run the command in a menu window command! df df -h %m 2> /dev/null -command! diff vim -d %f %F +command! diff nvim -d %f %F command! zip zip -r %f.zip %f command! run !! ./%f command! make !!make %a command! mkcd :mkdir %a | cd %a -command! vgrep vim "+grep %a" +" command! vgrep nvim "+grep %a" command! reload :write | restart " ------------------------------------------------------------------------------ @@ -193,7 +185,7 @@ filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus \ {Play using ffplay} \ ffplay -nodisp -autoexit %c, \ {Play using MPlayer} - \ mplayer %f, + \ mpv %f, fileviewer *.mp3 mp3info fileviewer *.flac soxi @@ -206,7 +198,7 @@ filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, \ {View using Dragon} \ dragon %f:p, \ {View using mplayer} - \ mplayer %f, + \ mpv %f, fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, \*.as[fx] @@ -215,11 +207,11 @@ fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, " Web filextype *.html,*.htm \ {Open with dwb} - \ dwb %f %i &, + \ qutebrowser %f %i &, \ {Open with firefox} - \ firefox %f &, + \ chromium %f &, \ {Open with uzbl} - \ uzbl-browser %f %i &, + \ google-chrome %f %i &, filetype *.html,*.htm links, lynx " Object @@ -229,6 +221,10 @@ filetype *.o nm %f | less filetype *.[1-8] man ./%c fileviewer *.[1-8] man ./%c | col -b +" Gif +filextype *.gif + \ {Loop} mpv --loop=inf %f %i &, + " Images filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ {View in sxiv} @@ -236,7 +232,7 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ {View in gpicview} \ gpicview %c, \ {View in shotwell} - \ shotwell, + \ feh, fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ convert -identify %f -verbose /dev/null @@ -395,7 +391,13 @@ set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, " ------------------------------------------------------------------------------ +" make quitting simpler +nmap Q :q + " Sample mappings +" for now they use space for my leader key - so we can't switch panels with +" space, use tab for that +nnoremap " Start shell in current directory nnoremap s :shell @@ -407,10 +409,8 @@ nnoremap S :sort 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 existing instance of nvim +nnoremap o :!nvim " Open file in the background using its default program nnoremap gb :file &l @@ -425,17 +425,19 @@ nnoremap yf :!echo %c:p | xclip %i nnoremap I cw nnoremap cc cw nnoremap A cw - -" Open console in current directory -nnoremap ,t :!xterm & +" More logical renaming, cw renames just the name, cW with extension +nnoremap cw cW +nnoremap cW cw " 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 & +nnoremap V :write | edit $MYVIFMRC | restart -" Toggle wrap setting on ,w key -nnoremap ,w :set wrap! +" esc quits out of preview mode (it does in vim, why not here?) +qnoremap q + +" Select file and jump in the indicated direction +nnoremap J tj +nnoremap K tk " Example of standard two-panel file managers mappings nnoremap :!less %f @@ -445,6 +447,19 @@ nnoremap :move nnoremap :mkdir nnoremap :delete +" toggle options +command! toggle :execute 'set %a! | echo "%a" &%a' +nnoremap tw :toggle wrap +nnoremap tm :toggle millerview +nnoremap tl :toggle lsview +nnoremap tn :toggle number +nnoremap tr :toggle relativenumber +nnoremap tN :windo toggle number +nnoremap tR :windo toggle relativenumber +nnoremap te :execute ':tree! | echo ":tree"' +nnoremap t +nnoremap tt t + " ------------------------------------------------------------------------------ " Various customization examples