-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.ideavimrc
48 lines (35 loc) · 1.22 KB
/
.ideavimrc
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
# column wrapping
vmap gq :action com.andrewbrookins.idea.wrap.WrapAction<CR>
# surround with parentheses
set surround
# emulates easymotion
set easymotion
# commenting
set commentary
" use osx clipboard
set clipboard=unnamed
" searching
set incsearch
set hlsearch
" language configs
autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
autocmd FileType xml setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
autocmd FileType thrift setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
autocmd FileType vim setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
autocmd FileType proto setlocal tabstop=2 shiftwidth=2 expandtab noautoindent
# change leader key to ,
let mapleader = ","
" for wrapping, etc
set textwidth=100
" Allow using the repeat operator with a visual selection (!)
" http://stackoverflow.com/a/8064607/127816
vnoremap . :normal .<CR>
" visual shifting retain selection
vnoremap > >gv
vnoremap < <gv
" comment with <Leader>cc
vmap <Leader>cc gcc
" allow visual block mode to exit even outside character space
set virtualedit=block