Add first draft of vifm configuration
This commit is contained in:
parent
f16bdd0c7b
commit
bf28f2067d
2 changed files with 77 additions and 41 deletions
21
.config/vifm/colors/cfillion.vifm
Normal file
21
.config/vifm/colors/cfillion.vifm
Normal file
|
@ -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
|
|
@ -11,6 +11,7 @@
|
||||||
" If you would like to use another vi clone such as Elvis or Vile
|
" If you would like to use another vi clone such as Elvis or Vile
|
||||||
" you will need to change this setting.
|
" you will need to change this setting.
|
||||||
|
|
||||||
|
" switched to neovim
|
||||||
set vicmd=nvim
|
set vicmd=nvim
|
||||||
" set vicmd=elvis\ -G\ termcap
|
" set vicmd=elvis\ -G\ termcap
|
||||||
" set vicmd=vile
|
" set vicmd=vile
|
||||||
|
@ -19,7 +20,6 @@ set vicmd=nvim
|
||||||
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
" 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
|
" solution, it's also much slower when processing large amounts of files and
|
||||||
" doesn't support progress measuring.
|
" doesn't support progress measuring.
|
||||||
|
|
||||||
set syscalls
|
set syscalls
|
||||||
|
|
||||||
" Trash Directory
|
" Trash Directory
|
||||||
|
@ -28,15 +28,12 @@ set syscalls
|
||||||
" files by deleting them and then using p to put the file in the new location.
|
" 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.
|
" I recommend not changing this until you are familiar with vifm.
|
||||||
" This probably shouldn't be an option.
|
" This probably shouldn't be an option.
|
||||||
|
|
||||||
set trash
|
set trash
|
||||||
|
|
||||||
" This is how many directories to store in the directory history.
|
" This is how many directories to store in the directory history.
|
||||||
|
|
||||||
set history=100
|
set history=100
|
||||||
|
|
||||||
" Automatically resolve symbolic links on l or Enter.
|
" Automatically resolve symbolic links on l or Enter.
|
||||||
|
|
||||||
set nofollowlinks
|
set nofollowlinks
|
||||||
|
|
||||||
" With this option turned on you can run partially entered commands with
|
" With this option turned on you can run partially entered commands with
|
||||||
|
@ -45,79 +42,74 @@ set nofollowlinks
|
||||||
" set fastrun
|
" set fastrun
|
||||||
|
|
||||||
" Natural sort of (version) numbers within text.
|
" Natural sort of (version) numbers within text.
|
||||||
|
|
||||||
set sortnumbers
|
set sortnumbers
|
||||||
|
|
||||||
" Maximum number of changes that can be undone.
|
" Maximum number of changes that can be undone.
|
||||||
|
|
||||||
set undolevels=100
|
set undolevels=100
|
||||||
|
|
||||||
" If you installed the vim.txt help file set vimhelp.
|
" If you installed the vim.txt help file set vimhelp.
|
||||||
" If would rather use a plain text help file set novimhelp.
|
" If would rather use a plain text help file set novimhelp.
|
||||||
|
set vimhelp
|
||||||
set novimhelp
|
|
||||||
|
|
||||||
" If you would like to run an executable file when you
|
" If you would like to run an executable file when you
|
||||||
" press return on the file name set this.
|
" press return on the file name set this.
|
||||||
|
|
||||||
set norunexec
|
set norunexec
|
||||||
|
|
||||||
" Selected color scheme
|
" Selected color scheme
|
||||||
|
colorscheme cfillion.vifm
|
||||||
colorscheme Default
|
|
||||||
|
|
||||||
" Format for displaying time in file list. For example:
|
" Format for displaying time in file list. For example:
|
||||||
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
||||||
" See man date or man strftime for details.
|
" See man date or man strftime for details.
|
||||||
|
|
||||||
set timefmt=%d-%m\ %H:%M
|
set timefmt=%d-%m\ %H:%M
|
||||||
|
|
||||||
" Show list of matches on tab completion in command-line mode
|
" Show list of matches on tab completion in command-line mode
|
||||||
|
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
|
||||||
" Display completions in a form of popup with descriptions of the matches
|
" Display completions in a form of popup with descriptions of the matches
|
||||||
|
|
||||||
set wildstyle=popup
|
set wildstyle=popup
|
||||||
|
|
||||||
" Display suggestions in normal, visual and view modes for keys, marks and
|
" Display suggestions in normal, visual and view modes for keys, marks and
|
||||||
" registers (at most 5 files). In other view, when available.
|
" registers (at most 5 files). In other view, when available.
|
||||||
|
|
||||||
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
||||||
|
|
||||||
" Ignore case in search patterns unless it contains at least one uppercase
|
" Ignore case in search patterns unless it contains at least one uppercase
|
||||||
" letter
|
" letter
|
||||||
|
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set smartcase
|
set smartcase
|
||||||
|
|
||||||
" Don't highlight search results automatically
|
" Don't highlight search results automatically
|
||||||
|
|
||||||
set nohlsearch
|
set nohlsearch
|
||||||
|
|
||||||
" Use increment searching (search while typing)
|
" Use increment searching (search while typing)
|
||||||
set incsearch
|
set incsearch
|
||||||
|
|
||||||
" Try to leave some space from cursor to upper/lower border in lists
|
" Try to leave some space from cursor to upper/lower border in lists
|
||||||
|
|
||||||
set scrolloff=4
|
set scrolloff=4
|
||||||
|
|
||||||
" Don't do too many requests to slow file systems
|
" Don't do too many requests to slow file systems
|
||||||
|
|
||||||
if !has('win')
|
if !has('win')
|
||||||
set slowfs=curlftpfs
|
set slowfs=curlftpfs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Set custom status line look
|
" Set custom status line look
|
||||||
|
|
||||||
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
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 mark /full/directory/path [filename]
|
||||||
|
|
||||||
mark b ~/bin/
|
|
||||||
mark h ~/
|
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
|
" %m run the command in a menu window
|
||||||
|
|
||||||
command! df df -h %m 2> /dev/null
|
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! zip zip -r %f.zip %f
|
||||||
command! run !! ./%f
|
command! run !! ./%f
|
||||||
command! make !!make %a
|
command! make !!make %a
|
||||||
command! mkcd :mkdir %a | cd %a
|
command! mkcd :mkdir %a | cd %a
|
||||||
command! vgrep vim "+grep %a"
|
" command! vgrep nvim "+grep %a"
|
||||||
command! reload :write | restart
|
command! reload :write | restart
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
" ------------------------------------------------------------------------------
|
||||||
|
@ -193,7 +185,7 @@ filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
||||||
\ {Play using ffplay}
|
\ {Play using ffplay}
|
||||||
\ ffplay -nodisp -autoexit %c,
|
\ ffplay -nodisp -autoexit %c,
|
||||||
\ {Play using MPlayer}
|
\ {Play using MPlayer}
|
||||||
\ mplayer %f,
|
\ mpv %f,
|
||||||
fileviewer *.mp3 mp3info
|
fileviewer *.mp3 mp3info
|
||||||
fileviewer *.flac soxi
|
fileviewer *.flac soxi
|
||||||
|
|
||||||
|
@ -206,7 +198,7 @@ filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
\ {View using Dragon}
|
\ {View using Dragon}
|
||||||
\ dragon %f:p,
|
\ dragon %f:p,
|
||||||
\ {View using mplayer}
|
\ {View using mplayer}
|
||||||
\ mplayer %f,
|
\ mpv %f,
|
||||||
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||||
\*.as[fx]
|
\*.as[fx]
|
||||||
|
@ -215,11 +207,11 @@ fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
" Web
|
" Web
|
||||||
filextype *.html,*.htm
|
filextype *.html,*.htm
|
||||||
\ {Open with dwb}
|
\ {Open with dwb}
|
||||||
\ dwb %f %i &,
|
\ qutebrowser %f %i &,
|
||||||
\ {Open with firefox}
|
\ {Open with firefox}
|
||||||
\ firefox %f &,
|
\ chromium %f &,
|
||||||
\ {Open with uzbl}
|
\ {Open with uzbl}
|
||||||
\ uzbl-browser %f %i &,
|
\ google-chrome %f %i &,
|
||||||
filetype *.html,*.htm links, lynx
|
filetype *.html,*.htm links, lynx
|
||||||
|
|
||||||
" Object
|
" Object
|
||||||
|
@ -229,6 +221,10 @@ filetype *.o nm %f | less
|
||||||
filetype *.[1-8] man ./%c
|
filetype *.[1-8] man ./%c
|
||||||
fileviewer *.[1-8] man ./%c | col -b
|
fileviewer *.[1-8] man ./%c | col -b
|
||||||
|
|
||||||
|
" Gif
|
||||||
|
filextype *.gif
|
||||||
|
\ {Loop} mpv --loop=inf %f %i &,
|
||||||
|
|
||||||
" Images
|
" Images
|
||||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||||
\ {View in sxiv}
|
\ {View in sxiv}
|
||||||
|
@ -236,7 +232,7 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||||
\ {View in gpicview}
|
\ {View in gpicview}
|
||||||
\ gpicview %c,
|
\ gpicview %c,
|
||||||
\ {View in shotwell}
|
\ {View in shotwell}
|
||||||
\ shotwell,
|
\ feh,
|
||||||
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||||
\ convert -identify %f -verbose /dev/null
|
\ convert -identify %f -verbose /dev/null
|
||||||
|
|
||||||
|
@ -395,7 +391,13 @@ set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" make quitting simpler
|
||||||
|
nmap Q :q<cr>
|
||||||
|
|
||||||
" Sample mappings
|
" Sample mappings
|
||||||
|
" for now they use space for my leader key - so we can't switch panels with
|
||||||
|
" space, use tab for that
|
||||||
|
nnoremap <space> <nop>
|
||||||
|
|
||||||
" Start shell in current directory
|
" Start shell in current directory
|
||||||
nnoremap s :shell<cr>
|
nnoremap s :shell<cr>
|
||||||
|
@ -407,10 +409,8 @@ nnoremap S :sort<cr>
|
||||||
nnoremap w :view<cr>
|
nnoremap w :view<cr>
|
||||||
vnoremap w :view<cr>gv
|
vnoremap w :view<cr>gv
|
||||||
|
|
||||||
" Open file in existing instance of gvim
|
" Open file in existing instance of nvim
|
||||||
nnoremap o :!gvim --remote-tab-silent %f<cr>
|
nnoremap o :!nvim <cr>
|
||||||
" Open file in new instance of gvim
|
|
||||||
nnoremap O :!gvim %f<cr>
|
|
||||||
|
|
||||||
" Open file in the background using its default program
|
" Open file in the background using its default program
|
||||||
nnoremap gb :file &<cr>l
|
nnoremap gb :file &<cr>l
|
||||||
|
@ -425,17 +425,19 @@ nnoremap yf :!echo %c:p | xclip %i<cr>
|
||||||
nnoremap I cw<c-a>
|
nnoremap I cw<c-a>
|
||||||
nnoremap cc cw<c-u>
|
nnoremap cc cw<c-u>
|
||||||
nnoremap A cw
|
nnoremap A cw
|
||||||
|
" More logical renaming, cw renames just the name, cW with extension
|
||||||
" Open console in current directory
|
nnoremap cw cW
|
||||||
nnoremap ,t :!xterm &<cr>
|
nnoremap cW cw
|
||||||
|
|
||||||
" Open editor to edit vifmrc and apply settings after returning to vifm
|
" Open editor to edit vifmrc and apply settings after returning to vifm
|
||||||
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
|
nnoremap <space>V :write | edit $MYVIFMRC | restart<cr>
|
||||||
" Open gvim to edit vifmrc
|
|
||||||
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
|
||||||
|
|
||||||
" Toggle wrap setting on ,w key
|
" esc quits out of preview mode (it does in vim, why not here?)
|
||||||
nnoremap ,w :set wrap!<cr>
|
qnoremap <esc> q
|
||||||
|
|
||||||
|
" Select file and jump in the indicated direction
|
||||||
|
nnoremap J tj
|
||||||
|
nnoremap K tk
|
||||||
|
|
||||||
" Example of standard two-panel file managers mappings
|
" Example of standard two-panel file managers mappings
|
||||||
nnoremap <f3> :!less %f<cr>
|
nnoremap <f3> :!less %f<cr>
|
||||||
|
@ -445,6 +447,19 @@ nnoremap <f6> :move<cr>
|
||||||
nnoremap <f7> :mkdir<space>
|
nnoremap <f7> :mkdir<space>
|
||||||
nnoremap <f8> :delete<cr>
|
nnoremap <f8> :delete<cr>
|
||||||
|
|
||||||
|
" toggle options
|
||||||
|
command! toggle :execute 'set %a! | echo "%a" &%a'
|
||||||
|
nnoremap tw :toggle wrap<cr>
|
||||||
|
nnoremap tm :toggle millerview<cr>
|
||||||
|
nnoremap tl :toggle lsview<cr>
|
||||||
|
nnoremap tn :toggle number<cr>
|
||||||
|
nnoremap tr :toggle relativenumber<cr>
|
||||||
|
nnoremap tN :windo toggle number<cr>
|
||||||
|
nnoremap tR :windo toggle relativenumber<cr>
|
||||||
|
nnoremap te :execute ':tree! | echo ":tree"'<cr>
|
||||||
|
nnoremap t <nop>
|
||||||
|
nnoremap tt t
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
" Various customization examples
|
" Various customization examples
|
||||||
|
|
Loading…
Reference in a new issue