From cf9e107d63698de12a42081e7e49e59afbae7aff Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 11 Apr 2018 19:54:24 +0100 Subject: Fix mime default for application/pdf --- tmux/.tmux.conf | 4 ++-- vim/.vimrc | 45 ++++++++++++++++++++++++++++++------------ xdg-open/.config/mimeapps.list | 2 +- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 1553d3e..9baf9f3 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -14,10 +14,10 @@ set-option -g allow-rename off is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" -bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind -n C-h if-shell "$is_vim" "send-keys C-h" 'if-shell "[ #{pane_at_left} -eq 1 ]" "select-window -p" "select-pane -L"' +bind -n C-l if-shell "$is_vim" "send-keys C-l" 'if-shell "[ #{pane_at_right} -eq 1 ]" "select-window -n" "select-pane -R"' bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" -bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind -n C-Left previous-window bind -n C-Right next-window diff --git a/vim/.vimrc b/vim/.vimrc index d47790f..a50e392 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -19,7 +19,6 @@ Plug 'AndrewRadev/splitjoin.vim' Plug 'arcticicestudio/nord-vim' Plug 'autozimu/LanguageClient-neovim' Plug 'beloglazov/vim-online-thesaurus' -Plug 'christoomey/vim-tmux-navigator' Plug 'critiqjo/lldb.nvim' Plug 'easymotion/vim-easymotion' Plug 'holomorph/vim-freefem' @@ -60,15 +59,14 @@ Plug 'tpope/vim-scriptease' Plug 'tpope/vim-sensible' Plug 'tpope/vim-surround' Plug 'tpope/vim-unimpaired' -Plug 'troydm/zoomwintab.vim' +Plug 'urbainvaes/vim-remembrall' +Plug 'urbainvaes/vim-wintab' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'vim-scripts/ReplaceWithRegister' Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' -" Plug 'urbainvaes/vim-remembrall' -Plug '~/Dropbox/projects/vim-remembrall/' if has("nvim") " Plug 'roxma/nvim-completion-manager' Plug 'Shougo/deoplete.nvim' @@ -164,7 +162,8 @@ nnoremap ,pu :PlugUpdate nnoremap cps :UltiSnipsEdit " Neomake -nnoremap gm :Neomake! +nnoremap gm :Make +nnoremap gM :Neomake! if &runtimepath =~ 'neomake' call neomake#configure#automake('w') endif @@ -231,7 +230,7 @@ let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" " let g:UltiSnipsUsePythonVersion=3 " Vimtex -let g:vimtex_fold_enabled=0 +let g:vimtex_fold_enabled=1 let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=2 let g:vimtex_compiler_progname='nvr' @@ -336,7 +335,8 @@ nnoremap ,t0 :tabmove 0 nnoremap ,t$ :tabmove nnoremap c :!rm ~/.vim/swap/\%* -nnoremap r :!%:p +nnoremap r :Start %:p +nnoremap R :Start! %:p nnoremap cqo :copen nnoremap cqc :cclose @@ -373,6 +373,9 @@ nnoremap ,s :source % " Shebang inoreabbrev #!! "#!/usr/bin/env" . (empty(&filetype) ? '' : ' '.&filetype) +" Spell +inoremap 1z=eA + " }}} "" Colorscheme {{{ function! SaveColo(...) @@ -421,15 +424,16 @@ augroup vimrc autocmd BufNewFile,BufRead *.plt set filetype=gnuplot " Filetype specific - autocmd FileType gmsh setlocal makeprg=gmsh\ % - autocmd FileType gnuplot setlocal makeprg=gnuplot\ % - autocmd FileType gnuplot setlocal commentstring=#%s - autocmd FileType cpp setlocal commentstring=//%s autocmd FileType cmake setlocal commentstring=#%s - autocmd FileType freefem comp freefem - autocmd FileType dirvish setlocal relativenumber + autocmd FileType cpp setlocal commentstring=//%s autocmd FileType dirvish setlocal errorformat=%f + autocmd FileType dirvish setlocal relativenumber autocmd FileType dirvish silent! unmap + autocmd FileType freefem comp freefem + autocmd FileType gmsh setlocal makeprg=gmsh\ % + autocmd FileType gnuplot setlocal commentstring=#%s + autocmd FileType gnuplot setlocal makeprg=gnuplot\ % + autocmd FileType python setlocal makeprg=python\ % autocmd FileType tex setlocal spell augroup END @@ -512,3 +516,18 @@ if has("nvim") nnoremap l endif " }}} +"" Zoom / Restore window {{{ +function! s:ZoomToggle() abort + if exists('t:zoomed') && t:zoomed + execute t:zoom_winrestcmd + let t:zoomed = 0 + else + let t:zoom_winrestcmd = winrestcmd() + resize + vertical resize + let t:zoomed = 1 + endif +endfunction +command! ZoomToggle call s:ZoomToggle() +nnoremap o :ZoomToggle +" }}} diff --git a/xdg-open/.config/mimeapps.list b/xdg-open/.config/mimeapps.list index de39a60..cf3f87b 100644 --- a/xdg-open/.config/mimeapps.list +++ b/xdg-open/.config/mimeapps.list @@ -4,7 +4,7 @@ image/jpeg=feh.desktop; image/png=feh.desktop; inode/directory=vifm.desktop;nautilus.desktop; text/html=qutebrowser.desktop;firefox.desktop; -application/pdf=zathura.desktop; +application/pdf=org.pwmt.zathura.desktop; x-scheme-handler/http=qutebrowser.desktop; x-scheme-handler/https=qutebrowser.desktop; x-scheme-handler/about=qutebrowser.desktop; -- cgit v1.2.3