-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
151 lines (127 loc) · 4.67 KB
/
.vimrc
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
" be iMproved, required by vundle
set nocompatible
" set the runtime path to include Vundle and initialize
"set rtp+=~/.vim/bundle/Vundle.vim
call plug#begin('~/.vim/bundle')
filetype off " required (pluginmanager)
" OTHER PLUGINS
Plug 'vim-airline/vim-airline' " powerline
Plug 'thomwiggers/vim-colors-solarized' " solarized colors
"Plug 'morhetz/gruvbox' " gruvbox colors
Plug 'YorickPeterse/happy_hacking.vim'
Plug 'sherifkandeel/vim-colors'
Plug 'benekastah/neomake' " async. syntax checker
Plug 'davidhalter/jedi-vim' " python completion
Plug 'hynek/vim-python-pep8-indent' " python pep8
Plug 'LaTeX-Box-Team/LaTeX-Box' " Lightweight Toolbox for LaTeX
Plug 'airblade/vim-gitgutter' " git changes in gutter
Plug 'tpope/vim-fugitive' " git commit/diff/...
Plug 'scrooloose/nerdcommenter' " comments
Plug 'kshenoy/vim-signature' " display,toggle and iterate marks
Plug 'kien/ctrlp.vim' " ctrl p filebrowser
Plug 'SirVer/ultisnips' " sniplets engine
Plug 'honza/vim-snippets' " sniplets
"Plug 'ivanov/vim-ipython' " communication with ipython kernels
Plug 'rust-lang/rust.vim' " vim rust ftplugin
Plug 'chase/vim-ansible-yaml' " vim ansible ftplugin
"Plug 'Valloric/YouCompleteMe' " completion for several languages
Plug 'ajh17/VimCompletesMe' " very simple completion
Plug 'editorconfig/editorconfig-vim' " EditorConfig File support
Plug 'dbeniamine/todo.txt-vim' " todo.txt support
" all plugins must be added before this line
call plug#end() " required (pluginmanager)
filetype plugin indent on " required (vundle)
" DISPLAY OPTIONS
" set colorscheme
colorscheme solarized
set background=dark
set display+=lastline " display last edited line
set showmode " display current mode
let &showbreak = ' ↳ ' " show linebreak
set laststatus=2 " show last status
set nu " line numbers
set matchpairs=(:),[:],{:},<:> " set matching brackets, etc.
set list
set listchars=tab:▸\ ,trail:·,precedes:«,extends:» " display tabs and trailing spaces
set mouse=a
" be quiet
set noerrorbells
set novisualbell
" always report on changes
set report=0
" redefine vim settings
if !has('nvim')
set syntax " highlight syntax
set nobackup " dont create ~-files
set showmatch " show matching brackets etc.
endif
" SEARCH OPTIONS
set ignorecase " ignore case-sensitivity
set smartcase " same except for patterns containing upper case
set hlsearch " highlight search
" make the history longer
set history=1000
" save undo history
set undofile
set undodir=$HOME/.vim/undo
if !isdirectory($HOME.'/.vim/undo')
call mkdir($HOME.'/.vim/undo', "p")
endif
" use own skeletons for new files
au BufNewFile *.py 0r ~/.vim/skeleton/skeleton.py | normal | Gdd
" FOLDS
set foldmethod=marker
" load and write folds automatical
autocmd BufWrite *.* mkview
autocmd BufRead *.* silent! loadview
" WRITING
set autowrite " write all files when calling :make
set hidden " dont close changed window
" write as sudo
cmap w!! %!sudo tee > /dev/null %
" COMPLETION
set wildchar=<TAB> " type to start wildcard expansion in the command-line
set wildmenu " nicer autocompletion
set wildmode=full " alternative: longest,list
" ignore pattern for files: ignore that TeX crap
set wildignore+=*.*~,*.acn,*.acr,*.alg,*.aux,*.bbl,*.bcf,*.blg,*.dvi,*.fdb_latexmk,*.fls,
set wildignore+=*.glg,*.glo,*.gls,*.ist,*.latexmain,*.log,*.nav,*.nlo,*.out,*.pdf*,
set wildignore+=*.run.xml,*.slg,*.snm,*.syg,*.syi,*.synctex.gz,*.tdo,*.toc,*/tmp/*
" keep selection when re-indenting
vnoremap < <gv
vnoremap > >gv
" LaTeX: latex instead of plain-tex
let g:tex_flavor = "latex"
" tikz is tex
autocmd Bufread,BufNewFile *.tikz set filetype=tex
" PLUGIN CONFIGURATION
" airline config
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
" YouCompleteMe options
"let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
" let g:ycm_path_to_python_interpreter='/usr/bin/python/'
" use omnicomplete whenever there's no completion engine
"set omnifunc=syntaxcomplete#Complete
"let g:ycm_key_list_select_completion = ['<Tab>']
"let g:ycm_key_list_previous_completion = ['<S-Tab>']
" ultisnips
let g:UltiSnipsSnippetsDir="~/.vim/bundle/vim-snippets/UltiSnips"
let g:UltiSnipsExpandTrigger="<s-enter>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
" run Neomake when writing a file if it is installed
" as plugins are only loaded after the vimrc is processed,
" if_exists(':Neomake') will always be false if called from within
" the vimrc
function Run_neomake()
if exists(':Neomake')
Neomake
endif
endfunction
" activate live substitution
if exists('&inccommand')
set inccommand=split
set incsearch
endif
autocmd! BufWritePost * call Run_neomake()