db42bdc822677e9e55c75b31920e73c04ba405e4
[dotfiles.git] / .vimrc
1 "          _                    
2 "   __   _(_)_ __ ___  _ __ ___ 
3 "   \ \ / / | '_ ` _ \| '__/ __|
4 "    \ V /| | | | | | | | | (__ 
5 "   (_)_/ |_|_| |_| |_|_|  \___|
6 "                            
7
8 " basics
9 syntax on
10 set number
11 set relativenumber
12 " set hlsearch
13 set incsearch
14 set encoding=utf-8
15 set tabstop=4
16 set shiftwidth=4
17 set expandtab
18 " set formatoptions-=cro "disables auto comments (not working rn)
19
20 " spell check
21 setlocal spell
22 set spelllang=en_us
23 set spellcapcheck=
24
25 " conceal
26 set conceallevel=2
27
28 " Bindings
29 let mapleader = ' '
30
31 " map <leader>e :Ex<cr>
32 " map <leader>v :Vex<cr>
33 map <leader>l :bn<cr>
34 map <leader>h :bp<cr>
35 map <leader>d :bd<cr>
36
37 " colors
38 hi Conceal ctermbg=Black
39 hi SpellBad ctermfg=Red ctermbg=Black cterm=underline
40
41 " Netrw
42 " let g:netrw_liststyle = 3
43 " let g:netrw_banner = 0
44 " let g:netrw_winsize = 25
45 " let g:netrw_browse_split = 4
46
47 " Templates
48 augroup templates
49     autocmd BufNewFile *.tex 0r ~/.vim/templates/skeleton.tex
50 augroup END
51
52 " vim plug
53 " this blob auto installs vim plug if it isnt already
54 if empty(glob('~/.vim/autoload/plug.vim'))
55    silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
56        \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
57          autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
58          endif
59
60 " template stuff
61 call plug#begin('~/.vim/plugged')
62
63 Plug 'sirver/ultisnips'
64 Plug 'lervag/vimtex'
65 Plug 'jiangmiao/auto-pairs'
66 Plug 'PietroPate/vim-tex-conceal'
67 Plug 'vim-airline/vim-airline'
68 Plug 'tpope/vim-commentary'
69 Plug 'ptzz/lf.vim'
70 " Plug 'ctrlpvim/ctrlp.vim'
71 " Plug 'neoclide/coc.nvim', {'branch': 'release'}
72 " Plug 'habamax/vim-godot'
73
74 call plug#end()
75
76 " Ultisnips
77 let g:UltiSnipsExpandTrigger = '<tab>'
78 let g:UltiSnipsJumpForwardTrigger = '<tab>'
79 let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
80 let g:UltiSnipsSnippetDirectories=["UltiSnips", "mysnippets"]
81
82 " Vimtex
83 let g:tex_flavor='latex'
84 let g:vimtex_view_method='zathura'
85 let g:vimtex_quickfix_mode=0
86 let g:tex_conceal='abdmgs'
87
88 let g:vimtex_compiler_latexmk = {
89     \'build_dir': '/home/pinosaur/.cache/latexaux/',
90 \}
91
92 " VimAirline
93 let g:airline#extensions#tabline#enabled = 1
94 let g:airline#extensions#tabline#buffer_min_count = 2
95 let g:airline_powerline_fonts=1
96
97 " Ctrlp
98 let g:ctrlp_cmd='CtrlPTag'
99
100 " Lf
101 " let g:lf_replace_netrw = 1 " weird behavior rn
102
103 " Run after plugins
104 autocmd FileType * set formatoptions-=o