mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 06:18:59 +00:00
Update vimrc
This commit is contained in:
parent
b5e0bf5005
commit
f46957d7d8
70
vim/.vimrc
70
vim/.vimrc
@ -2,28 +2,39 @@
|
|||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
Plug 'sirver/ultisnips'
|
Plug 'sirver/ultisnips'
|
||||||
|
" setting my private snippets in a consistent home directory
|
||||||
|
let g:UltiSnipsSnippetDirectories = [$HOME . "/.vim/own-snippets"]
|
||||||
|
let g:UltiSnipsExpandTrigger="<tab>"
|
||||||
|
let g:UltiSnipsJumpForwardTrigger="<c-b>"
|
||||||
|
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
|
||||||
|
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
Plug 'scrooloose/nerdtree'
|
||||||
|
|
||||||
|
Plug 'honza/vim-snippets'
|
||||||
|
|
||||||
Plug '907th/vim-auto-save'
|
Plug '907th/vim-auto-save'
|
||||||
|
let g:auto_save = 1
|
||||||
|
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
" air-line
|
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
|
|
||||||
if !exists('g:airline_symbols')
|
if !exists('g:airline_symbols')
|
||||||
let g:airline_symbols = {}
|
let g:airline_symbols = {}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" enable auto-save on startup
|
|
||||||
let g:auto_save = 1
|
|
||||||
|
|
||||||
Plug 'lervag/vimtex'
|
Plug 'lervag/vimtex'
|
||||||
let g:tex_flavor='latex'
|
let g:tex_flavor='latex'
|
||||||
let g:vimtex_view_method='zathura'
|
let g:vimtex_view_method='zathura'
|
||||||
let g:vimtex_quickfix_mode=0
|
let g:vimtex_quickfix_mode=0
|
||||||
set conceallevel=1
|
set conceallevel=1
|
||||||
let g:tex_conceal='abdmg'
|
let g:tex_conceal='abdmg'
|
||||||
|
let g:vimtex_compiler_latexmk = {
|
||||||
|
\ 'options': [
|
||||||
|
\ '-shell-escape',
|
||||||
|
\ '-verbose',
|
||||||
|
\ '-file-line-error',
|
||||||
|
\ ]
|
||||||
|
\}
|
||||||
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
|
||||||
@ -36,5 +47,48 @@ inoremap jk <Esc>
|
|||||||
" setting number lines in the gutter
|
" setting number lines in the gutter
|
||||||
set number relativenumber
|
set number relativenumber
|
||||||
|
|
||||||
" set tab to enter 4 spaces, instead
|
" set tab to enter spaces, instead
|
||||||
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
|
set expandtab
|
||||||
|
|
||||||
|
let template_list = [
|
||||||
|
\ ["_minted-", ""],
|
||||||
|
\ ["", ".synctex"],
|
||||||
|
\]
|
||||||
|
|
||||||
|
function VimtexAdditionalCleanup(template_list)
|
||||||
|
let file_name = expand("%:t:r")
|
||||||
|
let file_path = expand("%:p:h") . "/"
|
||||||
|
for template in a:template_list
|
||||||
|
let prefix = template[0]
|
||||||
|
let suffix = template[1]
|
||||||
|
let full_template_path = file_path . prefix . file_name . suffix
|
||||||
|
call delete(full_template_path, "rf")
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" initiate LaTeX file compilation at the start and auto clean up
|
||||||
|
augroup vimtex_events
|
||||||
|
au!
|
||||||
|
" auto-clean
|
||||||
|
au User VimtexEventQuit call vimtex#compiler#clean(1)
|
||||||
|
au User VimtexEventQuit call VimtexAdditionalCleanup(template_list)
|
||||||
|
|
||||||
|
" auto-compile
|
||||||
|
au User VimtexEventInitPost call vimtex#compiler#compile()
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" open nerd-tree at the start of each file opening
|
||||||
|
autocmd vimenter * NERDTree
|
||||||
|
|
||||||
|
" spell checker (for your local language, anyway)
|
||||||
|
setlocal spell
|
||||||
|
set spelllang=en_gb
|
||||||
|
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||||
|
|
||||||
|
" changing style of words
|
||||||
|
hi clear SpellBad
|
||||||
|
hi SpellBad cterm=bold,underline ctermfg=red
|
||||||
|
|
||||||
|
hi clear SpellLocal
|
||||||
|
hi SpellLocal cterm=bold,underline ctermfg=cyan
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user