summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2018-04-11 19:54:24 +0100
committerUrbain Vaes <urbain@vaes.uk>2018-04-11 19:54:24 +0100
commitcf9e107d63698de12a42081e7e49e59afbae7aff (patch)
tree3a3f38f77586351873a992af1cb4de0b632a4121
parent461bcdad1fc308f5c8a0defb51d1a015e943600c (diff)
Fix mime default for application/pdf
-rw-r--r--tmux/.tmux.conf4
-rw-r--r--vim/.vimrc45
-rw-r--r--xdg-open/.config/mimeapps.list2
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<cr>
nnoremap cps :UltiSnipsEdit<cr>
" Neomake
-nnoremap gm :Neomake!<cr>
+nnoremap gm :Make<cr>
+nnoremap gM :Neomake!<cr>
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<cr>
nnoremap ,t$ :tabmove<cr>
nnoremap <Leader>c :!rm ~/.vim/swap/\%*<cr>
-nnoremap <Leader>r :!%:p<cr>
+nnoremap <Leader>r :Start %:p<cr>
+nnoremap <Leader>R :Start! %:p<cr>
nnoremap cqo :copen<cr>
nnoremap cqc :cclose<cr>
@@ -373,6 +373,9 @@ nnoremap ,s :source %<cr>
" Shebang
inoreabbrev <expr> #!! "#!/usr/bin/env" . (empty(&filetype) ? '' : ' '.&filetype)
+" Spell
+inoremap <c-s> <esc>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 <buffer> <C-p>
+ 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 <A-l> <C-w>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 <silent> <c-w>o :ZoomToggle<CR>
+" }}}
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;