mirror of
https://github.com/chylex/dotfiles.git
synced 2024-11-25 23:42:46 +01:00
Compare commits
No commits in common. "3b7145539ee9f4a7d4a33a7d34a1b344d0e213a0" and "63cd476e43d837955780979d0ed66b280d0babb1" have entirely different histories.
3b7145539e
...
63cd476e43
114
.ideavimrc
114
.ideavimrc
@ -1,7 +1,6 @@
|
||||
set ignorecase
|
||||
set incsearch
|
||||
set number
|
||||
set nrformats-=octal
|
||||
set relativenumber
|
||||
set scrolloff=999
|
||||
set showcmd
|
||||
@ -11,51 +10,10 @@ set smartcase
|
||||
set virtualedit=onemore
|
||||
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 ideajoin
|
||||
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 'nerdtree'
|
||||
Plug 'vim-ReplaceWithRegister'
|
||||
@ -67,7 +25,7 @@ Plug 'vim-multiple-cursors'
|
||||
Plug 'vim-surround'
|
||||
Plug 'vim-textobj-entire'
|
||||
|
||||
" https://vimhelp.org/index.txt.html
|
||||
" http://vimdoc.sourceforge.net/htmldoc/vimindex.html
|
||||
|
||||
" Map top row on Czech keyboard layout to digits
|
||||
map + 1
|
||||
@ -86,22 +44,29 @@ nnoremap ú @@
|
||||
noremap ů ;
|
||||
map § %
|
||||
|
||||
" Camel humps
|
||||
noremap L [w
|
||||
noremap H [b
|
||||
|
||||
" Navigate to end of previous word
|
||||
nnoremap <A-b> ge
|
||||
nnoremap <A-S-b> gE
|
||||
|
||||
" Navigate and close tabs
|
||||
noremap <A-h> gT
|
||||
noremap <A-l> gt
|
||||
noremap <C-w> :action CloseContent<CR>
|
||||
" Navigate to indents
|
||||
nnoremap J +
|
||||
vnoremap J +
|
||||
nnoremap K -
|
||||
vnoremap K -
|
||||
|
||||
" Increment/decrement numbers
|
||||
nnoremap <Space>+ <C-a>
|
||||
nnoremap <Space>- <C-x>
|
||||
" Navigate camel humps
|
||||
nnoremap L [w
|
||||
vnoremap L [w
|
||||
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
|
||||
nnoremap c) c])
|
||||
@ -115,9 +80,8 @@ nnoremap D dd
|
||||
vnoremap C cc
|
||||
vnoremap D dd
|
||||
|
||||
" Enter visual block mode
|
||||
" Alternative way to enter visual block mode
|
||||
nnoremap <Space>v <C-V>
|
||||
onoremap <Space>v <C-V>
|
||||
|
||||
" Indent keeping selection
|
||||
vnoremap < <gv
|
||||
@ -133,17 +97,13 @@ nnoremap gp `[v`]
|
||||
" Put without yank
|
||||
xmap p gr
|
||||
|
||||
" Show parameter info
|
||||
nmap <A-p> <Action>(ParameterInfo)
|
||||
imap <A-p> <Action>(ParameterInfo)
|
||||
|
||||
" Rebind commands that will be repurposed
|
||||
nnoremap GG G
|
||||
nnoremap dG dG
|
||||
nnoremap cG cG
|
||||
nnoremap M m
|
||||
nnoremap Z z
|
||||
noremap \\ <C-w>
|
||||
map <A-S-n> <A-p>
|
||||
|
||||
" Repurpose 'Enter' for statement completion (renaming function requires a custom version of IdeaVIM)
|
||||
function! CompleteStatement()
|
||||
@ -167,9 +127,6 @@ nmap ] :raction MethodDown<CR>
|
||||
nmap { :raction JumpToLastChange<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)
|
||||
nmap gb :raction GotoNextBookmark<CR>
|
||||
nmap gB :raction GotoPreviousBookmark<CR>
|
||||
@ -177,15 +134,17 @@ nmap gd :action GotoDeclaration<CR>
|
||||
nmap gD :action GotoTypeDeclaration<CR>
|
||||
nmap ge :raction VcsShowNextChangeMarker<CR>
|
||||
nmap gE :raction VcsShowPrevChangeMarker<CR>
|
||||
nmap gi :action GotoImplementation<CR>
|
||||
map gi :action GotoImplementation<CR>
|
||||
map gj :raction EditorCloneCaretBelow<CR>
|
||||
map gk :raction EditorCloneCaretAbove<CR>
|
||||
nmap go :raction GotoNextElementUnderCaretUsage<CR>
|
||||
nmap gO :raction GotoPrevElementUnderCaretUsage<CR>
|
||||
nmap gr :action RecentLocations<CR>
|
||||
nmap gR :action RecentChangedFiles<CR>
|
||||
nmap gs :action GotoSuperMethod<CR>
|
||||
nmap gS :action ShowSiblings<CR>
|
||||
map gt :raction KM.GotoNextTypeInFile<CR>
|
||||
map gT :raction KM.GotoPreviousTypeInFile<CR>
|
||||
map gs :action GotoSuperMethod<CR>
|
||||
map gS :action ShowSiblings<CR>
|
||||
nmap gT /\\<class\>\\\|\\<interface\>\\\|\\<enum\>\\\|\\<object\>\\\|\\<record\>\\\|\\<struct\>\\\|\\<trait\><CR>w:nohlsearch<CR>
|
||||
nmap gt gggT
|
||||
nmap gu :action ShowUsages<CR>
|
||||
nmap gU :action FindUsages<CR>
|
||||
map gz :action NextSplitter<CR>
|
||||
@ -198,6 +157,8 @@ nmap Ge ge
|
||||
nmap GE gE
|
||||
map Gj gj
|
||||
map Gk gk
|
||||
nmap Go go
|
||||
nmap GO gO
|
||||
nmap Gt gt
|
||||
nmap GT gT
|
||||
map Gz gz
|
||||
@ -210,35 +171,22 @@ map zc :action EditorContextInfo<CR>
|
||||
map zd :action QuickJavaDoc<CR>
|
||||
map ze :action ShowErrorDescription<CR>
|
||||
map zf :action SelectInProjectView<CR>
|
||||
|
||||
map zht :action TypeHierarchy<CR>
|
||||
map zhm :action MethodHierarchy<CR>
|
||||
map zhc :action CallHierarchy<CR>
|
||||
|
||||
map zm :action ShowBookmarks<CR>
|
||||
map zp :action QuickImplementations<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 ForceRunToCursor<CR>
|
||||
|
||||
map zsd :action MoveTabDown<CR>
|
||||
map zsr :action MoveTabRight<CR>
|
||||
map zsu :action Unsplit<CR>
|
||||
map zsU :action UnsplitAll<CR>
|
||||
|
||||
map zt :action ExpressionTypeInfo<CR>
|
||||
map zx :action EvaluateExpression<CR>
|
||||
|
||||
" Repurpose 'm' for refactoring (normal mode)
|
||||
nmap md :action SafeDelete<CR>
|
||||
nmap mg :action Generate<CR>
|
||||
nmap mi :action Inline<CR>
|
||||
nmap mn :action RenameElement<CR>
|
||||
@ -263,8 +211,6 @@ nmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||
vmap mr :action Refactorings.QuickListPopupAction<CR>
|
||||
nmap 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
|
||||
set acejump
|
||||
|
22
.vimrc
22
.vimrc
@ -4,34 +4,25 @@ set history=1024
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set incsearch
|
||||
set infercase
|
||||
set laststatus=2
|
||||
set linebreak
|
||||
set listchars=space:·,tab:>·,trail:~,extends:>,precedes:<
|
||||
set mouse=a
|
||||
set noerrorbells
|
||||
set nomodeline
|
||||
set noshowcmd
|
||||
set noshowmode
|
||||
set number
|
||||
set nrformats-=octal
|
||||
set relativenumber
|
||||
set scrolloff=999
|
||||
set shiftwidth=0
|
||||
set showbreak=↪
|
||||
set showmatch
|
||||
set sidescrolloff=999
|
||||
set smartcase
|
||||
set tabstop=4
|
||||
set ttymouse=xterm2
|
||||
set wildmenu
|
||||
set wrap
|
||||
|
||||
" Show full description for lines and bytes
|
||||
set shortmess-=l
|
||||
|
||||
" Show search count
|
||||
set shortmess-=S
|
||||
" Color support
|
||||
set t_Co=256
|
||||
|
||||
" Color scheme
|
||||
syntax enable
|
||||
@ -68,6 +59,12 @@ vnoremap <expr> j v:count ? 'j' : 'gj'
|
||||
nnoremap <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)
|
||||
map L <Plug>CamelCaseMotion_w
|
||||
map H <Plug>CamelCaseMotion_b
|
||||
@ -90,9 +87,8 @@ nnoremap D dd
|
||||
vnoremap C cc
|
||||
vnoremap D dd
|
||||
|
||||
" Enter visual block mode
|
||||
" Alternative way to enter visual block mode
|
||||
nnoremap <Space>v <C-V>
|
||||
onoremap <Space>v <C-V>
|
||||
|
||||
" Indent keeping selection
|
||||
vnoremap < <gv
|
||||
|
Loading…
Reference in New Issue
Block a user