-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.base
41 lines (39 loc) · 1.18 KB
/
vimrc.base
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
" This file should include the parts of my .vimrc file that are to be shared
" with IdeaVIM. Both .ideavimrc and .vimrc include this
set incsearch
set ignorecase
" nnoremap <M-S-Up> <C-W><Up>
" nnoremap <M-S-Down> <C-W><Down>
" nnoremap <M-S-Left> <C-W><Left>
" nnoremap <M-S-Right> <C-W><Right>
" nnoremap <M-S-k> <C-W><Up>
" nnoremap <M-S-j> <C-W><Down>
" nnoremap <M-S-h> <C-W><Left>
" nnoremap <M-S-l> <C-W><Right>
" Move up/down/left/right on splits
nnoremap <C-k> <C-W><Up>
nnoremap <C-j> <C-W><Down>
" Scroll using Ctrl+Up/Down
nnoremap <C-Down> <C-E>
nnoremap <C-Up> <C-Y>
inoremap <C-Down> <C-o><C-E>
inoremap <C-Up> <C-o><C-Y>
" Use Home to go to first character in line
nnoremap <Home> _
inoremap <Home> <C-o>_
" Remap H and L to go to the beginning and end of line
noremap H ^
noremap L g$
" Save using Ctrl+S
nnoremap <C-s> :wa<Enter>
inoremap <C-s> <C-o>:wa<Enter>
" Move logical lines (in case of wraps) using C+j/k
"nnoremap <C-j> gj
"nnoremap <C-k> gk
"vnoremap <C-j> gj
"vnoremap <C-k> gk
nnoremap <expr> j v:count ? 'j' : 'gj'
nnoremap <expr> k v:count ? 'k' : 'gk'
" A useful shortcut for the unnamed buffer, as "_ is not fun to type as part
" of various combinations
nnoremap <C-'> "_