-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
99 lines (79 loc) · 2.67 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
"" Source your .vimrc
"source ~/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
let mapleader=' '
set scrolloff=5
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmode
set number
set relativenumber
set keep-english-in-normal
set clipboard+=unnamed
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
" Find more examples here: https://jb.gg/share-ideavimrc
" IdeaVim Plugins: https://github.com/JetBrains/ideavim/blob/master/doc/IdeaVim%20Plugins.md
Plug 'easymotion/vim-easymotion'
Plug 'preservim/nerdtree'
Plug 'tpope/vim-surround'
" Plug 'mg979/vim-visual-multi', {'branch': 'master'}
Plug 'tpope/vim-commentary'
Plug 'machakann/vim-highlightedyank'
" clear the highlighted search result
nnoremap <Leader>nh :nohlsearch<CR>
" Quit\Save normal mode
nnoremap <Leader>q :q<CR>
nnoremap <Leader>Q :qa!<CR>
nnoremap <Leader>x :x<CR>
" Switch Tab
nnoremap tn gt
nnoremap tp gT
" CamelCaseMotion Simulation
" MotionCamelRightAction
map <Leader>w [w
" MotionCamelEndRightAction
map <Leader>e ]w
" MotionCamelLeftAction
map <Leader>b [b
" ====================================================
" Note: Show all the provided actions via `:actionlist`
" ====================================================
" search in project
nnoremap <Leader>fe :action SearchEverywhere<CR>
" find usage
nnoremap <Leader>fu :action FindUsages<CR>
" find string
nnoremap <Leader>/ :action Find<CR>
nnoremap <Leader>ga :action GotoAction<CR>
nnoremap <Leader>gc :action GotoClass<CR>
nnoremap <Leader>gd :action GotoDeclaration<CR>
nnoremap <Leader>gf :action GotoFile<CR>
nnoremap <Leader>gh :action ShowUsages<CR>
nnoremap <Leader>gi :action GotoImplementation<CR>
nnoremap <Leader>gs :action GotoSymbol<CR>
nnoremap <Leader>gt :action GotoTest<CR>
nnoremap <C-o> :action Back<CR>
nnoremap <C-i> :action Forward<CR>
" change every related element name
nnoremap <Leader>re :action RenameElement<CR>
" change current file name
nnoremap <Leader>rf :action RenameFile<CR>
nnoremap <Leader>ta :action Annotate<CR>
nnoremap <Leader>tb :action ToggleLineBreakpoint<CR>
nnoremap <Leader>tm :action ToggleBookmark<CR>
nnoremap <Leader>tp :action ActivateProjectToolWindow<CR>
" =========== NERDTree Remap ===========
nnoremap <Leader>nf :NERDTreeFocus<CR>
nnoremap <Leader>nt :NERDTreeToggle<CR>
nnoremap <Leader>ns :NERDTreeFind<CR>
nnoremap <Leader>nc :NERDTreeClose<CR>