Compare commits

..
5 Commits
+36 -22
View File
@@ -1,3 +1,6 @@
" Some of these mapping require a custom build of IdeaVIM: https://github.com/chylex/IntelliJ-IdeaVim
" One of the changes is that 'map' ignores Select mode to keep mappings simpler.
set clipboard-=ideaput
set hlsearch
set ignorecase
@@ -132,17 +135,22 @@ noremap § `
noremap §§ ``
nnoremap m§ m
sunmap ů
sunmap §
" Enter visual block mode
map <A-v> <C-v>
" Invert soft wrap navigation bindings
noremap 0 g0
noremap g0 0
noremap ^ g^
noremap g^ ^
noremap $ g$
noremap g$ $
" Navigate camel humps
noremap L [w
noremap H [b
nnoremap L [w
nnoremap H [b
" Navigate to end of previous word
noremap <A-e> ge
@@ -155,10 +163,10 @@ noremap g{ [{
noremap g} ]}
" Edit from cursor to start/end of parenthesized block
nnoremap c) c])
nnoremap d) d])
nnoremap c( c[((
nnoremap d( c[((<Esc>l
onoremap ) ])
onoremap ( [(
onoremap } ]}
onoremap { [{
" Create lines
nnoremap go o<Esc>$
@@ -166,12 +174,9 @@ nnoremap gO O<Esc>$
nnoremap g<CR> i<CR><Left><Esc>
" Edit current line
nnoremap C cc
xnoremap C cc
nnoremap D dd
xnoremap D dd
nnoremap < <<
nnoremap > >>
noremap C cc
noremap D dd
noremap < <<
" Navigate with selection
nmap <S-Up> v<Up>
@@ -197,9 +202,6 @@ xnoremap = =gv
map <A-m> <Action>(EditorSelectWord)
map <A-S-m> <Action>(EditorUnSelectWord)
" Turn capital letters into opposite actions
" nnoremap U :redo<CR> " Handled by custom version of IdeaVIM
" Reselect pasted text
nnoremap gp `[v`]
@@ -207,6 +209,13 @@ nnoremap gp `[v`]
xnoremap p P
xnoremap P p
" Fix undo/redo
nmap u <Action>($Undo)
xmap u <Action>($Undo)
nmap U <Action>($Redo)
xmap U <Action>($Redo)
" Clear search highlights
nnoremap <Esc> :nohlsearch<Return><Esc>
@@ -224,8 +233,10 @@ map <BS> <Action>(Back)
map <S-BS> <Action>(Forward)
" Navigate inspection highlights
map ( <Action>(GotoPreviousError)
map ) <Action>(GotoNextError)
nmap ( <Action>(GotoPreviousError)
xmap ( <Action>(GotoPreviousError)
nmap ) <Action>(GotoNextError)
xmap ) <Action>(GotoNextError)
map <C-A-S-s> <Action>(KM.GotoPreviousErrorInOtherMode)
map <D-S-s> <Action>(KM.GotoPreviousErrorInOtherMode)
@@ -237,8 +248,10 @@ map [ <Action>(MethodUp)
map ] <Action>(MethodDown)
" Navigate paragraphs at indentation
map { <Plug>(ParagraphPrevMotion)$
map } <Plug>(ParagraphNextMotion)$
nmap { <Plug>(ParagraphPrevMotion)$
xmap { <Plug>(ParagraphPrevMotion)$
nmap } <Plug>(ParagraphNextMotion)$
xmap } <Plug>(ParagraphNextMotion)$
" Move statement/element
map <A-S-h> <Action>(MoveElementLeft)
@@ -334,6 +347,7 @@ map zr <Action>(RunToCursor)
map zR <Action>(ForceRunToCursor)
map zs <Action>(osmedile.intellij.stringmanip.PopupChoiceAction)
map zt <Action>(ExpressionTypeInfo)
map zw <Action>(EditorToggleUseSoftWraps)
map zx <Action>(EvaluateExpression)
map zht <Action>(TypeHierarchy)