-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
99 lines (80 loc) · 2.54 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
""" Common settings -------------------------
set encoding=utf-8
set hlsearch
set showmode
set incsearch
set ingorecase smartcase
set so=5
set nu
set ruler
set history=1000
set clipboard=unnamedplus " for easy copy pasting
set number relativenumber
set path+=**
" Navigation
nnoremap [m :action MethodUp<cr>
nnoremap ]m :action MethodDown<cr>
nnoremap <c-l> <c-w>l
nnoremap <c-j> <c-w>j
nnoremap <c-h> <c-w>h
nnoremap <c-k> <c-w>k
" Clear highlighting on escape in normal mode
nnoremap <esc> :noh<return><esc>
" Is this line needed https://stackoverflow.com/a/1037182/9926721
nnoremap <esc>^[ <esc>^[
""" Idea specific settings ------------------
set ideajoin
set ideastatusicon=gray
" enabled by default
set idearefactormode=keep
" Vim has 2 types of bookmarks. One is with lower case (like ma) and this is a file-scope bookmark. Another one is with upper case (like mA) and that is a project-scope bookmark.
" IntelliJ IDEA has only one type of bookmarks - project scoped. So, the lower case bookmarks work as before and if you use upper case bookmarks you will get the gutter icon and all the stuff.
set ideamarks
"" Debugging/running
map <leader>d :action Debug<CR>
map <leader>r :action Run<CR>
map <leader>c :action Stop<CR>
map <leader>b :action ToggleLineBreakpoint<CR>
map <leader>n :action StepInto<CR>
map <leader>p :action StepOut<CR>
" IdeaVim.ReloadVimRc.reload
"" Idea navigation
map <leader>s :action SelectInProjectView<CR>
map <leader>a :action GotoAction<CR>
map <Leader>e :action SearchEverywhere<CR>
map <leader>h :action Vcs.ShowTabbedFileHistory<CR>
map <leader>o :action FileStructurePopup<CR>
map <leader>z :action ToggleDistractionFreeMode<CR>
map <leader>ga ggVG
map <leader>go :action OpenFile<CR>
map <leader>gf :action FindInPath<CR>
map = :action ReformatCode<CR>
map <leader>gb :action Back<CR>
nnoremap <leader>g :action Generate<CR>
nnoremap <leader>gs :action GenerateGetterAndSetter<CR>
" Shortcutting split navigation, saving a keypress:
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
""" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister
Plug 'machakann/vim-highlightedyank'
""" Plugin settings -------------------------
let g:argtextobj_pairs="[:],(:),<:>"
" Disable arrows usage
noremap <silent> <Up> <Nop>
noremap <silent> <Down> <Nop>
noremap <silent> <Left> <Nop>
noremap <silent> <Right> <Nop>
" Disable arrow keys in Insert mode
ino <Up> <Nop>
ino <Down> <Nop>
ino <Left> <Nop>
ino <Right> <Nop>