-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
116 lines (96 loc) · 2.59 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
" set leader key
let g:mapleader = "\<Space>"
set iskeyword+=-
set number
set noshowmode
" funa setting
set hlsearch
set ignorecase
set smartcase
set noincsearch
set nowrapscan
set viminfo+=:10000
set visualbell
" set for ideavim only
" Plugins
set NERDTree
set commentary
set surround
" Normalモードに戻ったら必ず半角に
" https://plugins.jetbrains.com/plugin/9615-ideavimextension
set keep-english-in-normal
" which-key plugin
" https://github.com/TheBlob42/idea-which-key
set which-key
" disable the timeout option
set notimeout
" increase the timeoutlen (default: 1000)
set timeoutlen = 5000
" If true, join command will be performed via IDE
" See wiki/`ideajoin` examples
set ideajoin
" Keymap
inoremap jj <Esc>
inoremap jk <Esc>
inoremap kj <Esc>
" disable recording to macro
nnoremap q <Nop>
" history-search-backward like zsh
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
" Emacs binding in command mode.
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
cnoremap <C-d> <Del>
" TAB in general mode will move to next buffer
nnoremap <TAB> :bnext<CR>
" SHIFT-TAB will go back
nnoremap <S-TAB> :bprevious<CR>
" Better tabbing
vnoremap < <gv
vnoremap > >gv
" Better window navigation
nnoremap <C-h> <C-w>h
" nnoremap <C-j> <C-w>j
" nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
"same as Eclipse [Cmd]+[Option]+R
nmap <M-A-R> <Action>(RenameElement)
" nmap <space>r :action RenameElement<CR>
nmap <C-c>c <Action>(Run)
" nmap <space>1 :action ShowIntentionActions<CR> " default is [option]-[Enter]
"" My keymappings
map <C-U> :nohlsearch<CR>
nmap <C-o> <Action>(Back)
nmap <C-i> <Action>(Forward)
nmap <C-j> <Action>(VcsShowNextChangeMarker)
nmap <C-k> <Action>(VcsShowPrevChangeMarker)
nmap <C-n> <Action>(GotoNextError)
nmap <C-p> <Action>(GotoPreviousError)
" nmap <space><space> :action QuickJavaDoc)
inoremap <C-b> <Left>
inoremap <C-f> <Right>
inoremap <silent> <C-d> <Del>
" move in wrapped line by arrow key
nnoremap <Down> gj
nnoremap <Up> gk
" nmap gr <Action>(FindUsages)
nmap ga <Action>(ShowIntentionActions)
nmap gr <Action>(ShowUsages)
nmap gh <Action>(CallHierarchy)
nmap gu <Action>(ShowUMLPopup)
" with leader key
nmap <leader>d <Action>(Debug)
nmap <leader>r <Action>(RenameElement)
nmap <leader>c <Action>(Stop)
nmap <leader>z <Action>(ToggleDistractionFreeMode)
nmap <leader>s <Action>(SelectInProjectView)
nmap <leader>a <Action>(Annotate)
nmap <leader>h <Action>(Vcs.ShowTabbedFileHistory)
nmap <S-Space> <Action>(GotoNextError)
map <leader>b <Action>(ToggleLineBreakpoint)
map <leader>o <Action>(FileStructurePopup)
" test
" nnoremap <C-q> <Action>(JumpToLastWindow)