blob: 0fee3a298e4f9b7221ba181a6802160e67b6b1af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'scrooloose/syntastic'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'tpope/vim-surround'
call vundle#end() " required
filetype plugin indent on " required
"Syntatic settings
let g:syntastic_enable_perl_checker = 1
let g:syntastic_perl_checkers = ['perl']
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Ultisnips
let g:UltiSnipsExpandTrigger="<leader>c"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
"General
syntax on
set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set gdefault
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
"set hlsearch
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
"set number
"set spell
set ruler
"Autosave and Autoread
set autoread
set autowriteall
set noswapfile
set nobackup
au CursorHold,CursorHoldI * checktime
au CursorHold,CursorHoldI * silent! wa
set updatetime=2000
filetype plugin on
let g:tex_flavor='latex -interaction=nonstopmode'
let g:Tex_DefaultTargetFormat='pdf'
let g:Tex_CompileRule_pdf = 'pdflatex -interaction nonstopmode $*'
let g:Tex_ViewRule_pdf = 'mupdf'
let Tex_FoldedSections=""
let Tex_FoldedEnvironments=""
let Tex_FoldedMisc=""
"Persisten-undo magic
set undofile
"Disable the super annoying autocomment
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
"Make j and k not jump when wraping
nnoremap j gj
nnoremap k gk
"set leader to comma
let mapleader = ","
"Math with qalc
nnoremap <leader>m :.!~/bin/calc<Enter>
nnoremap <leader>i :read !latestimage<Enter>
nnoremap <leader>v :!open '<cfile>'<CR>
"read spaces in path's
set isfname+=32
"Set tab to two spaces
set expandtab
set shiftwidth=2
set softtabstop=2
let g:ycm_confirm_extra_conf = 0
let g:ycm_global_ycm_extra_conf = '/usr/share/vim/vimfiles/third_party/ycmd/ycmd/tests/testdata/.ycm_extra_conf.py'
"Make tab into another escape
"nnoremap <Tab> <Esc>
"vnoremap <Tab> <Esc>gV
"onoremap <Tab> <Esc>
"inoremap <Tab> <Esc>`^
"inoremap <S-Tab> <Tab>
set enc=utf-8
"sync paste buffer and vims register
set clipboard^=unnamed
" don't clobber up the directory with dot undo file
set undodir=~/.vim/undodir//
"disable mouse
set mouse=
"Open new file
nnoremap <Leader>o :CtrlP<CR>
nnoremap <Leader>w :w<CR>
|