-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
89 lines (65 loc) · 1.68 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
" .vimrc of Patrick Winter <patrickwinter@posteo.ch>
" Load theme
colorscheme retrobox
" Ergnomic replacement for esc
:imap jk <Esc>
:imap kj <Esc>
" leader
let mapleader = " "
" leader mappings
nnoremap <silent> <leader>s :split<CR>
nnoremap <silent> <leader>v :vsplit<CR>
nnoremap <silent> <leader>q :close<CR>
" unsorted
set nocompatible
" indentation
filetype plugin indent on
" expand tabs into spaces
set expandtab
" when using the >> or << commands, shift lines by 4 spaces
set shiftwidth=4
set softtabstop=4
" set tabs to have 4 spaces
set tabstop=4
" indent when moving to the next line while writing code
set autoindent
" spellchecking
"set spell spelllang=de,en
" controls
let mapleader=","
set backspace=indent,eol,start
" disable arrow keys
for prefix in ['i', 'n', 'v']
for key in ['<Up>', '<Down>', '<Left>', '<Right>']
exe prefix . "noremap " . key . " <Nop>"
endfor
endfor
" line numbering
set number
" enable syntax highlighting
syntax on
" highlight searches
set hlsearch
" show a visual line under the cursor's current line
" set cursorline
" show the matching part of the pair for [] {} and ()
set showmatch
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Instead of failing a command because of unsaved changes, instead raise a
" dialogue asking if you wish to save changed files.
set confirm
" Use visual bell instead of beeping when doing something wrong
set visualbell
" Better command-line completion e.g. set colorscheme <Tab>
set wildmenu
" Enforce utf-8
set encoding=utf-8