commit df2d26af96b3caf3572351b3d99883297948cf4b
parent e26b963aaa06c14d617aac49f5ecd4febbb31725
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Wed, 19 Aug 2020 11:49:45 +0200
vim: add command to select images via sxiv
Former-commit-id: 8167352071a28b5a8994bddef43f22760b0aa1e0
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/vim/vimrc b/vim/vimrc
@@ -298,8 +298,7 @@ command! Todo Ag ((TO ?DO)|FIXME):?<space>?
nnoremap <leader>! :Todo<CR>
" Set a filetype
-command! Setf Filetypes
-cabbrev setf Setf
+cabbrev setf Filetypes
" Vimwiki {{{3
let tlist_vimwiki_settings = 'wiki;h:Headers'
@@ -683,6 +682,10 @@ command! Softwrap setlocal wrap formatoptions-=cat
command! Hardwrap setlocal nowrap formatoptions+=cat
command! Syncwin windo set scrollbind! cursorbind!
command! EF exe "split $HOME/.vim/after/ftplugin/".&filetype.".vim"
+command! -nargs=1 Img
+ \ exe "r! find ".shellescape(expand("%:p:h"))." -maxdepth ".<args>." -type f -exec file --mime-type '{}' \\+"
+ \ ."| awk -F: '$2 ~ /image\\//{print $1}'"
+ \ ."| sxiv -qto - 2>/dev/null"
" Fat finger fixes/convenience abbreviations
cnoreabbrev E Explore