mirror of
https://github.com/chylex/dotfiles.git
synced 2024-11-25 23:42:46 +01:00
Compare commits
8 Commits
63cd476e43
...
3b7145539e
Author | SHA1 | Date | |
---|---|---|---|
3b7145539e | |||
df3e108327 | |||
db429b3b30 | |||
569dc0caad | |||
8a5da89d0f | |||
2bd9758639 | |||
9efdf74626 | |||
c31dbc308a |
114
.ideavimrc
114
.ideavimrc
@ -1,6 +1,7 @@
|
|||||||
set ignorecase
|
set ignorecase
|
||||||
set incsearch
|
set incsearch
|
||||||
set number
|
set number
|
||||||
|
set nrformats-=octal
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set scrolloff=999
|
set scrolloff=999
|
||||||
set showcmd
|
set showcmd
|
||||||
@ -10,10 +11,51 @@ set smartcase
|
|||||||
set virtualedit=onemore
|
set virtualedit=onemore
|
||||||
set visualbell
|
set visualbell
|
||||||
|
|
||||||
|
" Use WSL bash as shell
|
||||||
|
if has('win32')
|
||||||
|
set shell=bash.exe
|
||||||
|
set shellcmdflag=-lic
|
||||||
|
set shellxquote=
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Configure IDEA settings (https://github.com/JetBrains/ideavim/wiki/set-commands)
|
||||||
set ideaglobalmode
|
set ideaglobalmode
|
||||||
set ideajoin
|
set ideajoin
|
||||||
set idearefactormode=visual
|
set idearefactormode=visual
|
||||||
|
|
||||||
|
" Configure IDE keybindings (https://github.com/JetBrains/ideavim/wiki/sethandler)
|
||||||
|
sethandler <C-A> a:ide
|
||||||
|
sethandler <C-B> a:ide
|
||||||
|
sethandler <C-C> a:ide
|
||||||
|
sethandler <C-E> a:ide
|
||||||
|
sethandler <C-F> a:ide
|
||||||
|
sethandler <C-G> a:ide
|
||||||
|
sethandler <C-I> a:ide
|
||||||
|
sethandler <C-J> a:ide
|
||||||
|
sethandler <C-K> a:ide
|
||||||
|
sethandler <C-L> a:ide
|
||||||
|
sethandler <C-M> a:ide
|
||||||
|
sethandler <C-R> a:ide
|
||||||
|
sethandler <C-S> a:ide
|
||||||
|
sethandler <C-T> a:ide
|
||||||
|
sethandler <C-V> a:ide
|
||||||
|
sethandler <C-X> a:ide
|
||||||
|
sethandler <C-Y> a:ide
|
||||||
|
sethandler <C-\> a:ide
|
||||||
|
|
||||||
|
sethandler <A-H> a:vim
|
||||||
|
sethandler <A-L> a:vim
|
||||||
|
sethandler <A-P> a:vim
|
||||||
|
sethandler <A-X> a:vim
|
||||||
|
sethandler <C-D> a:vim
|
||||||
|
sethandler <C-I> a:vim
|
||||||
|
sethandler <C-N> a:vim
|
||||||
|
sethandler <C-O> a:vim
|
||||||
|
sethandler <C-P> a:vim
|
||||||
|
sethandler <C-U> a:vim
|
||||||
|
sethandler <C-W> a:vim
|
||||||
|
|
||||||
|
" 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-ReplaceWithRegister'
|
||||||
@ -25,7 +67,7 @@ Plug 'vim-multiple-cursors'
|
|||||||
Plug 'vim-surround'
|
Plug 'vim-surround'
|
||||||
Plug 'vim-textobj-entire'
|
Plug 'vim-textobj-entire'
|
||||||
|
|
||||||
" http://vimdoc.sourceforge.net/htmldoc/vimindex.html
|
" https://vimhelp.org/index.txt.html
|
||||||
|
|
||||||
" Map top row on Czech keyboard layout to digits
|
" Map top row on Czech keyboard layout to digits
|
||||||
map + 1
|
map + 1
|
||||||
@ -44,29 +86,22 @@ nnoremap ú @@
|
|||||||
noremap ů ;
|
noremap ů ;
|
||||||
map § %
|
map § %
|
||||||
|
|
||||||
|
" Camel humps
|
||||||
|
noremap L [w
|
||||||
|
noremap H [b
|
||||||
|
|
||||||
" Navigate to end of previous word
|
" Navigate to end of previous word
|
||||||
nnoremap <A-b> ge
|
nnoremap <A-b> ge
|
||||||
nnoremap <A-S-b> gE
|
nnoremap <A-S-b> gE
|
||||||
|
|
||||||
" Navigate to indents
|
" Navigate and close tabs
|
||||||
nnoremap J +
|
noremap <A-h> gT
|
||||||
vnoremap J +
|
noremap <A-l> gt
|
||||||
nnoremap K -
|
noremap <C-w> :action CloseContent<CR>
|
||||||
vnoremap K -
|
|
||||||
|
|
||||||
" Navigate camel humps
|
" Increment/decrement numbers
|
||||||
nnoremap L [w
|
nnoremap <Space>+ <C-a>
|
||||||
vnoremap L [w
|
nnoremap <Space>- <C-x>
|
||||||
nnoremap H [b
|
|
||||||
vnoremap H [b
|
|
||||||
|
|
||||||
" Edit camel humps
|
|
||||||
nnoremap dL :raction EditorDeleteToWordEndInDifferentHumpsMode<CR>
|
|
||||||
nnoremap dH :raction EditorDeleteToWordStartInDifferentHumpsMode<CR>
|
|
||||||
nmap dih dHdL " Only works in the middle of a hump
|
|
||||||
nmap cL dLi
|
|
||||||
nmap cH dHi
|
|
||||||
nmap cih dihi
|
|
||||||
|
|
||||||
" Edit from cursor to start/end of parenthesized block
|
" Edit from cursor to start/end of parenthesized block
|
||||||
nnoremap c) c])
|
nnoremap c) c])
|
||||||
@ -80,8 +115,9 @@ nnoremap D dd
|
|||||||
vnoremap C cc
|
vnoremap C cc
|
||||||
vnoremap D dd
|
vnoremap D dd
|
||||||
|
|
||||||
" Alternative way to enter visual block mode
|
" Enter visual block mode
|
||||||
nnoremap <Space>v <C-V>
|
nnoremap <Space>v <C-V>
|
||||||
|
onoremap <Space>v <C-V>
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
@ -97,13 +133,17 @@ nnoremap gp `[v`]
|
|||||||
" Put without yank
|
" Put without yank
|
||||||
xmap p gr
|
xmap p gr
|
||||||
|
|
||||||
|
" Show parameter info
|
||||||
|
nmap <A-p> <Action>(ParameterInfo)
|
||||||
|
imap <A-p> <Action>(ParameterInfo)
|
||||||
|
|
||||||
" Rebind commands that will be repurposed
|
" Rebind commands that will be repurposed
|
||||||
nnoremap GG G
|
nnoremap GG G
|
||||||
nnoremap dG dG
|
nnoremap dG dG
|
||||||
nnoremap cG cG
|
nnoremap cG cG
|
||||||
nnoremap M m
|
nnoremap M m
|
||||||
nnoremap Z z
|
nnoremap Z z
|
||||||
map <A-S-n> <A-p>
|
noremap \\ <C-w>
|
||||||
|
|
||||||
" Repurpose 'Enter' for statement completion (renaming function requires a custom version of IdeaVIM)
|
" Repurpose 'Enter' for statement completion (renaming function requires a custom version of IdeaVIM)
|
||||||
function! CompleteStatement()
|
function! CompleteStatement()
|
||||||
@ -127,6 +167,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>
|
||||||
@ -134,17 +177,15 @@ nmap gd :action GotoDeclaration<CR>
|
|||||||
nmap gD :action GotoTypeDeclaration<CR>
|
nmap gD :action GotoTypeDeclaration<CR>
|
||||||
nmap ge :raction VcsShowNextChangeMarker<CR>
|
nmap ge :raction VcsShowNextChangeMarker<CR>
|
||||||
nmap gE :raction VcsShowPrevChangeMarker<CR>
|
nmap gE :raction VcsShowPrevChangeMarker<CR>
|
||||||
map gi :action GotoImplementation<CR>
|
nmap gi :action GotoImplementation<CR>
|
||||||
map gj :raction EditorCloneCaretBelow<CR>
|
map gj :raction EditorCloneCaretBelow<CR>
|
||||||
map gk :raction EditorCloneCaretAbove<CR>
|
map gk :raction EditorCloneCaretAbove<CR>
|
||||||
nmap go :raction GotoNextElementUnderCaretUsage<CR>
|
|
||||||
nmap gO :raction GotoPrevElementUnderCaretUsage<CR>
|
|
||||||
nmap gr :action RecentLocations<CR>
|
nmap gr :action RecentLocations<CR>
|
||||||
nmap gR :action RecentChangedFiles<CR>
|
nmap gR :action RecentChangedFiles<CR>
|
||||||
map gs :action GotoSuperMethod<CR>
|
nmap gs :action GotoSuperMethod<CR>
|
||||||
map gS :action ShowSiblings<CR>
|
nmap gS :action ShowSiblings<CR>
|
||||||
nmap gT /\\<class\>\\\|\\<interface\>\\\|\\<enum\>\\\|\\<object\>\\\|\\<record\>\\\|\\<struct\>\\\|\\<trait\><CR>w:nohlsearch<CR>
|
map gt :raction KM.GotoNextTypeInFile<CR>
|
||||||
nmap gt gggT
|
map gT :raction KM.GotoPreviousTypeInFile<CR>
|
||||||
nmap gu :action ShowUsages<CR>
|
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>
|
||||||
@ -157,8 +198,6 @@ nmap Ge ge
|
|||||||
nmap GE gE
|
nmap GE gE
|
||||||
map Gj gj
|
map Gj gj
|
||||||
map Gk gk
|
map Gk gk
|
||||||
nmap Go go
|
|
||||||
nmap GO gO
|
|
||||||
nmap Gt gt
|
nmap Gt gt
|
||||||
nmap GT gT
|
nmap GT gT
|
||||||
map Gz gz
|
map Gz gz
|
||||||
@ -171,22 +210,35 @@ map zc :action EditorContextInfo<CR>
|
|||||||
map zd :action QuickJavaDoc<CR>
|
map zd :action QuickJavaDoc<CR>
|
||||||
map ze :action ShowErrorDescription<CR>
|
map ze :action ShowErrorDescription<CR>
|
||||||
map zf :action SelectInProjectView<CR>
|
map zf :action SelectInProjectView<CR>
|
||||||
|
|
||||||
map zht :action TypeHierarchy<CR>
|
map zht :action TypeHierarchy<CR>
|
||||||
map zhm :action MethodHierarchy<CR>
|
map zhm :action MethodHierarchy<CR>
|
||||||
map zhc :action CallHierarchy<CR>
|
map zhc :action CallHierarchy<CR>
|
||||||
|
|
||||||
map zm :action ShowBookmarks<CR>
|
map zm :action ShowBookmarks<CR>
|
||||||
map zp :action QuickImplementations<CR>
|
map zp :action QuickImplementations<CR>
|
||||||
map zP :action QuickTypeDefinition<CR>
|
map zP :action QuickTypeDefinition<CR>
|
||||||
|
|
||||||
|
map zqa :action CloseAllEditors<CR>
|
||||||
|
map zqh :action CloseAllToTheLeft<CR>
|
||||||
|
map zql :action CloseAllToTheRight<CR>
|
||||||
|
map zqo :action CloseAllEditorsButActive<CR>
|
||||||
|
map zqq :action CloseContent<CR>
|
||||||
|
map zqu :action ReopenClosedTab<CR>
|
||||||
|
|
||||||
map zr :action RunToCursor<CR>
|
map zr :action RunToCursor<CR>
|
||||||
map zR :action ForceRunToCursor<CR>
|
map zR :action ForceRunToCursor<CR>
|
||||||
|
|
||||||
map zsd :action MoveTabDown<CR>
|
map zsd :action MoveTabDown<CR>
|
||||||
map zsr :action MoveTabRight<CR>
|
map zsr :action MoveTabRight<CR>
|
||||||
map zsu :action Unsplit<CR>
|
map zsu :action Unsplit<CR>
|
||||||
map zsU :action UnsplitAll<CR>
|
map zsU :action UnsplitAll<CR>
|
||||||
|
|
||||||
map zt :action ExpressionTypeInfo<CR>
|
map zt :action ExpressionTypeInfo<CR>
|
||||||
map zx :action EvaluateExpression<CR>
|
map zx :action EvaluateExpression<CR>
|
||||||
|
|
||||||
" Repurpose 'm' for refactoring (normal mode)
|
" Repurpose 'm' for refactoring (normal mode)
|
||||||
|
nmap md :action SafeDelete<CR>
|
||||||
nmap mg :action Generate<CR>
|
nmap mg :action Generate<CR>
|
||||||
nmap mi :action Inline<CR>
|
nmap mi :action Inline<CR>
|
||||||
nmap mn :action RenameElement<CR>
|
nmap mn :action RenameElement<CR>
|
||||||
@ -211,6 +263,8 @@ nmap mr :action Refactorings.QuickListPopupAction<CR>
|
|||||||
vmap mr :action Refactorings.QuickListPopupAction<CR>
|
vmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||||
nmap mv :action IntroduceVariable<CR>
|
nmap mv :action IntroduceVariable<CR>
|
||||||
vmap mv :action IntroduceVariable<CR>
|
vmap mv :action IntroduceVariable<CR>
|
||||||
|
nmap 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
|
||||||
|
22
.vimrc
22
.vimrc
@ -4,25 +4,34 @@ set history=1024
|
|||||||
set hlsearch
|
set hlsearch
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set incsearch
|
set incsearch
|
||||||
|
set infercase
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
set linebreak
|
||||||
set listchars=space:·,tab:>·,trail:~,extends:>,precedes:<
|
set listchars=space:·,tab:>·,trail:~,extends:>,precedes:<
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set noerrorbells
|
set noerrorbells
|
||||||
|
set nomodeline
|
||||||
set noshowcmd
|
set noshowcmd
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set number
|
set number
|
||||||
|
set nrformats-=octal
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set scrolloff=999
|
set scrolloff=999
|
||||||
set shiftwidth=0
|
set shiftwidth=0
|
||||||
|
set showbreak=↪
|
||||||
set showmatch
|
set showmatch
|
||||||
set sidescrolloff=999
|
set sidescrolloff=999
|
||||||
set smartcase
|
set smartcase
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
|
set ttymouse=xterm2
|
||||||
set wildmenu
|
set wildmenu
|
||||||
set wrap
|
set wrap
|
||||||
|
|
||||||
" Color support
|
" Show full description for lines and bytes
|
||||||
set t_Co=256
|
set shortmess-=l
|
||||||
|
|
||||||
|
" Show search count
|
||||||
|
set shortmess-=S
|
||||||
|
|
||||||
" Color scheme
|
" Color scheme
|
||||||
syntax enable
|
syntax enable
|
||||||
@ -59,12 +68,6 @@ vnoremap <expr> j v:count ? 'j' : 'gj'
|
|||||||
nnoremap <expr> k v:count ? 'k' : 'gk'
|
nnoremap <expr> k v:count ? 'k' : 'gk'
|
||||||
vnoremap <expr> k v:count ? 'k' : 'gk'
|
vnoremap <expr> k v:count ? 'k' : 'gk'
|
||||||
|
|
||||||
" Navigate to indents
|
|
||||||
nnoremap J +
|
|
||||||
vnoremap J +
|
|
||||||
nnoremap K -
|
|
||||||
vnoremap K -
|
|
||||||
|
|
||||||
" Navigate camel humps (https://github.com/vim-scripts/camelcasemotion)
|
" 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
|
||||||
@ -87,8 +90,9 @@ nnoremap D dd
|
|||||||
vnoremap C cc
|
vnoremap C cc
|
||||||
vnoremap D dd
|
vnoremap D dd
|
||||||
|
|
||||||
" Alternative way to enter visual block mode
|
" Enter visual block mode
|
||||||
nnoremap <Space>v <C-V>
|
nnoremap <Space>v <C-V>
|
||||||
|
onoremap <Space>v <C-V>
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
|
Loading…
Reference in New Issue
Block a user