-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathideavimrc
118 lines (96 loc) · 3.42 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
117
118
"source ~/.vimrc
set visualbell
set noerrorbells
let mapleader = " "
nnoremap ; :
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
map <Tab> %
map Y y$
noremap K <Nop>
set ideajoin
set showmode
set scrolloff=3
set sidescrolloff=3
" plugins
set surround
set easymotion
set commentary
set ReplaceWithRegister
set exchange
set highlightedyank
set argtextobj
set NERDTree
" Integrate with system clipboard
set clipboard=ideaput,unnamedplus,unnamed
" Better searching
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
nnoremap <leader>, :noh<cr>
" vim delete and change, with sexps!
map <leader>x :action :cursive.actions.paredit/kill-sexp<CR>
map <leader>D :action :cursive.actions.paredit/kill<CR>
map <leader>c :action :cursive.actions.paredit/kill<CR>i
" Since kill copies to system clipboard, it's nice to have easy access to clipboard paste
map <leader>p +p
" Sexp editing mappings straight from paredit.vim
map <leader>J :action :cursive.actions.paredit/join<CR>
map <leader>O :action :cursive.actions.paredit/split<CR>
map <leader>S :action :cursive.actions.paredit/splice<CR>
map <leader>I :action :cursive.actions.paredit/raise<CR>
" Slurp and barf
map <leader>< :action :cursive.actions.paredit/barf-forwards<CR>
map <leader>> :action :cursive.actions.paredit/slurp-forwards<CR>
" map <leader>L :action :cursive.actions.paredit/slurp-backwards<CR>
" map <leader>H :action :cursive.actions.paredit/barf-backwards<CR>
" leader + wrapping symbol for wrapping
map <leader>( :action :cursive.actions.paredit/wrap-paren<CR>
map <leader>[ :action :cursive.actions.paredit/wrap-square<CR>
map <leader>{ :action :cursive.actions.paredit/wrap-curly<CR>
map <leader>" :action :cursive.actions.paredit/wrap-quotes<CR>
" Cycle collection
" map <leader>C :action :cursive.actions.paredit/cycle-collection-type<CR>
" Evaluate sexp like in vim-fireplace
map cpp :action :cursive.repl.actions/run-top-sexp<CR>
map cpr :action :cursive.repl.actions/load-file<CR>
map crt :action :cursive.testing.actions/rerun-last-test<CR>
map cpt :action :cursive.testing.actions/run-ns-tests<CR>
" Force a single "parinference" when in paredit mode and reformat
map <leader>rp :action :cursive.actions.paredit/toggle<CR>:action :cursive.actions.paredit/toggle<CR>kj:action :cursive.actions.paredit/toggle<CR>:action ReformatCode<CR>
nmap <C-f> :action GotoFile<cr>
"nmap <leader>c :action GotoClass<cr>
nmap <leader>ns :action GotoSymbol<cr>
nmap <leader>nm :action FileStructurePopup<cr>
nmap gh :action ShowErrorDescription<cr>
nmap <leader>g :action QuickJavaDoc<cr>
nmap gd :action GotoDeclaration<cr>
nmap gi :action GotoImplementation<cr>
map <leader>t :action JumpToLastWindow<CR>
" Press `f` to activate AceJump
map ' <Plug>(easymotion-prefix)
"map f <Plug>(easymotion-fl)
map F <Plug>(easymotion-bd-f)
map K <Plug>(easymotion-bd-jk)
" Refactoring
map <leader>rr :action RenameElement<CR>
map <leader>rt :action Refactorings.QuickListPopupAction<CR>
map <leader>i :action ShowIntentionActions<CR>
" Debugging
map <leader>bt :action ToggleLineBreakpoint<CR>
map <leader>bm :action XDebugger.MuteBreakpoints<CR>
map <leader>dd :action Debug<CR>
map <leader>do :action StepOver<CR>
map <leader>di :action StepInto<CR>
map <leader>dr :action Resume<CR>
map <leader>dx :action Stop<CR>
" Version control
"" git add line
map <leader>gal :action ChangesView.AddUnversioned<CR>
"" git add all
map <leader>gaa :action Git.Add<CR>
"" git log
map <leader>gl :action Vcs.Show.Log<CR>