-
Notifications
You must be signed in to change notification settings - Fork 2
/
.vimrc
156 lines (121 loc) · 3.18 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
152
153
154
155
156
set nocompatible
set title
set nu
set ruler
set showcmd
set cursorline
" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
" Indentation
set expandtab
set tabstop=4
set shiftwidth=4
set backspace=indent,eol,start
set shiftround
set smarttab
" Mappings
" Make <s-tab> work
map <esc>[Z <s-tab>
ounmap <esc>[Z
" Esc
" noremap <caps> <esc>
" Backspace character
noremap x "_X
" Delete character
noremap X "_x
" Delete word
noremap dw "_dw
" Delete Word
noremap dW "_dW
" Delete to end of word
noremap de "_de
" Delete to end of Word
noremap dE "_dE
" Delete line
noremap dd "_dd
" Join
noremap G J
" (Soft) beginning of line
noremap H ^
" End of line
noremap L $
" Top of buffer
noremap J G
" Bottom of buffer
noremap K gg
" Copy and paste current line below
noremap yp yyp
" Copy and paste current line above
noremap yP yyP
" Cut the current line
noremap yd yydd
" Hide search results
noremap \ :nohlsearch<enter>
" Enter
noremap <enter> i<enter><esc>
" Undo
" noremap u u
" Redo
noremap U <c-r>
" Insert
" noremap i i
" Insert at beginning of line
" noremap I I
" Paste after
" noremap p p
" Paste before
" noremap P P
" Tab
noremap <tab> i<tab><esc>^
" Untab
map <s-tab> i<bs><esc>^
" Comment out line
" TODO Language-specific
noremap # ^i//<esc>
" Syntax
syntax on
hi clear
hi Normal ctermfg=white
hi Cursor ctermbg=red
hi lCursor ctermbg=magenta
hi Title ctermfg=green
hi Comment ctermfg=gray
hi Number ctermfg=yellow
hi Boolean ctermfg=darkyellow
hi String ctermfg=yellow
hi Constant ctermfg=yellow
hi Identifier ctermfg=cyan
hi PreProc ctermfg=yellow
hi Special ctermfg=white
hi Statement ctermfg=cyan
hi Delimiter ctermfg=white
hi Type ctermfg=green
hi LineNr ctermfg=darkgray
hi NonText ctermfg=gray
hi Search ctermfg=black ctermbg=white
hi MoreMsg ctermfg=magenta
hi Question ctermfg=green
hi DiffAdd ctermbg=LightBlue guibg=LightBlue
hi DiffChange ctermbg=Lightred guibg=LightMagenta
hi DiffDelete ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi DiffText ctermbg=Red cterm=bold gui=bold guibg=Red
hi Directory ctermfg=Cyan guifg=Blue
hi ErrorMsg ctermfg=White ctermbg=DarkRed guibg=Red guifg=White
hi FoldColumn ctermfg=DarkBlue ctermbg=Grey guibg=Grey guifg=DarkBlue
hi Folded ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi IncSearch cterm=reverse gui=reverse
hi ModeMsg cterm=bold gui=bold
hi NonText ctermfg=Blue gui=bold guifg=gray guibg=white
hi Pmenu guibg=LightBlue
hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
hi SpecialKey ctermfg=DarkBlue guifg=Blue
hi StatusLine cterm=bold ctermbg=gray ctermfg=black guibg=gold guifg=blue
hi StatusLineNC cterm=bold ctermbg=gray ctermfg=black guibg=gold guifg=blue
hi VertSplit cterm=reverse gui=reverse
hi Visual ctermbg=NONE cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS cterm=underline,bold gui=underline,bold
hi WarningMsg ctermfg=DarkRed guifg=Red
hi WildMenu ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black