-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
91 lines (72 loc) · 2.16 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
" Vundle stuff
set background=dark
call plug#begin('~/.vim/bundle')
Plug 'JamshedVesuna/vim-markdown-preview'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-obsession'
Plug 'vim-airline/vim-airline'
Plug 'lervag/vimtex'
Plug 'lambdalisue/suda.vim'
" Plug 'tmux-plugins/vim-tmux-focus-events'
" Plug 'Valloric/YouCompleteMe'
Plug 'thinca/vim-localrc'
call plug#end()
" End Vundle
" show existing tab with 4 spaces width
set tabstop=4
" when intending with '>' use 4 spaces width
set shiftwidth=4
set updatetime=100
" On pressing tab, insert 4 spaces
set expandtab
" Autoindent
set autoindent
" Custom Title Name while modifying file
set title
" Shows Absolute Line number on current line and relative number on other lines
set number relativenumber
" Remap Caps Lock to Escape
" au FocusGained * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
" au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
" au FocusLost * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'
" au VimLeave * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'
" Do some Remappings for \
nmap <leader>w :w<CR>
nmap <leader>q :q<CR>
nmap <leader>j <Plug>GitGutterNextHunk
nmap <leader>k <Plug>GitGutterPrevHunk
" Remappings for german keyboard layout in normal mode
nmap Ö :
nmap ö ;
nmap ä '
nmap Ä "
if has('nvim')
nnoremap <silent> <ESC> :noh<CR><ESC>
endif
" Differnt Color for Line Numbers
highlight LineNr ctermfg=grey
" Show Lines above and below cursor
set scrolloff=8
" set mouse=a
" Set cursor shape for vim
" Not needed for neoVim
" let &t_SI = "\<Esc>[6 q"
" let &t_SR = "\<Esc>[4 q"
" let &t_EI = "\<Esc>[2 q"
" Markdown Preview
let vim_markdown_preview_github=1
let g:vimtex_compiler_progname = 'nvr'
let g:ycm_python_binary_path = 'python3'
let g:ycm_confirm_extra_conf = 0
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:airline_powerline_fonts = 1
let g:airline_exclude_preview = 1
" Edit with suda as soon as something is not writable
let g:suda_smart_edit = 1
if exists('&signcolumn')
set signcolumn=yes
else
let g:gitgutter_sign_column_always = 1
endif
highlight! link SignColumn LineNr