mirror of
https://github.com/chylex/dotfiles.git
synced 2024-11-25 14:42:46 +01:00
Compare commits
No commits in common. "ea590d93c1efbb7138c9520fea5e3122c12b856c" and "40748c3c68214c67cde87a2fb41cf1b8636dcf44" have entirely different histories.
ea590d93c1
...
40748c3c68
74
.ideavimrc
74
.ideavimrc
@ -42,11 +42,9 @@ 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
|
||||||
@ -59,6 +57,7 @@ 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'
|
||||||
@ -89,12 +88,10 @@ 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
|
||||||
noremap <A-b> ge
|
nnoremap <A-b> ge
|
||||||
noremap <A-S-b> gE
|
nnoremap <A-S-b> gE
|
||||||
|
|
||||||
" Navigate and close tabs
|
" Navigate and close tabs
|
||||||
noremap <A-h> gT
|
noremap <A-h> gT
|
||||||
@ -105,8 +102,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 <Bar>+ <C-a>
|
nnoremap <Space>+ <C-a>
|
||||||
nnoremap <Bar>- <C-x>
|
nnoremap <Space>- <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])
|
||||||
@ -116,17 +113,18 @@ nnoremap d( c[((<ESC>l
|
|||||||
|
|
||||||
" Delete lines
|
" Delete lines
|
||||||
nnoremap C cc
|
nnoremap C cc
|
||||||
xnoremap C cc
|
|
||||||
nnoremap D dd
|
nnoremap D dd
|
||||||
xnoremap D dd
|
vnoremap C cc
|
||||||
|
vnoremap D dd
|
||||||
|
|
||||||
" Enter visual block mode
|
" Enter visual block mode
|
||||||
xnoremap v <C-V>
|
nnoremap <Space>v <C-V>
|
||||||
|
onoremap <Space>v <C-V>
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
xnoremap < <gv
|
vnoremap < <gv
|
||||||
xnoremap > >gv
|
vnoremap > >gv
|
||||||
xnoremap = =gv
|
vnoremap = =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
|
||||||
@ -135,12 +133,7 @@ xnoremap = =gv
|
|||||||
nnoremap gp `[v`]
|
nnoremap gp `[v`]
|
||||||
|
|
||||||
" Put without yank
|
" Put without yank
|
||||||
xnoremap p P
|
xmap p gr
|
||||||
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)
|
||||||
@ -165,6 +158,9 @@ 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>
|
||||||
@ -185,8 +181,6 @@ 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
|
||||||
@ -245,24 +239,40 @@ 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>
|
||||||
xmap mc :action IntroduceConstant<CR>
|
vmap mc :action IntroduceConstant<CR>
|
||||||
nmap mf :action IntroduceField<CR>
|
nmap mf :action IntroduceField<CR>
|
||||||
xmap mf :action IntroduceField<CR>
|
vmap mf :action IntroduceField<CR>
|
||||||
nmap mm :action ExtractMethod<CR>
|
nmap mm :action ExtractMethod<CR>
|
||||||
xmap mm :action ExtractMethod<CR>
|
vmap mm :action ExtractMethod<CR>
|
||||||
nmap mM :action ExtractFunction<CR>
|
nmap mM :action ExtractFunction<CR>
|
||||||
xmap mM :action ExtractFunction<CR>
|
vmap mM :action ExtractFunction<CR>
|
||||||
nmap mp :action IntroduceParameter<CR>
|
nmap mp :action IntroduceParameter<CR>
|
||||||
xmap mp :action IntroduceParameter<CR>
|
vmap mp :action IntroduceParameter<CR>
|
||||||
nmap mP :action IntroduceProperty<CR>
|
nmap mP :action IntroduceProperty<CR>
|
||||||
xmap mP :action IntroduceProperty<CR>
|
vmap mP :action IntroduceProperty<CR>
|
||||||
nmap mr :action Refactorings.QuickListPopupAction<CR>
|
nmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||||
xmap mr :action Refactorings.QuickListPopupAction<CR>
|
vmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||||
nmap mv :action IntroduceVariable<CR>
|
nmap mv :action IntroduceVariable<CR>
|
||||||
xmap mv :action IntroduceVariable<CR>
|
vmap mv :action IntroduceVariable<CR>
|
||||||
nmap mw :action SurroundWith<CR>
|
nmap mw :action SurroundWith<CR>
|
||||||
xmap mw :action SurroundWith<CR>
|
vmap mw :action SurroundWith<CR>
|
||||||
|
|
||||||
" Actions for custom version of AceJump
|
" Actions for custom version of AceJump
|
||||||
set acejump
|
set acejump
|
||||||
map <Space> :action AceVimAction_JumpAllEditors<CR>
|
map <Space><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,29 +57,27 @@ map é 0
|
|||||||
nnoremap ú @@
|
nnoremap ú @@
|
||||||
noremap ů ;
|
noremap ů ;
|
||||||
map § %
|
map § %
|
||||||
sunmap §
|
|
||||||
|
|
||||||
" Camel humps (https://github.com/vim-scripts/camelcasemotion)
|
" Navigate to end of previous word
|
||||||
|
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])
|
||||||
@ -88,17 +86,18 @@ nnoremap d( c[((<ESC>l
|
|||||||
|
|
||||||
" Delete lines
|
" Delete lines
|
||||||
nnoremap C cc
|
nnoremap C cc
|
||||||
xnoremap C cc
|
|
||||||
nnoremap D dd
|
nnoremap D dd
|
||||||
xnoremap D dd
|
vnoremap C cc
|
||||||
|
vnoremap D dd
|
||||||
|
|
||||||
" Enter visual block mode
|
" Enter visual block mode
|
||||||
xnoremap v <C-V>
|
nnoremap <Space>v <C-V>
|
||||||
|
onoremap <Space>v <C-V>
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
xnoremap < <gv
|
vnoremap < <gv
|
||||||
xnoremap > >gv
|
vnoremap > >gv
|
||||||
xnoremap = =gv
|
vnoremap = =gv
|
||||||
|
|
||||||
" Turn capital letters into opposite actions
|
" Turn capital letters into opposite actions
|
||||||
nnoremap U :redo<CR>
|
nnoremap U :redo<CR>
|
||||||
@ -107,13 +106,10 @@ nnoremap U :redo<CR>
|
|||||||
nnoremap gp `[v`]
|
nnoremap gp `[v`]
|
||||||
|
|
||||||
" Put without yank
|
" Put without yank
|
||||||
xnoremap p P
|
xmap p gr
|
||||||
xnoremap P p
|
|
||||||
|
|
||||||
" Plugin: https://github.com/easymotion/vim-easymotion.git
|
" Plugin: https://github.com/easymotion/vim-easymotion.git
|
||||||
nmap <Space> <Plug>(easymotion-overwin-f)
|
map <Space> <Plug>(easymotion-prefix)
|
||||||
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,16 +14,10 @@
|
|||||||
- { 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