summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2017-09-06 09:10:02 +0100
committerUrbain Vaes <urbain@vaes.uk>2017-09-06 09:10:02 +0100
commit6fd2f629c3dd0bb60dc75f76ad8bfb6f3de2d650 (patch)
tree16442a72c9cd275a099458c713e8a72bba42ff9d
parent36f119b5e6946ddc6938fb7c8398f186aadcf07a (diff)
[vim] Automatically create directories (if necessary)
-rw-r--r--vim/.vim/after/ftplugin/tex/mappings.vim1
-rw-r--r--vim/.vimrc7
2 files changed, 8 insertions, 0 deletions
diff --git a/vim/.vim/after/ftplugin/tex/mappings.vim b/vim/.vim/after/ftplugin/tex/mappings.vim
index 9da769b..a631d88 100644
--- a/vim/.vim/after/ftplugin/tex/mappings.vim
+++ b/vim/.vim/after/ftplugin/tex/mappings.vim
@@ -47,3 +47,4 @@ nnoremap <buffer> <LocalLeader>o :VimtexView<CR>
nnoremap <buffer> <LocalLeader>k :VimtexStop<CR>:VimtexClean<CR>
nnoremap <buffer> <LocalLeader>t :VimtexTocToggle<CR>
nnoremap <buffer> <LocalLeader>h :split header.sty<CR>
+nnoremap <buffer> <LocalLeader>d :!latexdiff-git main_old.tex main.tex > diff.tex<CR>
diff --git a/vim/.vimrc b/vim/.vimrc
index 1a798f3..42e06c9 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -14,6 +14,7 @@ Plug 'LnL7/vim-nix'
Plug 'SirVer/ultisnips'
Plug 'airblade/vim-gitgutter'
Plug 'altercation/vim-colors-solarized'
+Plug 'arcticicestudio/nord-vim'
Plug 'beloglazov/vim-online-thesaurus'
Plug 'christoomey/vim-tmux-navigator'
Plug 'critiqjo/lldb.nvim'
@@ -25,6 +26,7 @@ Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/gv.vim'
+Plug 'junegunn/heytmux'
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/vim-peekaboo'
@@ -249,6 +251,7 @@ let g:tex_flavor='latex'
"" Vim options
set complete+=k
+set cursorline
set smartindent
set expandtab
set tabstop=4
@@ -338,4 +341,8 @@ augroup vimrc
au FileType gnuplot setlocal commentstring=#%s
au FileType freefem comp freefem
au FileType dirvish setlocal relativenumber
+ au BufWritePre *
+ \ if !isdirectory(expand('<afile>:p:h')) |
+ \ call mkdir(expand('<afile>:p:h'), 'p') |
+ \ endif
augroup END