-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
88 lines (73 loc) · 2.08 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
set relativenumber
set number
set surround
set sneak
set ideajoin
set commentary
set textobj-entire
set highlightedyank
" grr (replace file with register) grr (replace line with register)
set ReplaceWithRegister
" Custom commands
command! Format action ReformatCode
let mapleader = " "
" credit: https://gist.github.com/dewaka/ef947e52767bf453eaf77c852051eb7e
" key bindings for quickly moving between windows
" h left, l right, k up, j down
nmap <leader>h <c-w>h
nmap <leader>l <c-w>l
nmap <leader>k <c-w>k
nmap <leader>j <c-w>j
" Splits manipulation
nmap <leader>ws :action SplitHorizontally<cr>
nmap <leader>wv :action SplitVertically<cr>
nmap <leader>wc :action Unsplit<cr>
nmap <leader>wC :action UnsplitAll<cr>
" Refactorings
vmap T :action Refactorings.QuickListPopupAction<cr>
nmap <leader>rn :action RenameElement<cr>
nmap <leader>rg :action Generate<cr>
nmap <leader>rI :action OptimizeImports<cr>
" Inspection
" nmap <leader>rc :action InspectCode<cr>
" Closing tabs
nmap <leader>q :action CloseContent<cr>
nmap <leader>Q :action ReopenClosedTab<cr>" Navigation
" Navigations
nmap <leader>gd :action GotoDeclaration<cr>
nmap <leader>u :action FindUsages<cr>
nmap <C-f> :action GotoFile<cr>
nmap <leader>gc :action GotoClass<cr>
nmap <leader>gs :action GotoSymbol<cr>
nmap <leader>gd :action ShowErrorDescription<cr>
nmap <leader>gi :action GotoImplementation<cr>
nmap <leader>ac :action ShowErrorDescription<cr>
" Errors
nmap [g :action GotoNextError<cr>
nmap ]g :action GotoPreviousError<cr>
" Tabs
nnoremap [b :action PreviousTab<cr>
nnoremap ]b :action NextTab<cr>
" Terminal
nmap <leader>T :action ActivateTerminalToolWindow<cr>
" Search
nmap <C-g> :action FindInPath<cr>
" External Neovim
nmap <leader>nv :action Tool_External Tools_nvim<cr>
" External Vscode
nmap <leader>vs :action Tool_External Tools_vscode<cr>
" from init.vim
set tabstop=2 softtabstop=2
set shiftwidth=2
set expandtab
set autoindent
set smartindent
set nu
set ignorecase
set smartcase
set noswapfile
set nobackup
set incsearch
set backspace=indent,eol,start
set clipboard+=unnamedplus " use system clipboard
set history=200