/
ideavimrc
75 lines (63 loc) · 1.86 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
let mapleader=" "
filetype plugin indent on
set ignorecase smartcase
set relativenumber
set number
set hlsearch
set scrolloff=3
set showmode
set surround
set mps+=<:>
" esc
inoremap jk <Esc>`^
" splits
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h
" Moving blocks of text in visual mode
vnoremap < <gv
vnoremap > >gv
" Copy until the end of the line
noremap Y y$
" remove trailing whitespace
nmap <F1> :%s/\s\+$<CR>
" ---> IDEA mappings
nnoremap cow :action EditorToggleUseSoftWraps<CR>
nnoremap col :action EditorToggleShowWhitespaces<CR>
nnoremap cor :set relativenumber!<CR>
nnoremap con :set number!<CR>
nnoremap / :action Find<CR>
nnoremap g/ /
nnoremap n :action FindNext<CR>
nnoremap N :action FindPrevious<CR>
nnoremap U :action $Redo<CR>
"nnoremap ; :action AceJumpAction<CR>
nnoremap <C-Space> :action GotoFile<CR>
" file navigation
nnoremap <leader>o :action GotoClass<CR>
nnoremap <leader>O :action GotoFile<CR>
nnoremap <leader>d :action CloseContent<CR>
nnoremap <leader>j :action RecentFiles<CR>
nnoremap <leader>k :action FileStructurePopup<CR>
nnoremap <leader>h :action QuickJavaDoc<CR>
" code navigation
nnoremap <C-]> :action GotoImplementation<cr>
nnoremap <C-[> :action GotoSuperMethod<cr>
nnoremap <leader>u :action FindUsages<cr>
nnoremap <leader>gt :action GotoTest<cr>
" nnoremap <leader>k :action HighlightUsagesInFile<cr>
nnoremap ,r :action RunClass<cr>
nnoremap ,R :action Run<cr>
nnoremap ,d :action DebugClass<cr>
nnoremap ,D :action Debug<cr>
nnoremap ,c :action CheckStyleCurrentFileAction<cr>
" unimpaired mappings
nnoremap [<space> O<esc>j
nnoremap ]<space> o<esc>k
nnoremap [q :action PreviousOccurence<cr>
nnoremap ]q :action NextOccurence<cr>
nnoremap [m :action MethodUp<cr>
nnoremap ]m :action MethodDown<cr>
nnoremap [c :action VcsShowPrevChangeMarker<cr>
nnoremap ]c :action VcsShowNextChangeMarker<cr>