-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
80 lines (65 loc) · 1.84 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" IdeaVIM
set surround
set ideajoin
set argtextobj
let g:argtextobj_pairs="(:),{:},<:>,[:]"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Highlight the screen line of the cursor
set cursorline
" set number
set hlsearch " switch on highlighting the last used search pattern.
" Don't use Ex mode, use Q for formatting
map Q gq
" In many terminal emulators the mouse works just fine, thus enable it.
" if has('mouse')
" set mouse=a
" endif
let mapleader = "\"
" leader w to delete buffer
map <leader>w <Action>(CloseContent)
vmap <leader>w <C-C><Action>(CloseContent)
imap <leader>w <Esc><Action>(CloseContent)
" leader s to save
map <leader>s <Action>(SaveDocument)
vmap <leader>s <C-C><Action>(SaveDocument)
imap <leader>s <Esc><Action>(SaveDocument)
" use OS clipboard
set clipboard^=unnamedplus
" center current line on screen
" set scrolloff=1000
" vim-sneak
"map f <Plug>Sneak_f
"map F <Plug>Sneak_F
"map t <Plug>Sneak_t
"map T <Plug>Sneak_T
" easy window navigation
nnoremap <c-l> <c-w>l
nnoremap <c-j> <c-w>j
nnoremap <c-h> <c-w>h
nnoremap <c-k> <c-w>k
nnoremap <a-h> gT
nnoremap <a-l> gt
nmap <a-m> <Action>(MethodUp)
nmap <a-M> <Action>(MethodDown)
" unimpaired mappings
map [<space> O<esc>j
map ]<space> o<esc>k
map [q <Action>(PreviousOccurence)
map ]q <Action>(NextOccurence)
map [m <Action>(MethodUp)
map ]m <Action>(MethodDown)
map [c <Action>(VcsShowPrevChangeMarker)
map ]c <Action>(VcsShowNextChangeMarker)
map [b <Action>(PreviousTab)
map ]b <Action>(NextTab)
map <c-l> :nohlsearch<CR>
" exit insert mode
inoremap <C-c> <Esc>
" line motion
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
inoremap <C-j> <Esc>:m .+1<CR>==gi
inoremap <C-k> <Esc>:m .-2<CR>==gi
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv