-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
58 lines (44 loc) · 1.3 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
set number
set relativenumber
set nohlsearch
set incsearch
set showcmd
set ignorecase
set smartcase
set tabstop=2
set shiftwidth=0 " If 0, then uses value of 'tabstop'
set softtabstop=-1 " If negative, then uses 'shiftwidth' (which can use 'tabstop')et shiftwidth=2
set scrolloff=8
let mapleader=" "
"" NOTE: !!! Register 'x' is reserved for macros !!!!
"" map - map a new key pattern to an existing key pattern
"" noremap - ^ no recursion, new key patterns are only matched with standard vim motions
"" nnoremap - ^ new key pattern is only valid for normal mode
"" concat current line with next but don't move cursor
nnoremap J mzJ`z
"" jump up/down but cursor stays in middle
nnoremap <C-u> <C-u>zz
nnoremap <C-d> <C-d>zz
nnoremap <C-down> gj
vnoremap <C-down> gj
nnoremap <C-up> gk
vnoremap <C-up> gk
inoremap <Shift-up> up
inoremap <shift-down> down
vnoremap < <gv
vnoremap > >gv
"" paste over selection without adding replaced text to yank buffer
xnoremap <leader>p pgvy
"" yank to system clipboard
nnoremap <leader>y "+y
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y
nnoremap <leader>ya mxggVGy`x
"" delete text to blackhole register
nnoremap <leader>d "_d
vnoremap <leader>d "_d
"" delete character to blackhole register
nnoremap x "_x
nnoremap <leader>x x
nnoremap <SPACE> <Nop>
nnoremap <leader>vm :marks<CR>