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
|
||||
" 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<cr>
|
||||
|
||||
" 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
|
||||
nnoremap s :shell<cr>
|
||||
|
@ -407,10 +409,8 @@ nnoremap S :sort<cr>
|
|||
nnoremap w :view<cr>
|
||||
vnoremap w :view<cr>gv
|
||||
|
||||
" Open file in existing instance of gvim
|
||||
nnoremap o :!gvim --remote-tab-silent %f<cr>
|
||||
" Open file in new instance of gvim
|
||||
nnoremap O :!gvim %f<cr>
|
||||
" Open file in existing instance of nvim
|
||||
nnoremap o :!nvim <cr>
|
||||
|
||||
" Open file in the background using its default program
|
||||
nnoremap gb :file &<cr>l
|
||||
|
@ -425,17 +425,19 @@ nnoremap yf :!echo %c:p | xclip %i<cr>
|
|||
nnoremap I cw<c-a>
|
||||
nnoremap cc cw<c-u>
|
||||
nnoremap A cw
|
||||
|
||||
" Open console in current directory
|
||||
nnoremap ,t :!xterm &<cr>
|
||||
" 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<cr>
|
||||
" Open gvim to edit vifmrc
|
||||
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
||||
nnoremap <space>V :write | edit $MYVIFMRC | restart<cr>
|
||||
|
||||
" Toggle wrap setting on ,w key
|
||||
nnoremap ,w :set wrap!<cr>
|
||||
" esc quits out of preview mode (it does in vim, why not here?)
|
||||
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
|
||||
nnoremap <f3> :!less %f<cr>
|
||||
|
@ -445,6 +447,19 @@ nnoremap <f6> :move<cr>
|
|||
nnoremap <f7> :mkdir<space>
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue