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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
runtime! archlinux.vim
scriptencoding utf-8
set directory=$XDG_CACHE_HOME/vim,~/,/tmp
set backupdir=$XDG_CACHE_HOME/vim,~/,/tmp
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
set runtimepath=$XDG_CONFIG_HOME/vim,$XDG_CONFIG_HOME/vim/after,$VIM,$VIMRUNTIME,$VIM/vimfiles,$VIM/vimfiles/after
" behaviour
set history=200
set wildmenu
set ruler
set cursorline
set showmatch
set hlsearch
set nocompatible
set backspace=2
set incsearch
set formatoptions+=tcroqn2bmj
set number
set nowrap
" Enable mouse support
set mouse=a
set clipboard=unnamedplus
" tabs
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set smartindent
set textwidth=80
" netrw settings
let g:netrw_banner=0
let g:netrw_browse_split=1
let g:netrw_altv=4
" theme
syntax enable
" thematics
set background=dark
set colorcolumn=81
" Colorscheme overrides, for transparency
let g:jellybeans_overrides = { 'background': {
\ 'guibg': 'none',
\ 'ctermbg': 'none',
\ '256ctermbg': 'none',
\}}
let g:jellybeans_use_term_italics = 1
" Spaceduck stuff
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
"colorscheme jellybeans
colorscheme spaceduck
"set listchars=space:·\,eol:¬
set listchars=tab:\ \ >,extends:…,precedes:…
set list
set tags+=./tags;/
" adding pathogen
execute pathogen#infect('bundle/{}')
filetype plugin indent on
" encodings
set fileencoding=utf-8
set encoding=utf-8
set fileformats=unix
set grepprg=grep\ -nH\ $*
"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
" filetypes
let g:syntastic_disabled_filetypes=['asm', 's', 'latex', 'tex']
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
set conceallevel=2
let g:tex_conceal='abdmg'
"let g:syntastic_tex_checkers=['lacheck']
let g:vimtex_compiler_method = 'latexrun'
let g:vimtex_compiler_latexrun = {
\ 'backend' : 'jobs',
\ 'background' : 1,
\ 'build_dir' : 'latex.out',
\ 'options' : [
\ '-verbose-cmds',
\ '--latex-args="-synctex=1"',
\ ],
\}
let g:latex_view_general_viewer = 'zathura'
let g:vimtex_view_method = 'zathura'
function! Synctex()
" remove 'silent' for debugging
execute "silent !mv -u latex.out/" . expand('%:t:r') . ".synctex.gz ."
execute "silent !zathura --synctex-forward " . line('.') . ":" . col('.') . ":" . bufname('%') . " " . expand('%:t:r') . ".pdf"
redraw!
endfunction
au BufNewFile,BufRead /tmp/[a-zA-Z0-9]\+/ setlocal ft=sh
" Remove trailing cancer on write
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritePost *.tex !latexrun --bibtex-cmd="biber" --latex-args="-synctex=1 -interaction=nonstopmode" %
"autocmd BufWritePost *.tex !latexrun --bibtex-cmd="biber" --latex-args="-synctex=1 -shell-escape" report.tex
"autocmd BufWritePost *.md !cmark-gfm -e footnotes -e table -e strikethrough -e autolink -e tagfilter -e tasklist --unsafe % > %:r.html
autocmd BufReadPre *.asm !set ft=nasm
set makeprg=GCC_COLORS=\ make
vnoremap // y/\V<C-R>"<CR>
vnoremap (( <ESC>`>a)<ESC>`<i(<ESC>
match ErrorMsg '\%>80v.\+'
match ErrorMsg '\( \| \)\+$'
map <F5> :make<CR>
map! <ESC>[1;5A <C-Up>
map! <ESC>[1;5B <C-Down>
map! <ESC>[1;5C <C-Right>
map! <ESC>[1;5D <C-Left>
map <ESC>[1;5A <C-Up>
map <ESC>[1;5B <C-Down>
map <ESC>[1;5C <C-Right>
map <ESC>[1;5D <C-Left>
map <ScrollWheelUp> <C-Y>
"map <ScrollWheelDown> <C-E>
imap <C-E> <ESC>A
imap <C-A> <ESC>I
" Change cursor to block
"autocmd VimEnter * silent !echo -ne "\e[1 q"
"autocmd VimResume * silent !echo -ne "\e[1 q"
" Preserve clipboard
autocmd VimLeave * call system("xsel -ib", getreg())
autocmd VimSuspend * call system("xsel -ib", getreg())
"if has("autocmd")
" augroup templates
" autocmd BufNewFile *.h 0r $XDG_CONFIG_HOME/vim/templates/skeleton.h
" autocmd BufNewFile *.h "s/<++DEF++>/" toupper(expand('%:t:r') . "_" . expand('%:e')))
" augroup END
"endif
|