-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_ideavimrc
87 lines (76 loc) · 2.18 KB
/
dot_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
""" Plugins --------------------------------
set surround
set commentary
set argtextobj
set textobj-entire
set ReplaceWithRegister
set NERDTree
set highlightedyank
set iskeyword-=_
set easymotion
""" Common settings -------------------------
set showmode
set so=5
set incsearch
set relativenumber
""" remap leader key to space
let mapleader=" "
""" Plugin settings -------------------------
let g:argtextobj_pairs="[:],(:),<:>"
let g:surround_no_mappings=1
let g:NERDTreeMapActivateNode='<cr>'
let g:NERDTreeMapOpenVSplit="s"
let g:NERDTreeMapOpenSplit="S"
""" Editor shortcuts
:imap jj <Esc>
:map <leader>- :split<cr>
:map <leader>\| :vsplit<cr>
:map <C-k> <C-W>k
:map <C-j> <C-W>j
:map <C-h> <C-W>h
:map <C-l> <C-W>l
:map <leader><tab>x :tabclose<cr>
:nmap <leader>qq <Action>(Exit)
:map <leader>: <Action>(GotoAction)
:map <C-[> <Action>(EditorDecreaseFontSizeGlobal)
:map <C-]> <Action>(EditorIncreaseFontSizeGlobal)
:map <leader>gg <Action>(ActivateCommitToolWindow)
""" Toggle editor settings
:map <leader>uL :set relativenumber!<cr>
:map <leader>uw <Action>(EditorToggleUseSoftWraps)
:map <leader>z <Action>(ToggleDistractionFreeMode)
""" File navigation
:nmap [b :tabprevious<cr>
:nmap ]b :tabnext<cr>
:nmap H :tabprevious<cr>
:nmap L :tabnext<cr>
:map <leader>ff <Action>(GotoFile)
:map <leader>, <Action>(RecentFiles)
:map <leader>/ <Action>(FindInPath)
:map <leader>sS <Action>(GotoSymbol)
""" Same file: Actions
:map <leader>w :w<cr>
:map <leader>cf <Action>(ReformatCode)
:map <leader>cr <Action>(RenameElement)
:nmap <leader>mm <Action>(ToggleBookmark)
:nmap gzd <Plug>DSurround
:nmap gzr <Plug>CSurround
:nmap gza <Plug>YSurround
:vmap gza <Plug>VSurround
""" Same file: Navigation
:map <leader>sb <Action>(Find)
:map <leader>ss <Action>(FileStructurePopup)
:map <leader>sm <Action>(ShowBookmarks)
:map [e <Action>(GotoPreviousError)
:map ]e <Action>(GotoNextError)
:nmap s <Plug>(easymotion-f)
:nmap S <Plug>(easymotion-F)
""" File explorer
:map <leader>e :NERDTreeToggle<cr>
""" Terminal
:map <leader>ft <Action>(ActivateTerminalToolWindow)
""" Test actions
:map <leader>tr <Action>(ContextRun)
:map <leader>tl <Action>(Run)
:map <leader>tc <Action>(Coverage)
:map <leader>db <Action>(ToggleLineBreakpoint)