mirror of
https://github.com/chylex/dotfiles.git
synced 2024-11-25 14:42:46 +01:00
Compare commits
7 Commits
40748c3c68
...
ea590d93c1
Author | SHA1 | Date | |
---|---|---|---|
ea590d93c1 | |||
3286d65e8d | |||
f700848658 | |||
adcaeb0403 | |||
54284be64b | |||
f271ae0d8f | |||
014763826f |
74
.ideavimrc
74
.ideavimrc
@ -42,9 +42,11 @@ sethandler <C-X> a:ide
|
|||||||
sethandler <C-Y> a:ide
|
sethandler <C-Y> a:ide
|
||||||
sethandler <C-\> a:ide
|
sethandler <C-\> a:ide
|
||||||
|
|
||||||
|
sethandler <A-B> a:vim
|
||||||
sethandler <A-H> a:vim
|
sethandler <A-H> a:vim
|
||||||
sethandler <A-L> a:vim
|
sethandler <A-L> a:vim
|
||||||
sethandler <A-P> a:vim
|
sethandler <A-P> a:vim
|
||||||
|
sethandler <A-S-B> a:vim
|
||||||
sethandler <A-X> a:vim
|
sethandler <A-X> a:vim
|
||||||
sethandler <C-D> a:vim
|
sethandler <C-D> a:vim
|
||||||
sethandler <C-I> a:vim
|
sethandler <C-I> a:vim
|
||||||
@ -57,7 +59,6 @@ sethandler <C-W> a:vim
|
|||||||
" Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins)
|
" Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins)
|
||||||
Plug 'argtextobj.vim'
|
Plug 'argtextobj.vim'
|
||||||
Plug 'nerdtree'
|
Plug 'nerdtree'
|
||||||
Plug 'vim-ReplaceWithRegister'
|
|
||||||
Plug 'vim-exchange'
|
Plug 'vim-exchange'
|
||||||
Plug 'vim-highlightedyank'
|
Plug 'vim-highlightedyank'
|
||||||
Plug 'vim-indent-object'
|
Plug 'vim-indent-object'
|
||||||
@ -88,10 +89,12 @@ map § %
|
|||||||
" Camel humps
|
" Camel humps
|
||||||
noremap L [w
|
noremap L [w
|
||||||
noremap H [b
|
noremap H [b
|
||||||
|
xnoremap L ]w
|
||||||
|
xnoremap H ]b
|
||||||
|
|
||||||
" Navigate to end of previous word
|
" Navigate to end of previous word
|
||||||
nnoremap <A-b> ge
|
noremap <A-b> ge
|
||||||
nnoremap <A-S-b> gE
|
noremap <A-S-b> gE
|
||||||
|
|
||||||
" Navigate and close tabs
|
" Navigate and close tabs
|
||||||
noremap <A-h> gT
|
noremap <A-h> gT
|
||||||
@ -102,8 +105,8 @@ inoremap <A-l> <C-o>gt
|
|||||||
noremap <C-w> :action CloseContent<CR>
|
noremap <C-w> :action CloseContent<CR>
|
||||||
|
|
||||||
" Increment/decrement numbers
|
" Increment/decrement numbers
|
||||||
nnoremap <Space>+ <C-a>
|
nnoremap <Bar>+ <C-a>
|
||||||
nnoremap <Space>- <C-x>
|
nnoremap <Bar>- <C-x>
|
||||||
|
|
||||||
" Edit from cursor to start/end of parenthesized block
|
" Edit from cursor to start/end of parenthesized block
|
||||||
nnoremap c) c])
|
nnoremap c) c])
|
||||||
@ -113,18 +116,17 @@ nnoremap d( c[((<ESC>l
|
|||||||
|
|
||||||
" Delete lines
|
" Delete lines
|
||||||
nnoremap C cc
|
nnoremap C cc
|
||||||
|
xnoremap C cc
|
||||||
nnoremap D dd
|
nnoremap D dd
|
||||||
vnoremap C cc
|
xnoremap D dd
|
||||||
vnoremap D dd
|
|
||||||
|
|
||||||
" Enter visual block mode
|
" Enter visual block mode
|
||||||
nnoremap <Space>v <C-V>
|
xnoremap v <C-V>
|
||||||
onoremap <Space>v <C-V>
|
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
vnoremap < <gv
|
xnoremap < <gv
|
||||||
vnoremap > >gv
|
xnoremap > >gv
|
||||||
vnoremap = =gv
|
xnoremap = =gv
|
||||||
|
|
||||||
" Turn capital letters into opposite actions
|
" Turn capital letters into opposite actions
|
||||||
" nnoremap U :redo<CR> " Handled by custom version of IdeaVim
|
" nnoremap U :redo<CR> " Handled by custom version of IdeaVim
|
||||||
@ -133,7 +135,12 @@ vnoremap = =gv
|
|||||||
nnoremap gp `[v`]
|
nnoremap gp `[v`]
|
||||||
|
|
||||||
" Put without yank
|
" Put without yank
|
||||||
xmap p gr
|
xnoremap p P
|
||||||
|
xnoremap P p
|
||||||
|
|
||||||
|
" Navigate back/forward
|
||||||
|
nmap <BS> <Action>(Back)
|
||||||
|
nmap <S-BS> <Action>(Forward)
|
||||||
|
|
||||||
" Show parameter info
|
" Show parameter info
|
||||||
nmap <A-p> <Action>(ParameterInfo)
|
nmap <A-p> <Action>(ParameterInfo)
|
||||||
@ -158,9 +165,6 @@ nmap ] :raction MethodDown<CR>
|
|||||||
nmap { :raction JumpToLastChange<CR>
|
nmap { :raction JumpToLastChange<CR>
|
||||||
nmap } :raction JumpToNextChange<CR>
|
nmap } :raction JumpToNextChange<CR>
|
||||||
|
|
||||||
nmap <Space>( :raction KM.GotoPreviousErrorInOtherMode<CR>
|
|
||||||
nmap <Space>) :raction KM.GotoNextErrorInOtherMode<CR>
|
|
||||||
|
|
||||||
" Repurpose 'g' for navigation (:raction requires a custom version of IdeaVIM)
|
" Repurpose 'g' for navigation (:raction requires a custom version of IdeaVIM)
|
||||||
nmap gb :raction GotoNextBookmark<CR>
|
nmap gb :raction GotoNextBookmark<CR>
|
||||||
nmap gB :raction GotoPreviousBookmark<CR>
|
nmap gB :raction GotoPreviousBookmark<CR>
|
||||||
@ -181,6 +185,8 @@ nmap gu :action ShowUsages<CR>
|
|||||||
nmap gU :action FindUsages<CR>
|
nmap gU :action FindUsages<CR>
|
||||||
map gz :action NextSplitter<CR>
|
map gz :action NextSplitter<CR>
|
||||||
map gZ :action PrevSplitter<CR>
|
map gZ :action PrevSplitter<CR>
|
||||||
|
nmap g( :raction KM.GotoPreviousErrorInOtherMode<CR>
|
||||||
|
nmap g) :raction KM.GotoNextErrorInOtherMode<CR>
|
||||||
|
|
||||||
" Make bidirectional 'g' commands work with 'G' too
|
" Make bidirectional 'g' commands work with 'G' too
|
||||||
nmap Gb gb
|
nmap Gb gb
|
||||||
@ -239,40 +245,24 @@ nmap mS :action NewScratchFile<CR>
|
|||||||
|
|
||||||
" Repurpose 'm' for refactoring (normal / visual mode)
|
" Repurpose 'm' for refactoring (normal / visual mode)
|
||||||
nmap mc :action IntroduceConstant<CR>
|
nmap mc :action IntroduceConstant<CR>
|
||||||
vmap mc :action IntroduceConstant<CR>
|
xmap mc :action IntroduceConstant<CR>
|
||||||
nmap mf :action IntroduceField<CR>
|
nmap mf :action IntroduceField<CR>
|
||||||
vmap mf :action IntroduceField<CR>
|
xmap mf :action IntroduceField<CR>
|
||||||
nmap mm :action ExtractMethod<CR>
|
nmap mm :action ExtractMethod<CR>
|
||||||
vmap mm :action ExtractMethod<CR>
|
xmap mm :action ExtractMethod<CR>
|
||||||
nmap mM :action ExtractFunction<CR>
|
nmap mM :action ExtractFunction<CR>
|
||||||
vmap mM :action ExtractFunction<CR>
|
xmap mM :action ExtractFunction<CR>
|
||||||
nmap mp :action IntroduceParameter<CR>
|
nmap mp :action IntroduceParameter<CR>
|
||||||
vmap mp :action IntroduceParameter<CR>
|
xmap mp :action IntroduceParameter<CR>
|
||||||
nmap mP :action IntroduceProperty<CR>
|
nmap mP :action IntroduceProperty<CR>
|
||||||
vmap mP :action IntroduceProperty<CR>
|
xmap mP :action IntroduceProperty<CR>
|
||||||
nmap mr :action Refactorings.QuickListPopupAction<CR>
|
nmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||||
vmap mr :action Refactorings.QuickListPopupAction<CR>
|
xmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||||
nmap mv :action IntroduceVariable<CR>
|
nmap mv :action IntroduceVariable<CR>
|
||||||
vmap mv :action IntroduceVariable<CR>
|
xmap mv :action IntroduceVariable<CR>
|
||||||
nmap mw :action SurroundWith<CR>
|
nmap mw :action SurroundWith<CR>
|
||||||
vmap mw :action SurroundWith<CR>
|
xmap mw :action SurroundWith<CR>
|
||||||
|
|
||||||
" Actions for custom version of AceJump
|
" Actions for custom version of AceJump
|
||||||
set acejump
|
set acejump
|
||||||
map <Space><Space> :action AceVimAction_JumpAllEditors<CR>
|
map <Space> :action AceVimAction_JumpAllEditors<CR>
|
||||||
map <Space>f :action AceVimAction_JumpForward<CR>
|
|
||||||
map <Space>F :action AceVimAction_JumpBackward<CR>
|
|
||||||
map <Space>t :action AceVimAction_JumpTillForward<CR>
|
|
||||||
map <Space>T :action AceVimAction_JumpTillBackward<CR>
|
|
||||||
map <Space>l :action AceVimAction_JumpOnLineForward<CR>
|
|
||||||
map <Space>h :action AceVimAction_JumpOnLineBackward<CR>
|
|
||||||
map <Space>j :action AceVimAction_JumpLineIndentsForward<CR>
|
|
||||||
map <Space>k :action AceVimAction_JumpLineIndentsBackward<CR>
|
|
||||||
map <Space>w :action AceVimAction_JumpLWordForward<CR>
|
|
||||||
map <Space>W :action AceVimAction_JumpUWordForward<CR>
|
|
||||||
map <Space>b :action AceVimAction_JumpLWordBackward<CR>
|
|
||||||
map <Space>B :action AceVimAction_JumpUWordBackward<CR>
|
|
||||||
map <Space>e :action AceVimAction_JumpLWordEndForward<CR>
|
|
||||||
map <Space>E :action AceVimAction_JumpUWordEndForward<CR>
|
|
||||||
map <Space><A-b> :action AceVimAction_JumpLWordEndBackward<CR>
|
|
||||||
map <Space><A-S-b> :action AceVimAction_JumpUWordEndBackward<CR>
|
|
||||||
|
46
.vimrc
46
.vimrc
@ -57,27 +57,29 @@ map é 0
|
|||||||
nnoremap ú @@
|
nnoremap ú @@
|
||||||
noremap ů ;
|
noremap ů ;
|
||||||
map § %
|
map § %
|
||||||
|
sunmap §
|
||||||
|
|
||||||
" Navigate to end of previous word
|
" Camel humps (https://github.com/vim-scripts/camelcasemotion)
|
||||||
nnoremap <A-b> ge
|
|
||||||
nnoremap <A-S-b> gE
|
|
||||||
|
|
||||||
" Navigate soft-wrapped lines
|
|
||||||
nnoremap <expr> j v:count ? 'j' : 'gj'
|
|
||||||
vnoremap <expr> j v:count ? 'j' : 'gj'
|
|
||||||
nnoremap <expr> k v:count ? 'k' : 'gk'
|
|
||||||
vnoremap <expr> k v:count ? 'k' : 'gk'
|
|
||||||
|
|
||||||
" Navigate camel humps (https://github.com/vim-scripts/camelcasemotion)
|
|
||||||
map L <Plug>CamelCaseMotion_w
|
map L <Plug>CamelCaseMotion_w
|
||||||
map H <Plug>CamelCaseMotion_b
|
map H <Plug>CamelCaseMotion_b
|
||||||
|
sunmap L
|
||||||
|
sunmap H
|
||||||
|
|
||||||
" Edit camel humps (https://github.com/vim-scripts/camelcasemotion)
|
|
||||||
omap iL <Plug>CamelCaseMotion_iw
|
omap iL <Plug>CamelCaseMotion_iw
|
||||||
xmap iL <Plug>CamelCaseMotion_iw
|
xmap iL <Plug>CamelCaseMotion_iw
|
||||||
omap iH <Plug>CamelCaseMotion_ib
|
omap iH <Plug>CamelCaseMotion_ib
|
||||||
xmap iH <Plug>CamelCaseMotion_ib
|
xmap iH <Plug>CamelCaseMotion_ib
|
||||||
|
|
||||||
|
" Navigate to end of previous word
|
||||||
|
noremap <A-b> ge
|
||||||
|
noremap <A-S-b> gE
|
||||||
|
|
||||||
|
" Navigate soft-wrapped lines
|
||||||
|
nnoremap <expr> j v:count ? 'j' : 'gj'
|
||||||
|
xnoremap <expr> j v:count ? 'j' : 'gj'
|
||||||
|
nnoremap <expr> k v:count ? 'k' : 'gk'
|
||||||
|
xnoremap <expr> k v:count ? 'k' : 'gk'
|
||||||
|
|
||||||
" Edit from cursor to start/end of parenthesized block
|
" Edit from cursor to start/end of parenthesized block
|
||||||
nnoremap c) c])
|
nnoremap c) c])
|
||||||
nnoremap d) d])
|
nnoremap d) d])
|
||||||
@ -86,18 +88,17 @@ nnoremap d( c[((<ESC>l
|
|||||||
|
|
||||||
" Delete lines
|
" Delete lines
|
||||||
nnoremap C cc
|
nnoremap C cc
|
||||||
|
xnoremap C cc
|
||||||
nnoremap D dd
|
nnoremap D dd
|
||||||
vnoremap C cc
|
xnoremap D dd
|
||||||
vnoremap D dd
|
|
||||||
|
|
||||||
" Enter visual block mode
|
" Enter visual block mode
|
||||||
nnoremap <Space>v <C-V>
|
xnoremap v <C-V>
|
||||||
onoremap <Space>v <C-V>
|
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
vnoremap < <gv
|
xnoremap < <gv
|
||||||
vnoremap > >gv
|
xnoremap > >gv
|
||||||
vnoremap = =gv
|
xnoremap = =gv
|
||||||
|
|
||||||
" Turn capital letters into opposite actions
|
" Turn capital letters into opposite actions
|
||||||
nnoremap U :redo<CR>
|
nnoremap U :redo<CR>
|
||||||
@ -106,10 +107,13 @@ nnoremap U :redo<CR>
|
|||||||
nnoremap gp `[v`]
|
nnoremap gp `[v`]
|
||||||
|
|
||||||
" Put without yank
|
" Put without yank
|
||||||
xmap p gr
|
xnoremap p P
|
||||||
|
xnoremap P p
|
||||||
|
|
||||||
" Plugin: https://github.com/easymotion/vim-easymotion.git
|
" Plugin: https://github.com/easymotion/vim-easymotion.git
|
||||||
map <Space> <Plug>(easymotion-prefix)
|
nmap <Space> <Plug>(easymotion-overwin-f)
|
||||||
|
xmap <Space> <Plug>(easymotion-s)
|
||||||
|
omap <Space> <Plug>(easymotion-s)
|
||||||
|
|
||||||
" Plugin: https://github.com/machakann/vim-highlightedyank
|
" Plugin: https://github.com/machakann/vim-highlightedyank
|
||||||
let g:highlightedyank_highlight_duration = 500
|
let g:highlightedyank_highlight_duration = 500
|
||||||
|
@ -14,10 +14,16 @@
|
|||||||
- { name: "lightline" , repo: "https://github.com/itchyny/lightline.vim.git" }
|
- { name: "lightline" , repo: "https://github.com/itchyny/lightline.vim.git" }
|
||||||
- { name: "rainbow" , repo: "https://github.com/luochen1990/rainbow.git" }
|
- { name: "rainbow" , repo: "https://github.com/luochen1990/rainbow.git" }
|
||||||
- { name: "repeat" , repo: "https://github.com/tpope/vim-repeat.git" }
|
- { name: "repeat" , repo: "https://github.com/tpope/vim-repeat.git" }
|
||||||
- { name: "replace-with-register" , repo: "https://github.com/vim-scripts/ReplaceWithRegister.git" }
|
|
||||||
- { name: "sleuth" , repo: "https://github.com/tpope/vim-sleuth.git" }
|
- { name: "sleuth" , repo: "https://github.com/tpope/vim-sleuth.git" }
|
||||||
- { name: "surround" , repo: "https://github.com/tpope/vim-surround.git" }
|
- { name: "surround" , repo: "https://github.com/tpope/vim-surround.git" }
|
||||||
- { name: "visual-multi" , repo: "https://github.com/mg979/vim-visual-multi.git" }
|
- { name: "visual-multi" , repo: "https://github.com/mg979/vim-visual-multi.git" }
|
||||||
- { name: "visual-star-search" , repo: "https://github.com/nelstrom/vim-visual-star-search.git" }
|
- { name: "visual-star-search" , repo: "https://github.com/nelstrom/vim-visual-star-search.git" }
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
|
- name: Delete unused vim plugins
|
||||||
|
file:
|
||||||
|
path: "~/.vim/pack/plugins/start/{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop:
|
||||||
|
- "replace-with-register"
|
||||||
|
Loading…
Reference in New Issue
Block a user