mirror of
https://github.com/chylex/dotfiles.git
synced 2025-09-15 12:32:09 +02:00
Compare commits
66 Commits
6ac6c169fa
...
main
Author | SHA1 | Date | |
---|---|---|---|
d76b82721d
|
|||
580a47aa9b
|
|||
946f464aca
|
|||
1e5c7a752e
|
|||
c1fac762be
|
|||
8cd0b37833
|
|||
5cbaf5587d
|
|||
7b5bbf7bb7
|
|||
6d1840a48c
|
|||
4a77b0588b
|
|||
a9bfe13277
|
|||
be2bdafe78
|
|||
cda970bfc2
|
|||
80e5b074c9
|
|||
60cb335c9a
|
|||
78866848be
|
|||
f69bb44bfa
|
|||
6c4c99a98d
|
|||
0023b10571
|
|||
4fa0da63e8
|
|||
eb54e7d636
|
|||
2a8dbc57ec
|
|||
713fb10dab
|
|||
ca8bc186b2
|
|||
534ea4a4f1
|
|||
2aebc2deeb
|
|||
c83891317f
|
|||
5ce16f984f
|
|||
83d12be425
|
|||
c0c7eccc1d
|
|||
abc7112e75
|
|||
21e38d0d08
|
|||
a43aae61e8
|
|||
c9c9c0223e
|
|||
a3c4fe7259
|
|||
67c485da65
|
|||
62edd5222d
|
|||
1aa9bde933
|
|||
0bcdaaa077
|
|||
9fa73b1ba8
|
|||
e7dca24993
|
|||
ac9b1d4248
|
|||
41840c7b33
|
|||
939134dc49
|
|||
1bc97f78b6
|
|||
6681099e47
|
|||
0903e926bb
|
|||
14aa43ede4
|
|||
cab52d34b1
|
|||
4203b6e583
|
|||
af2f87c518
|
|||
daea01656e
|
|||
35ba420d83
|
|||
f66f0990ff
|
|||
96e832c9cc
|
|||
7ca80f443f
|
|||
19d10e7428
|
|||
e0b0194256
|
|||
b739008bc5
|
|||
3c66f4c85b
|
|||
bd5fb52aa7
|
|||
8a7a591d68
|
|||
7ebb930f0b
|
|||
61f69a7774
|
|||
6c62422353
|
|||
1d9efca953
|
4
.bashrc
4
.bashrc
@@ -5,8 +5,10 @@ bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
|
||||
alias gh='history|grep'
|
||||
alias less='less --mouse'
|
||||
alias less='less -R --mouse'
|
||||
alias zless='zless -R --mouse'
|
||||
alias lsa='ls -l -v --all --human-readable --group-directories-first --color=auto'
|
||||
alias vim='vim -p'
|
||||
|
||||
alias d='docker'
|
||||
alias dc='docker compose'
|
||||
|
304
.ideavimrc
304
.ideavimrc
@@ -1,3 +1,5 @@
|
||||
set clipboard-=ideaput
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set incsearch
|
||||
set number
|
||||
@@ -29,6 +31,7 @@ sethandler <C-C> a:ide
|
||||
sethandler <C-E> a:ide
|
||||
sethandler <C-F> a:ide
|
||||
sethandler <C-G> a:ide
|
||||
sethandler <C-H> a:ide
|
||||
sethandler <C-I> a:ide
|
||||
sethandler <C-J> a:ide
|
||||
sethandler <C-K> a:ide
|
||||
@@ -38,33 +41,55 @@ sethandler <C-R> a:ide
|
||||
sethandler <C-S> a:ide
|
||||
sethandler <C-T> a:ide
|
||||
sethandler <C-V> a:ide
|
||||
sethandler <C-W> a:ide
|
||||
sethandler <C-X> a:ide
|
||||
sethandler <C-Y> a:ide
|
||||
sethandler <C-\> a:ide
|
||||
|
||||
sethandler <A-B> a:vim
|
||||
sethandler <A-H> a:vim
|
||||
sethandler <A-J> a:vim
|
||||
sethandler <A-K> a:vim
|
||||
sethandler <A-L> a:vim
|
||||
sethandler <A-N> a:vim
|
||||
sethandler <A-O> a:vim
|
||||
sethandler <A-P> a:vim
|
||||
sethandler <A-S-B> a:vim
|
||||
sethandler <A-S-H> a:vim
|
||||
sethandler <A-S-J> a:vim
|
||||
sethandler <A-S-K> a:vim
|
||||
sethandler <A-S-L> a:vim
|
||||
sethandler <A-S-O> a:vim
|
||||
sethandler <A-V> 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
|
||||
sethandler <C-S-W> a:vim
|
||||
sethandler <C-U> a:vim
|
||||
sethandler <S-BS> a:vim
|
||||
|
||||
sethandler <C-Left> a:vim
|
||||
sethandler <C-Right> a:vim
|
||||
sethandler <S-Left> a:vim
|
||||
sethandler <S-Right> a:vim
|
||||
|
||||
if &ide =~? 'rider'
|
||||
" These shortcuts are broken in Rider for some reason...
|
||||
sethandler <A-S-H> a:ide
|
||||
sethandler <A-S-L> a:ide
|
||||
endif
|
||||
|
||||
" Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins)
|
||||
Plug 'argtextobj.vim'
|
||||
Plug 'nerdtree'
|
||||
Plug 'vim-exchange'
|
||||
Plug 'vim-highlightedyank'
|
||||
Plug 'vim-indent-object'
|
||||
Plug 'vim-matchit'
|
||||
Plug 'vim-multiple-cursors'
|
||||
Plug 'vim-paragraph-motion'
|
||||
Plug 'vim-surround'
|
||||
Plug 'vim-textobj-entire'
|
||||
|
||||
@@ -83,52 +108,66 @@ map í 9
|
||||
map é 0
|
||||
|
||||
" Move some commands closer on Czech keyboard layout
|
||||
map ů %
|
||||
nnoremap ú @@
|
||||
noremap ů ;
|
||||
map § %
|
||||
noremap , +
|
||||
|
||||
" Camel humps
|
||||
noremap § `
|
||||
noremap §§ ``
|
||||
nnoremap m§ m
|
||||
|
||||
sunmap ů
|
||||
sunmap §
|
||||
|
||||
" Enter visual block mode
|
||||
map <A-v> <C-v>
|
||||
|
||||
" Navigate camel humps
|
||||
noremap L [w
|
||||
noremap H [b
|
||||
xnoremap L ]w
|
||||
xnoremap H ]b
|
||||
nnoremap L [w
|
||||
nnoremap H [b
|
||||
|
||||
" Navigate to end of previous word
|
||||
noremap <A-b> ge
|
||||
noremap <A-S-b> gE
|
||||
|
||||
" Navigate editor tabs
|
||||
noremap <A-h> gT
|
||||
noremap <A-l> gt
|
||||
inoremap <A-h> <C-o>gT
|
||||
inoremap <A-l> <C-o>gt
|
||||
|
||||
" Increment/decrement numbers
|
||||
noremap <Bar>+ <C-a>
|
||||
noremap <Bar>- <C-x>
|
||||
" Navigate unmatched parentheses/braces
|
||||
noremap g( [(
|
||||
noremap g) ])
|
||||
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
|
||||
nnoremap d( c[((<Esc>l
|
||||
|
||||
" Delete lines
|
||||
" Create lines
|
||||
nnoremap go o<Esc>$
|
||||
nnoremap gO O<Esc>$
|
||||
nnoremap g<CR> i<CR><Esc>l
|
||||
|
||||
" Edit current line
|
||||
nnoremap C cc
|
||||
xnoremap C cc
|
||||
nnoremap D dd
|
||||
xnoremap D dd
|
||||
|
||||
" Enter visual block mode
|
||||
xnoremap v <C-V>
|
||||
nnoremap < <<
|
||||
nnoremap > >>
|
||||
|
||||
" Indent keeping selection
|
||||
xnoremap < <gv
|
||||
xnoremap > >gv
|
||||
xnoremap = =gv
|
||||
|
||||
" Extend selection
|
||||
xmap x <Action>(EditorSelectWord)
|
||||
xmap X <Action>(EditorUnSelectWord)
|
||||
|
||||
" 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
|
||||
|
||||
" Reselect pasted text
|
||||
nnoremap gp `[v`]
|
||||
@@ -137,152 +176,151 @@ nnoremap gp `[v`]
|
||||
xnoremap p P
|
||||
xnoremap P p
|
||||
|
||||
" Clear search highlights
|
||||
nnoremap <Esc> :nohlsearch<Return><Esc>
|
||||
|
||||
" Code completion
|
||||
if &ide !~? 'rider'
|
||||
imap <expr> ! pumvisible() ? '<Action>(EditorChooseLookupItem)<Esc>mzF.bi!<Esc>`zla' : '!'
|
||||
endif
|
||||
|
||||
" Show parameter info
|
||||
nmap <A-p> <Action>(ParameterInfo)
|
||||
imap <A-p> <Action>(ParameterInfo)
|
||||
|
||||
" Toggle comments
|
||||
nmap <C--> <Action>(CommentByLineComment)
|
||||
vmap <C--> <Action>(CommentByBlockComment)
|
||||
nmap <D--> <C-->
|
||||
vmap <D--> <C-->
|
||||
|
||||
" Navigate back/forward
|
||||
nmap <BS> <Action>(Back)
|
||||
nmap <S-BS> <Action>(Forward)
|
||||
map <BS> <Action>(Back)
|
||||
map <S-BS> <Action>(Forward)
|
||||
|
||||
" Navigate inspection highlights
|
||||
map ( <Action>(GotoPreviousError)
|
||||
map ) <Action>(GotoNextError)
|
||||
|
||||
" Navigate to previous/next method
|
||||
nnoremap [ [m
|
||||
xnoremap [ [m
|
||||
nnoremap ] ]m
|
||||
xnoremap ] ]m
|
||||
map [ <Action>(MethodUp)
|
||||
map ] <Action>(MethodDown)
|
||||
|
||||
" Alternative bindings for square bracket commands
|
||||
nnoremap g[ [
|
||||
xnoremap g[ [
|
||||
nnoremap g] ]
|
||||
xnoremap g] ]
|
||||
" Navigate paragraphs at indentation
|
||||
map { <Plug>(ParagraphPrevMotion)$
|
||||
map } <Plug>(ParagraphNextMotion)$
|
||||
|
||||
" Move statement/element
|
||||
map <A-S-h> <Action>(MoveElementLeft)
|
||||
map <A-S-l> <Action>(MoveElementRight)
|
||||
|
||||
map <A-S-j> <Action>(MoveStatementDown)
|
||||
map <A-S-k> <Action>(MoveStatementUp)
|
||||
|
||||
" Multiple carets
|
||||
map <expr> <A-j> pumvisible() ? '<Action>(EditorDown)' : '<Action>(EditorCloneCaretBelow)'
|
||||
map <expr> <A-k> pumvisible() ? '<Action>(EditorUp)' : '<Action>(EditorCloneCaretAbove)'
|
||||
|
||||
imap <expr> <A-j> pumvisible() ? '<Action>(EditorDown)' : '<Action>(EditorCloneCaretBelow)'
|
||||
imap <expr> <A-k> pumvisible() ? '<Action>(EditorUp)' : '<Action>(EditorCloneCaretAbove)'
|
||||
|
||||
" Manage editor tabs
|
||||
noremap <C-w> :action CloseContent<CR>
|
||||
noremap <C-S-w> :action ReopenClosedTab<CR>
|
||||
noremap \\ <C-w>
|
||||
map <C-w>m <Action>(MoveEditorToOppositeTabGroup)
|
||||
map <C-w>s <Action>(MoveTabDown)
|
||||
map <C-w>u <Action>(Unsplit)
|
||||
map <C-w>U <Action>(UnsplitAll)
|
||||
map <C-w>v <Action>(MoveTabRight)
|
||||
|
||||
noremap \\s :action MoveTabDown<CR>
|
||||
noremap \\S <C-w>s
|
||||
noremap \\u :action Unsplit<CR>
|
||||
noremap \\U :action UnsplitAll<CR>
|
||||
noremap \\v :action MoveTabRight<CR>
|
||||
noremap \\V <C-w>v
|
||||
noremap <C-w>S <C-w>s
|
||||
noremap <C-w>V <C-w>v
|
||||
|
||||
noremap \\qa :action CloseAllEditors<CR>
|
||||
noremap \\qh :action CloseAllToTheLeft<CR>
|
||||
noremap \\ql :action CloseAllToTheRight<CR>
|
||||
noremap \\qo :action CloseAllEditorsButActive<CR>
|
||||
map <C-w><C-w>a <Action>(CloseAllEditors)
|
||||
map <C-w><C-w>h <Action>(CloseAllToTheLeft)
|
||||
map <C-w><C-w>l <Action>(CloseAllToTheRight)
|
||||
map <C-w><C-w>o <Action>(CloseAllEditorsButActive)
|
||||
|
||||
map \\ <C-w>
|
||||
map \\\\ <C-w><C-w>
|
||||
|
||||
" Rebind repurposed commands
|
||||
nnoremap GG G
|
||||
nnoremap dG dG
|
||||
nnoremap cG cG
|
||||
noremap g] ]
|
||||
noremap g[ [
|
||||
|
||||
nnoremap M m
|
||||
nnoremap Z z
|
||||
|
||||
" Repurpose 'Enter' for statement completion (requires a custom version of IdeaVIM)
|
||||
" Repurpose 'Enter' for statement completion
|
||||
nmap <Enter> <Action>(EditorCompleteStatement)
|
||||
|
||||
" Repurpose special characters for navigation
|
||||
nmap ( :raction GotoPreviousError<CR>
|
||||
nmap ) :raction GotoNextError<CR>
|
||||
|
||||
" Repurpose 'g' for navigation (:raction requires a custom version of IdeaVIM)
|
||||
nmap gb :raction GotoNextBookmark<CR>
|
||||
nmap gB :raction GotoPreviousBookmark<CR>
|
||||
nmap gD <Action>(GotoTypeDeclaration)
|
||||
nmap ge :raction VcsShowNextChangeMarker<CR>
|
||||
nmap gE :raction VcsShowPrevChangeMarker<CR>
|
||||
nmap gf <Action>(EditSource)
|
||||
nmap gi <Action>(GotoImplementation)
|
||||
map gj :raction EditorCloneCaretBelow<CR>
|
||||
map gk :raction EditorCloneCaretAbove<CR>
|
||||
nmap gr <Action>(RecentLocations)
|
||||
nmap gR <Action>(RecentChangedFiles)
|
||||
nmap gs <Action>(GotoSuperMethod)
|
||||
nmap gS <Action>(ShowSiblings)
|
||||
map gt :raction KM.GotoNextTypeInFile<CR>
|
||||
map gT :raction KM.GotoPreviousTypeInFile<CR>
|
||||
nmap gu <Action>(ShowUsages)
|
||||
nmap gU <Action>(FindUsages)
|
||||
map gz <Action>(NextSplitter)
|
||||
map gZ <Action>(PrevSplitter)
|
||||
nmap g( :raction KM.GotoPreviousErrorInOtherMode<CR>
|
||||
nmap g) :raction KM.GotoNextErrorInOtherMode<CR>
|
||||
|
||||
" Make bidirectional 'g' commands work with 'G' too
|
||||
nmap Gb gb
|
||||
nmap GB gB
|
||||
nmap Ge ge
|
||||
nmap GE gE
|
||||
map Gj gj
|
||||
map Gk gk
|
||||
nmap Gt gt
|
||||
nmap GT gT
|
||||
map Gz gz
|
||||
map GZ gZ
|
||||
" Repurpose 'g' for navigation (VimJumpToSource requires a custom version of IdeaVIM)
|
||||
map gb <Action>(GotoNextBookmark)
|
||||
map gB <Action>(GotoPreviousBookmark)
|
||||
map gD <Action>(GotoTypeDeclaration)
|
||||
map ge <Action>(VcsShowNextChangeMarker)
|
||||
map gE <Action>(VcsShowPrevChangeMarker)
|
||||
map gf <Action>(VimJumpToSource)<Action>(HideActiveWindow)
|
||||
map gi <Action>(GotoImplementation)
|
||||
map gr <Action>(RecentLocations)
|
||||
map gR <Action>(RecentChangedFiles)
|
||||
map gs <Action>(GotoSuperMethod)
|
||||
map gS <Action>(ShowSiblings)
|
||||
map gt gg<Action>(KM.GotoNextTypeInFile)
|
||||
map gT <Action>(KM.GotoNextTypeInFile)
|
||||
map gu <Action>(ShowUsages)
|
||||
map gU <Action>(FindUsages)
|
||||
|
||||
" Repurpose 'z' for view actions and debugger
|
||||
map za <Action>(Annotate)
|
||||
map zb <Action>(ViewBreakpoints)
|
||||
map zc <Action>(EditorContextInfo)
|
||||
map zd <Action>(QuickJavaDoc)
|
||||
map zd <Action>(CompareClipboardWithSelection)
|
||||
map ze <Action>(ShowErrorDescription)
|
||||
map zf <Action>(SelectInProjectView)
|
||||
|
||||
map zht <Action>(TypeHierarchy)
|
||||
map zhm <Action>(MethodHierarchy)
|
||||
map zhc <Action>(CallHierarchy)
|
||||
|
||||
map zi <Action>(ShowHoverInfo)
|
||||
map zm <Action>(ShowBookmarks)
|
||||
map zp <Action>(QuickImplementations)
|
||||
map zP <Action>(QuickTypeDefinition)
|
||||
|
||||
map zr <Action>(RunToCursor)
|
||||
map zR <Action>(ForceRunToCursor)
|
||||
|
||||
map zs <Action>(osmedile.intellij.stringmanip.PopupChoiceAction)
|
||||
map zt <Action>(ExpressionTypeInfo)
|
||||
map zx <Action>(EvaluateExpression)
|
||||
|
||||
" Repurpose 'm' for refactoring (normal mode)
|
||||
nmap md <Action>(SafeDelete)
|
||||
nmap me <Action>(Move)
|
||||
nmap mg <Action>(Generate)
|
||||
nmap mi <Action>(Inline)
|
||||
nmap mn <Action>(RenameElement)
|
||||
nmap mo <Action>(OverrideMethods)
|
||||
nmap ms <Action>(ChangeSignature)
|
||||
nmap mS <Action>(NewScratchFile)
|
||||
map zht <Action>(TypeHierarchy)
|
||||
map zhm <Action>(MethodHierarchy)
|
||||
|
||||
" Repurpose 'm' for refactoring (normal / visual mode)
|
||||
nmap mc <Action>(IntroduceConstant)
|
||||
xmap mc <Action>(IntroduceConstant)
|
||||
nmap mf <Action>(IntroduceField)
|
||||
xmap mf <Action>(IntroduceField)
|
||||
nmap mm <Action>(ExtractMethod)
|
||||
xmap mm <Action>(ExtractMethod)
|
||||
nmap mM <Action>(ExtractFunction)
|
||||
xmap mM <Action>(ExtractFunction)
|
||||
nmap mp <Action>(IntroduceParameter)
|
||||
xmap mp <Action>(IntroduceParameter)
|
||||
nmap mP <Action>(IntroduceProperty)
|
||||
xmap mP <Action>(IntroduceProperty)
|
||||
nmap mr <Action>(Refactorings.QuickListPopupAction)
|
||||
xmap mr <Action>(Refactorings.QuickListPopupAction)
|
||||
nmap mt <Action>(InsertLiveTemplate)
|
||||
xmap mt <Action>(SurroundWithLiveTemplate)
|
||||
nmap mv <Action>(IntroduceVariable)
|
||||
xmap mv <Action>(IntroduceVariable)
|
||||
nmap mw <Action>(SurroundWith)
|
||||
xmap mw <Action>(SurroundWith)
|
||||
if &ide =~? 'rider'
|
||||
map zhc <Action>(RiderShowIncomingCalls)
|
||||
else
|
||||
map zhc <Action>(CallHierarchy)
|
||||
endif
|
||||
|
||||
nmap zhl <Action>(LocalHistory.ShowHistory)
|
||||
xmap zhl <Action>(LocalHistory.ShowSelectionHistory)
|
||||
nmap zhg <Action>(Vcs.ShowTabbedFileHistory)
|
||||
xmap zhg <Action>(Vcs.ShowHistoryForBlock)
|
||||
|
||||
" Repurpose 'm' for refactoring
|
||||
map mc <Action>(IntroduceConstant)
|
||||
map md <Action>(SafeDelete)
|
||||
map me <Action>(Move)
|
||||
map mf <Action>(IntroduceField)
|
||||
map mg <Action>(Generate)
|
||||
map mi <Action>(Inline)
|
||||
map mm <Action>(ExtractMethod)
|
||||
map mM <Action>(ExtractFunction)
|
||||
map mn <Action>(RenameElement)
|
||||
map mo <Action>(OverrideMethods)
|
||||
map mp <Action>(IntroduceParameter)
|
||||
map mP <Action>(IntroduceProperty)
|
||||
map mr <Action>(Refactorings.QuickListPopupAction)
|
||||
map ms <Action>(ChangeSignature)
|
||||
map mS <Action>(NewScratchFile)
|
||||
map mt <Action>(InsertLiveTemplate)
|
||||
map mv <Action>(IntroduceVariable)
|
||||
map mw <Action>(SurroundWith)
|
||||
|
||||
" Remap NERDTree bindings
|
||||
let g:NERDTreeMapOpenVSplit = 'v'
|
||||
let g:NERDTreeMapPreviewVSplit = 'gv'
|
||||
let g:NERDTreeMapOpenSplit = 's'
|
||||
let g:NERDTreeMapPreviewSplit = 'gs'
|
||||
|
||||
" Actions for custom version of AceJump
|
||||
set acejump
|
||||
map <Space> <Action>(AceVimAction_JumpAllEditors)
|
||||
map g<Space> <Action>(AceVimAction_JumpAllEditors_GoToDeclaration)
|
||||
|
@@ -6,6 +6,8 @@ set -g mouse on
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi M-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi Enter send -X copy-selection-and-cancel
|
||||
unbind -T copy-mode-vi MouseDragEnd1Pane
|
||||
|
||||
|
166
.vimrc
166
.vimrc
@@ -1,5 +1,8 @@
|
||||
set autoindent
|
||||
set backspace=indent,eol,start
|
||||
set encoding=utf-8
|
||||
set guifont=Cascadia_Mono:h12:cANSI:qDRAFT
|
||||
set guioptions-=t " Remove menu tearoff
|
||||
set history=1024
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
@@ -7,39 +10,74 @@ set incsearch
|
||||
set infercase
|
||||
set laststatus=2
|
||||
set linebreak
|
||||
set listchars=space:·,tab:>·,trail:~,extends:>,precedes:<
|
||||
set list
|
||||
set listchars=lead:·,trail:·,tab:→\ ,extends:>,precedes:<
|
||||
set modeline
|
||||
set modelines=2
|
||||
set mouse=a
|
||||
set noerrorbells
|
||||
set nomodeline
|
||||
set noshowcmd
|
||||
set noshowmode
|
||||
set number
|
||||
set nrformats-=octal
|
||||
set number
|
||||
set relativenumber
|
||||
set scrolloff=999
|
||||
set shiftwidth=0
|
||||
set showbreak=↪
|
||||
set shortmess-=S " Show search count
|
||||
set shortmess-=l " Show full description for lines and bytes
|
||||
set showbreak=↪\
|
||||
set showmatch
|
||||
set sidescrolloff=999
|
||||
set smartcase
|
||||
set tabstop=4
|
||||
set ttimeout
|
||||
set ttimeoutlen=50
|
||||
set ttymouse=xterm2
|
||||
set virtualedit=onemore
|
||||
set wildmenu
|
||||
set winaltkeys=no
|
||||
set wrap
|
||||
|
||||
" Show full description for lines and bytes
|
||||
set shortmess-=l
|
||||
|
||||
" Show search count
|
||||
set shortmess-=S
|
||||
" Windows paths
|
||||
set packpath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
|
||||
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
|
||||
|
||||
" Color scheme
|
||||
syntax enable
|
||||
|
||||
if has("gui_running")
|
||||
colorscheme retrobox
|
||||
highlight NonText ctermfg=14 guifg=#7c6f64
|
||||
else
|
||||
colorscheme custom
|
||||
highlight LineNr ctermfg=244
|
||||
highlight IncSearch ctermfg=251 ctermbg=238
|
||||
highlight Search ctermfg=251 ctermbg=238
|
||||
highlight Visual ctermfg=240 ctermbg=250
|
||||
endif
|
||||
|
||||
highlight SpecialKey ctermfg=8 guifg=#584f46
|
||||
|
||||
" Windows GUI
|
||||
if has("win32") && has("gui_running")
|
||||
autocmd GUIEnter * simalt ~x " Maximize window
|
||||
autocmd GUIEnter * set visualbell t_vb= " Disable bell sound
|
||||
|
||||
set listchars+=tab:▶\
|
||||
set renderoptions=type:directx " Fix unicode rendering
|
||||
set showbreak=→\
|
||||
endif
|
||||
|
||||
" Fix Alt mappings (https://github.com/vim/vim/issues/2588#issuecomment-697959290)
|
||||
for ord in range(65, 90) + range(97, 122)
|
||||
let char = nr2char(ord)
|
||||
exec printf("set <m-%s>=\<esc>%s", char, char)
|
||||
exec printf("tnoremap <silent> <m-%s> <esc>%s", char, char)
|
||||
endfor
|
||||
|
||||
" Navigate editor tabs
|
||||
noremap <M-h> gT
|
||||
noremap <M-l> gt
|
||||
|
||||
" Map top row on Czech keyboard layout to digits
|
||||
map + 1
|
||||
@@ -54,12 +92,21 @@ map í 9
|
||||
map é 0
|
||||
|
||||
" Move some commands closer on Czech keyboard layout
|
||||
map ů %
|
||||
nnoremap ú @@
|
||||
noremap ů ;
|
||||
map § %
|
||||
noremap , +
|
||||
|
||||
noremap § `
|
||||
noremap §§ ``
|
||||
nnoremap m§ m
|
||||
|
||||
sunmap ů
|
||||
sunmap §
|
||||
|
||||
" Camel humps (https://github.com/vim-scripts/camelcasemotion)
|
||||
" Enter visual block mode
|
||||
noremap <M-v> <C-v>
|
||||
|
||||
" Navigate camel humps (https://github.com/vim-scripts/camelcasemotion)
|
||||
map L <Plug>CamelCaseMotion_w
|
||||
map H <Plug>CamelCaseMotion_b
|
||||
sunmap L
|
||||
@@ -71,8 +118,8 @@ omap iH <Plug>CamelCaseMotion_ib
|
||||
xmap iH <Plug>CamelCaseMotion_ib
|
||||
|
||||
" Navigate to end of previous word
|
||||
noremap <A-b> ge
|
||||
noremap <A-S-b> gE
|
||||
noremap <M-b> ge
|
||||
noremap <M-S-b> gE
|
||||
|
||||
" Navigate soft-wrapped lines
|
||||
nnoremap <expr> j v:count ? 'j' : 'gj'
|
||||
@@ -80,20 +127,35 @@ xnoremap <expr> j v:count ? 'j' : 'gj'
|
||||
nnoremap <expr> k v:count ? 'k' : 'gk'
|
||||
xnoremap <expr> k v:count ? 'k' : 'gk'
|
||||
|
||||
nnoremap gj j
|
||||
xnoremap gj j
|
||||
nnoremap gk k
|
||||
xnoremap gk k
|
||||
|
||||
" Navigate unmatched parentheses/braces
|
||||
noremap g( [(
|
||||
noremap g) ])
|
||||
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
|
||||
nnoremap d( c[((<Esc>l
|
||||
|
||||
" Delete lines
|
||||
" Create lines
|
||||
nnoremap go o<Esc>$
|
||||
nnoremap gO O<Esc>$
|
||||
nnoremap g<CR> i<CR><Esc>l
|
||||
|
||||
" Edit current line
|
||||
nnoremap C cc
|
||||
xnoremap C cc
|
||||
nnoremap D dd
|
||||
xnoremap D dd
|
||||
|
||||
" Enter visual block mode
|
||||
xnoremap v <C-V>
|
||||
nnoremap < <<
|
||||
nnoremap > >>
|
||||
|
||||
" Indent keeping selection
|
||||
xnoremap < <gv
|
||||
@@ -110,6 +172,71 @@ nnoremap gp `[v`]
|
||||
xnoremap p P
|
||||
xnoremap P p
|
||||
|
||||
" Clear search highlights
|
||||
nnoremap <Esc> :nohlsearch<Return><Esc>
|
||||
|
||||
" Use Ctrl for selection and clipboard
|
||||
nnoremap <C-a> ggVG
|
||||
xnoremap <C-a> ggoG
|
||||
|
||||
xnoremap <C-c> "+y
|
||||
xnoremap <C-x> "+x
|
||||
|
||||
noremap <C-v> "+gP
|
||||
inoremap <C-v> <C-o>:set paste<CR><C-r>+<C-o>:set nopaste<CR>
|
||||
cnoremap <C-v> <C-r>+
|
||||
|
||||
nnoremap <C-s> :w<CR>
|
||||
xnoremap <C-s> :<C-U>w<CR>gv
|
||||
inoremap <C-s> <C-o>:w<CR>
|
||||
|
||||
" Update search register when using f/t
|
||||
function FindChar(action, reverse, search_affix)
|
||||
let t:reverse_search = a:reverse
|
||||
let char = nr2char(getchar())
|
||||
|
||||
if char == '\'
|
||||
let query = '\\'
|
||||
else
|
||||
let query = '\C\V'.char.'\v'
|
||||
endif
|
||||
|
||||
if a:reverse
|
||||
call setreg('/', query.a:search_affix)
|
||||
else
|
||||
call setreg('/', a:search_affix.query)
|
||||
endif
|
||||
|
||||
nohlsearch
|
||||
execute 'normal! '.a:action.char
|
||||
endfunction
|
||||
|
||||
function FindCharVisual(action, reverse, search_affix)
|
||||
normal gv
|
||||
call FindChar(a:action, a:reverse, a:search_affix)
|
||||
endfunction
|
||||
|
||||
function! ResetReverseSearchFlag()
|
||||
if getcmdtype() =~ "[/?]"
|
||||
let t:reverse_search = 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
nmap f :call FindChar('f', 0, '')<CR>
|
||||
nmap F :call FindChar('F', 1, '')<CR>
|
||||
nmap t :call FindChar('t', 0, '\zs.\ze')<CR>
|
||||
nmap T :call FindChar('T', 1, '\zs.\ze')<CR>
|
||||
|
||||
xmap f :call FindCharVisual('f', 0, '')<CR>
|
||||
xmap F :call FindCharVisual('F', 1, '')<CR>
|
||||
xmap t :call FindCharVisual('t', 0, '\zs.\ze')<CR>
|
||||
xmap T :call FindCharVisual('T', 1, '\zs.\ze')<CR>
|
||||
|
||||
noremap <expr> n 'nN'[t:reverse_search]
|
||||
noremap <expr> N 'Nn'[t:reverse_search]
|
||||
|
||||
cnoremap <CR> <cmd>call ResetReverseSearchFlag()<CR><CR>
|
||||
|
||||
" Plugin: https://github.com/easymotion/vim-easymotion.git
|
||||
nmap <Space> <Plug>(easymotion-overwin-f)
|
||||
xmap <Space> <Plug>(easymotion-s)
|
||||
@@ -120,4 +247,3 @@ let g:highlightedyank_highlight_duration = 500
|
||||
|
||||
" Plugin: https://github.com/luochen1990/rainbow
|
||||
let g:rainbow_active = 1
|
||||
|
||||
|
@@ -57,6 +57,10 @@
|
||||
|
||||
/* Tabs & toolbars */
|
||||
|
||||
#navigator-toolbox {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
#toolbar-menubar {
|
||||
min-height: 21px !important;
|
||||
}
|
||||
@@ -104,18 +108,28 @@
|
||||
padding: 0 1px !important;
|
||||
}
|
||||
|
||||
/* Tab playback icons */
|
||||
|
||||
.tabbrowser-tab:not([pinned]) .tab-icon-stack:is([muted], [soundplaying], [activemedia-blocked]) {
|
||||
grid-template-areas: "a s";
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([pinned]) .tab-icon-overlay:is([muted], [soundplaying], [activemedia-blocked]) {
|
||||
grid-area: a !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([pinned]) .tab-icon-stack[indicator-replaces-favicon] > :not(&) {
|
||||
opacity: 1 !important;
|
||||
grid-area: s;
|
||||
}
|
||||
|
||||
/* Address bar */
|
||||
|
||||
#urlbar-container {
|
||||
--urlbar-container-height: 34px !important;
|
||||
margin-top: -2px !important;
|
||||
margin-inline: 3px !important;
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
margin: 1px 0 !important;
|
||||
}
|
||||
|
||||
#urlbar .urlbarView-row-inner {
|
||||
padding-block: 4px !important;
|
||||
}
|
||||
@@ -140,7 +154,6 @@
|
||||
padding: 0 !important;
|
||||
-moz-padding-start: 0 !important;
|
||||
-moz-padding-end: 0 !important;
|
||||
border-top: 1px solid var(--chrome-content-separator-color) !important;
|
||||
background-color: #0E0E0E !important;
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@
|
||||
- { name: "highlighted-yank" , repo: "https://github.com/machakann/vim-highlightedyank.git" }
|
||||
- { name: "indent-object" , repo: "https://github.com/michaeljsmith/vim-indent-object.git" }
|
||||
- { name: "lightline" , repo: "https://github.com/itchyny/lightline.vim.git" }
|
||||
- { name: "paragraph-motion" , repo: "https://github.com/dbakker/vim-paragraph-motion.git" }
|
||||
- { name: "rainbow" , repo: "https://github.com/luochen1990/rainbow.git" }
|
||||
- { name: "repeat" , repo: "https://github.com/tpope/vim-repeat.git" }
|
||||
- { name: "sleuth" , repo: "https://github.com/tpope/vim-sleuth.git" }
|
||||
|
Reference in New Issue
Block a user