-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
64 lines (51 loc) · 1.64 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
" enable IdeaVim features
set surround
" vim config
set relativenumber
set cursorline
set surround
set hlsearch is ignorecase scs
set tabstop=4 shiftwidth=4 expandtab
""" Shortcuts =====================
let mapleader = ","
let maplocalleader = ","
inoremap jk <esc>
nmap <silent> <C-n> :noh<CR>
" Classic Tab indents
nnoremap <Tab> >>_
nnoremap <S-Tab> <<_
inoremap <S-Tab> <C-D>
vnoremap <Tab> >gv
vnoremap <S-Tab> <gv
" Switch splits easier
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Switch alternate file / recent files
nnoremap <C-6> :action Switcher<CR>
nnoremap <leader><Space> :action Switcher<CR>
" Go to terminal (tmux style)
nnoremap <C-a>j :action ActivateTerminalToolWindow<CR>
" Navigate menus
inoremap <C-n> <Down>
inoremap <C-p> <Up>
" comment out
vnoremap <leader>c<space> :action CommentByLineComment<CR>
nnoremap <leader>c<space> :action CommentByLineComment<CR>
" search
nnoremap <leader>f :action FindInPath<CR>
nnoremap <leader>o :action SearchEverywhere<CR>
" tabularize
nnoremap <leader>a :action StringManipulation.AlignToColumns<CR>
vnoremap <leader>a :action StringManipulation.AlignToColumns<CR>
" change case
nnoremap crc :action StringManipulation.ToSnakeCaseOrCamelCase<CR>
nnoremap crs :action StringManipulation.ToSnakeCaseOrCamelCase<CR>
nnoremap crm :action StringManipulation.ToPascalCaseOrCamelCase<CR>
nnoremap crt :action StringManipulation.ToSentenceCaseOrCamelCase<CR>
nnoremap cr- :action StringManipulation.ToHyphenCaseAction<CR>
" select file in sidebar
nnoremap <leader>t :action SelectInProjectView<CR>
" select next occurence
map <M-G> :action SelectNextOccurrence<CR>