-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
47 lines (34 loc) · 1.01 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
" Allow vim features not compatable with vi
set nocompatible
" Allow mouse control
set mouse=a
" Turn on line numbers
set number
" Always expand tabs into spaces
set expandtab
" Tab to nearest tab point
set shiftround
" Number of spaces in a tab
set shiftwidth=4
" Hilight search results
set hlsearch
" Show command input as it is being typed
set showcmd
" Remap esc to the home row. Roll through 'kj' to leave insert mode (Esc still works).
inoremap kj <Esc>
" Allow normal mode . command in visual mode
vnoremap . :norm.
"Search for visually selected text with //
vnoremap // y/<C-R>"<CR>
" Add a new line without leaving 'normal' mode
" <Bslash> takes line with you. <CR> leaves line behind.
" Mark q is reserved for this action.
nnoremap <CR> o<Esc>
nnoremap <Bslash> mqO<Esc>`q
" K now pastes from the default yank register '"0p'
" This is repeatable unlike p. The replaced text can be accessed with '""p'
vnoremap K "0P
nnoremap K "0P
" Load mycolors and set colorscheme
packadd! mycolors
colorscheme lilypink