/
.ideavimrc
52 lines (44 loc) · 1.26 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
" options and mappings that are supported by both Vim and IdeaVim
set nu
set relativenumber
set history=500
set number
set hlsearch
set ideajoin
set ignorecase
set smartcase
set clipboard=unnamed
" Searching
" Set highlight search
set hls
" Set increment highlight matches
set incsearch
" Clears highlight of search when Enter.
" remap enter after search to clear highlight, then clears command.
nnoremap <silent> <cr> :noh<CR>
" Map leader to backslash
let mapleader="\"
" IdeaVim Plugin Emulations
Plug 'easymotion/vim-easymotion'
Plug 'preservim/nerdtree'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
packadd matchit
" Mappings
" NerdTree
nmap <c-f> :NERDTreeFind<CR>
nmap <c-n> :NERDTreeToggle<CR>
" IntelliJ-specific Actions
" -------------------------
" Run :actionlist to get a list of these. mapleader isn't supported yet.
" Look for a dismiss action for Ctrl-[
nmap <leader><CR> :action GotoAction<CR>
nmap <leader>o :action GotoFile<CR>
nmap <leader><C-o> :action RecentFiles<CR>
nmap <leader>f :action FileStructurePopup<CR>
nmap <leader><C-f> :action GotoSymbol<CR>
" More like quick definition -- shows source in pop-up
nnoremap gD :action QuickImplementations<CR>
nnoremap gr :action Refactorings.QuickListPopupAction<CR>
set visualbell
set noerrorbells