/
.ideavimrc
72 lines (61 loc) · 2.8 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
let mapleader = "," " leader is comma
let localleader = "," " leader is comma
set hidden
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set shiftwidth=4 " spaces in newline start
set expandtab " tabs are spaces
set number " show line numbers
set rnu " show relative line numbers
set showcmd " show command in bottom bar
"set cursorline highlight current line
set commentary "vim-commentary
filetype indent on " load filetype-specific indent files
set wildmenu " visual autocomplete for command menu
set showmatch " highlight matching [{()}]
set timeoutlen=500 " timeout for key combinations
set so=5 " lines to cursor
set backspace=2 " make backspace work like most other apps
set incsearch " search as characters are entered
set hlsearch " highlight matches
set ignorecase " do case insensitive matching
set smartcase " do smart case matching
""" Plugins --------------------------------
set surround " use surround shortcuts
set argtextobj
""" Plugin settings -------------------------
let g:argtextobj_pairs="[:],(:),<:>"
set fillchars+=stl:\ ,stlnc:\
set laststatus=2
set clipboard=unnamedplus "X clipboard as unnamed
"@see https://youtrack.jetbrains.com/issue/VIM-510 on expand selected region. Press `Ctrl-W` and `Ctrl-Shift-W` to increase and decrease selected region
""" Mappings --------------------------------
noremap <leader>rr :action RecentFiles<CR>
noremap <leader>qq :action FindInPath<CR>
noremap <leader>ss :action Find<CR>
noremap <leader>kk :action GotoFile<CR>
noremap <leader>ii :action GotoSymbol<CR>
noremap <leader>gd :action GotoTypeDeclaration<CR>
noremap <leader>ti :action GotoImplementation<CR>
noremap <leader>qr :action FindUsages<CR>
noremap <leader>tt :action SelectIn<CR>
noremap <leader>qt :action HideAllWindows<CR>
noremap <leader>fs :action FileStructurePopup<CR>
noremap <leader>re :action Refactorings.QuickListPopupAction<CR>
noremap <leader>x1 :action UnsplitAll<CR>
noremap <leader>x3 :action SplitVertically<CR>
noremap <leader>cc :action CommentByLineComment<CR>
noremap <leader>fp :action CopyPaths<CR>
noremap <leader>rf :action ReformatCode<CR>
noremap <leader>sw :action SurroundWith<CR>
noremap <S-Space> :action GotoNextError<CR>
" noremap ,te :action RerunTests<CR>
" noremap ,xm :action SearchEverywhere<CR>
" noremap ,xs :action SaveAll<CR>
" noremap ,aa :action $Copy<CR>
" noremap ,zz :action $Paste<CR>
" noremap ,yy :action PasteMultiple<CR>
" noremap ,xk :action CloseEditor<CR>
" noremap ,x2 :action SplitHorizontally<CR>
""" External tool --------------------------------
" noremap ,cs :action Tool_External Tools_PHP CS Fixer<CR>