aboutsummaryrefslogtreecommitdiff
path: root/vimrc
blob: 2214e7b63c52555ff8b18ab59f95920bcad89fec (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
exec ':source '.fnamemodify($MYVIMRC,':h').'/'.'vimrc-common' 

set packpath+=pack/vim


set ttymouse=xterm2
set term=xterm-256color  " usually a good choice, install ncurses and use `toe` to see all available choices
set ttybuiltin      | " use internal termcaps, because these are more stable
set ttyscroll=100   | " improves speed for terminal vim, incompatible with nvim
set ttyfast         | " improves speed for terminal vim (incompatible with nvim)
set restorescreen   | " restores the console after exiting vim (intentionally not in nvim)

" autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib")
" autocmd VimLeave * call system("xsel -ib", getreg('+'))
autocmd VimLeave * call system('echo ' . shellescape(getreg('+')) . ' | xclip -selection clipboard')


" scripts from the default vim installation, which do not get loaded by default, but are useful.
if filereadable($VIMRUNTIME.'/macros/editexisting.vim')
    packadd! editexisting
endif

" load default plugin 'matchit' to allow % to jump between tags
if filereadable($VIMRUNTIME.'/macros/matchit.vim')
    packadd! matchit
endif

"=======================================================================================================================
augroup YOUCOMPLETEME
	let g:ycm_error_symbol                             = '✖'      " insert this as an error symbol in the gutter bar/sign column
	let g:ycm_warning_symbol                           = '➔'      " insert this as a warning symbol in the gutter bar/sign coloumn

	let g:ycm_autoclose_preview_window_after_insertion = 0
	let g:ycm_auto_trigger                             = 1
	let g:ycm_collect_identifiers_from_tags_files      = 1        " Let YCM read tags from Ctags file
	let g:ycm_confirm_extra_conf                       = 0        " security is overrated ;)
	let g:ycm_always_populate_location_list            = 0        " we can manually run :YcmDiags to do that

	let g:ycm_key_list_previous_completion             = ['Up']
	let g:ycm_key_list_select_completion               = ['Down']

	let g:ycm_semantic_triggers                        =
				\ {
				\   'c': [ 're!\w{2}' ]
				\ } " per language configurations


	packadd YouCompleteMe
augroup END



..