-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.last
69 lines (54 loc) · 1.5 KB
/
vimrc.last
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
set tabstop=2
set softtabstop=2
set shiftwidth=2
set noautochdir
" Remap leader to space
nnoremap <Space> <nop>
let mapleader = "\<Space>"
nnoremap <leader>o :CtrlP<CR>
" Split buffers vertically
nnoremap <leader>w <C-w>v<C-w>l
" Easier split navigation
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>
" More natural split opening
set splitbelow
set splitright
" Jump forward or backward with s
nmap s <Plug>(easymotion-s)
" Copy and paste to system clipboard
vmap <Leader>y "+y
vmap <Leader>d "+d
nmap <Leader>p "+p
nmap <Leader>P "+P
vmap <Leader>p "+p
vmap <Leader>P "+P
" Fast region expanding
vmap v <Plug>(expand_region_expand)
vmap <C-v> <Plug>(expand_region_shrink)
" Have CtrlP use silversearcher or git
let g:ctrlp_use_caching = 0
if executable('/usr/bin/ag')
set grepprg=/usr/bin/ag\ --nogroup\ --nocolor
let g:ctrlp_user_command = '/usr/bin/ag %s -l --nocolor -g ""'
else
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': ['<space>', '<cr>', '<2-LeftMouse>'],
\ }
endif
" Toogle Gundo
nnoremap <F2> :GundoToggle<CR>
" Set some Gundo magic
let g:gundo_width = 40
let g:gundo_right = 1
" Don't show the bufferline in the command bar
let g:bufferline_echo = 0
let g:gist_clip_command = 'xclip -selection clipboard'
let g:gist_detect_filetype = 1
let g:gist_post_private = 1
set relativenumber
" RAINBOWS!
let g:rainbow_active = 1