Compare commits

..
1 Commits
Author SHA1 Message Date
chylex 12d678a073 Update Firefox CSS 2023-05-13 00:37:37 +02:00
6 changed files with 213 additions and 557 deletions
+7 -38
View File
@@ -1,20 +1,12 @@
if [[ $- = *i* ]]; then bind "set completion-ignore-case on"
bind "set completion-ignore-case on" bind "set show-all-if-ambiguous on"
bind "set show-all-if-ambiguous on"
bind '"\e[A": history-search-backward' bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward' bind '"\e[B": history-search-forward'
fi
shopt -s histappend
HISTCONTROL=ignoreboth
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
alias gh='history|grep'
alias less='less -R --mouse'
alias zless='zless -R --mouse'
alias lsa='ls -l -v --all --human-readable --group-directories-first --color=auto' alias lsa='ls -l -v --all --human-readable --group-directories-first --color=auto'
alias vim='vim -p' alias gh='history|grep'
alias mc='mc -x'
alias d='docker' alias d='docker'
alias dc='docker compose' alias dc='docker compose'
@@ -35,30 +27,7 @@ function dtopall() { for c in $(docker ps -q); do docker inspect $c -f "{{ .Name
function dsubnets() { docker network inspect $(docker network ls | awk '$3 == "bridge" { print $1 }') | jq -r '.[] | .Name + " " + .IPAM.Config[0].Subnet' -; } function dsubnets() { docker network inspect $(docker network ls | awk '$3 == "bridge" { print $1 }') | jq -r '.[] | .Name + " " + .IPAM.Config[0].Subnet' -; }
function dmemlimit() { docker stats --no-stream --format "{{.MemUsage}}" | awk '{print $3}' | sort | sed 's/.$//' | numfmt --from=iec-i | awk '{s+=$1} END {printf "%.0f\n", s}' | numfmt --to=iec --format="%.3f"; } function dmemlimit() { docker stats --no-stream --format "{{.MemUsage}}" | awk '{print $3}' | sort | sed 's/.$//' | numfmt --from=iec-i | awk '{s+=$1} END {printf "%.0f\n", s}' | numfmt --to=iec --format="%.3f"; }
function ssh() { function borgsize() { printf 'Archive\t\t\tOrig\tComp\tDedup\n'; printf '%-16.16s\t%s\t%s\t%s\n' $(borg info --json --sort-by name --glob-archives '*' "$1" | jq '.archives[] | "\(.name) \(.stats.original_size) \(.stats.compressed_size) \(.stats.deduplicated_size)"' | sed --expression='s/^"//;s/"$//' | numfmt --field='2-4' --to=iec); }
if [ -n "${TMUX_PANE}" ]; then
tmux rename-window -t"${TMUX_PANE}" "$*"
command ssh "$@"
tmux set-window-option automatic-rename "on"
vim +q # Fix terminal
else
command ssh "$@"
fi
}
function borgsize() {
printf 'Archive\t\t\tOrig\tComp\tDedup\n'
printf '%-16.16s\t%s\t%s\t%s\n' $(borg info --json --sort-by name --glob-archives '*' "$1" | jq '.archives[] | "\(.name) \(.stats.original_size) \(.stats.compressed_size) \(.stats.deduplicated_size)"' | sed --expression='s/^"//;s/"$//' | numfmt --field='2-4' --to=iec)
}
function convflac() {(
set -e
for f in *."$1"; do
n="${f%.*}"
ffmpeg -i "$n.$1" -compression_level 12 "$n.flac"
exiftool -TagsFromFile "$n.$1" "-all:all>all:all" "$n.flac"
done
)}
export EDITOR=vim export EDITOR=vim
+162 -292
View File
@@ -1,109 +1,30 @@
set clipboard-=ideaput set idearefactormode=visual
set hlsearch
set ignorecase set ignorecase
set incsearch set incsearch
set noerrorbells
set number set number
set nrformats-=octal
set relativenumber set relativenumber
set scrolloff=999 set scrolloff=12
set showcmd set showcmd
set showmode set showmode
set sidescrolloff=999 set sidescrolloff=48
set smartcase set smartcase
set virtualedit=onemore set virtualedit=onemore
set visualbell set visualbell
" Use WSL bash as shell set acejump
if has('win32') set argtextobj
set shell=bash.exe set exchange
set shellcmdflag=-lic set highlightedyank
set shellxquote=
endif
" Configure IDEA settings (https://github.com/JetBrains/ideavim/wiki/set-commands)
set ideajoin set ideajoin
set idearefactormode=visual set matchit
set multiple-cursors
set ReplaceWithRegister
set surround
set textobj-entire
set textobj-indent
" Configure IDE keybindings (https://github.com/JetBrains/ideavim/wiki/sethandler) " http://vimdoc.sourceforge.net/htmldoc/vimindex.html
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-h> 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-w> a:ide
sethandler <C-x> a:ide
sethandler <C-y> a:ide
sethandler <C-\> a:ide
sethandler <A-b> a:vim
sethandler <A-e> a:vim
sethandler <A-h> a:vim
sethandler <A-j> a:vim
sethandler <A-k> a:vim
sethandler <A-l> a:vim
sethandler <A-m> 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-e> 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-m> a:vim
sethandler <A-S-o> a:vim
sethandler <A-v> a:vim
sethandler <A-x> a:vim
sethandler <C-A-S-d> a:vim
sethandler <C-A-S-s> 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-S-w> a:vim
sethandler <C-u> a:vim
sethandler <D-S-d> a:vim
sethandler <D-S-s> a:vim
sethandler <S-BS> a:vim
sethandler <C-Enter> a:vim
sethandler <D-Enter> a:vim
sethandler <C-Left> a:vim
sethandler <S-Left> a:vim
sethandler <C-Right> 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 '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'
" 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
@@ -118,235 +39,184 @@ map í 9
map é 0 map é 0
" Move some commands closer on Czech keyboard layout " Move some commands closer on Czech keyboard layout
map ů %
nnoremap ú @@ nnoremap ú @@
noremap , + noremap ů ;
map § %
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
nnoremap L [w
nnoremap H [b
" Navigate to end of previous word " Navigate to end of previous word
noremap <A-e> ge nnoremap <A-b> ge
noremap <A-S-e> gE nnoremap <A-S-b> gE
" Navigate unmatched parentheses/braces " Navigate to indents
noremap g( [( nnoremap J +
noremap g) ]) vnoremap J +
noremap g{ [{ nnoremap K -
noremap g} ]} vnoremap K -
" 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 " Edit from cursor to start/end of parenthesized block
nnoremap c) c]) nnoremap c) c])
nnoremap d) d]) nnoremap d) d])
nnoremap c( c[(( nnoremap c( c[((
nnoremap d( c[((<Esc>l nnoremap d( c[((<ESC>l
" Create lines " Delete lines
nnoremap go o<Esc>$
nnoremap gO O<Esc>$
nnoremap g<CR> i<CR><Left><Esc>
" Edit current line
nnoremap C cc nnoremap C cc
xnoremap C cc
nnoremap D dd nnoremap D dd
xnoremap D dd vnoremap C cc
nnoremap < << vnoremap D dd
nnoremap > >>
" Alternative way to enter visual block mode
nnoremap <Space>v <C-V>
" Indent keeping selection " Indent keeping selection
xnoremap < <gv vnoremap < <gv
xnoremap > >gv vnoremap > >gv
xnoremap = =gv vnoremap = =gv
" Extend selection
map <A-m> <Action>(EditorSelectWord)
map <A-S-m> <Action>(EditorUnSelectWord)
" 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
" Reselect pasted text " Reselect pasted text
nnoremap gp `[v`] nnoremap gp `[v`]
" Put without yank " Put without yank
xnoremap p P xmap p gr
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)
" Navigate back/forward
map <BS> <Action>(Back)
map <S-BS> <Action>(Forward)
" Navigate inspection highlights
map ( <Action>(GotoPreviousError)
map ) <Action>(GotoNextError)
map <C-A-S-s> <Action>(KM.GotoPreviousErrorInOtherMode)
map <D-S-s> <Action>(KM.GotoPreviousErrorInOtherMode)
map <C-A-S-d> <Action>(KM.GotoNextErrorInOtherMode)
map <D-S-d> <Action>(KM.GotoNextErrorInOtherMode)
" Navigate to previous/next method
map [ <Action>(MethodUp)
map ] <Action>(MethodDown)
" 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)'
xmap gl <Action>(EditorAddCaretPerSelectedLine)
" Manage editor tabs
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)
map <C-w>p <Action>(PinActiveEditorTab)
noremap <C-w>S <C-w>s
noremap <C-w>V <C-w>v
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
noremap g] ]
noremap g[ [
" Rebind commands that will be repurposed
nnoremap GG G
nnoremap dG dG
nnoremap cG cG
nnoremap M m nnoremap M m
nnoremap Z z nnoremap Z z
map <A-S-n> <A-p>
" Repurpose 'Enter' for statement completion ('isactionenabled' requires a custom version of IdeaVIM) " Repurpose 'Enter' for statement completion (renaming function requires a custom version of IdeaVIM)
nmap <Enter> <Action>(EditorCompleteStatement) function! CompleteStatement()
if (renaming())
" TODO https://github.com/JetBrains/ideavim/discussions/397#discussioncomment-1573048
" return "\<Enter>"
return "<Enter>"
else
action EditorCompleteStatement
return ""
endif
endfunction
imap <expr> <C-Enter> isactionenabled('Console.Jdbc.Execute')? '<Action>(Console.Jdbc.Execute)' : '<Action>(EditorCompleteStatement)' nmap <expr> <Enter> CompleteStatement()
imap <expr> <D-Enter> isactionenabled('Console.Jdbc.Execute')? '<Action>(Console.Jdbc.Execute)' : '<Action>(EditorCompleteStatement)'
nmap <C-Enter> <Action>(Console.Jdbc.Execute) " Repurpose special characters for navigation
nmap <D-Enter> <Action>(Console.Jdbc.Execute) nmap ( :raction GotoPreviousError<CR>
vmap <C-Enter> <Action>(Console.Jdbc.Execute) nmap ) :raction GotoNextError<CR>
vmap <D-Enter> <Action>(Console.Jdbc.Execute) nmap [ :raction MethodUp<CR>
nmap ] :raction MethodDown<CR>
nmap { :raction JumpToLastChange<CR>
nmap } :raction JumpToNextChange<CR>
" Repurpose 'g' for navigation (VimJumpToSource requires a custom version of IdeaVIM) " Repurpose 'g' for navigation (:raction requires a custom version of IdeaVIM)
map gb <Action>(GotoNextBookmark) nmap gb :raction GotoNextBookmark<CR>
map gB <Action>(GotoPreviousBookmark) nmap gB :raction GotoPreviousBookmark<CR>
map gD <Action>(GotoTypeDeclaration) nmap gd :action GotoDeclaration<CR>
map ge <Action>(VcsShowNextChangeMarker) nmap gD :action GotoTypeDeclaration<CR>
map gE <Action>(VcsShowPrevChangeMarker) nmap ge :raction VcsShowNextChangeMarker<CR>
map gf <Action>(VimJumpToSource)<Action>(HideActiveWindow) nmap gE :raction VcsShowPrevChangeMarker<CR>
map gi <Action>(GotoImplementation) map gi :action GotoImplementation<CR>
map gr <Action>(RecentLocations) map gj :raction EditorCloneCaretBelow<CR>
map gR <Action>(RecentChangedFiles) map gk :raction EditorCloneCaretAbove<CR>
map gs <Action>(GotoSuperMethod) nmap go :raction GotoNextElementUnderCaretUsage<CR>
map gS <Action>(ShowSiblings) nmap gO :raction GotoPrevElementUnderCaretUsage<CR>
map gt gg<Action>(KM.GotoNextTypeInFile) nmap gr :action RecentLocations<CR>
map gT <Action>(KM.GotoNextTypeInFile) nmap gR :action RecentChangedFiles<CR>
map gu <Action>(ShowUsages) map gs :action GotoSuperMethod<CR>
map gU <Action>(FindUsages) 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>
map gZ :action PrevSplitter<CR>
" Repurpose 'z' for view actions and debugger " Make bidirectional 'g' commands work with 'G' too
map za <Action>(Annotate) nmap Gb gb
map zb <Action>(ViewBreakpoints) nmap GB gB
map zc <Action>(EditorContextInfo) nmap Ge ge
map zd <Action>(CompareClipboardWithSelection) nmap GE gE
map ze <Action>(ShowErrorDescription) map Gj gj
map zf <Action>(SelectInProjectView) map Gk gk
map zi <Action>(ShowHoverInfo) nmap Go go
map zm <Action>(ShowBookmarks) nmap GO gO
map zp <Action>(QuickImplementations) nmap Gt gt
map zP <Action>(QuickTypeDefinition) nmap GT gT
map zr <Action>(RunToCursor) map Gz gz
map zR <Action>(ForceRunToCursor) map GZ gZ
map zs <Action>(osmedile.intellij.stringmanip.PopupChoiceAction)
map zt <Action>(ExpressionTypeInfo)
map zx <Action>(EvaluateExpression)
map zht <Action>(TypeHierarchy) " Repurpose 'z' for view actions, debugger, and tab management
map zhm <Action>(MethodHierarchy) map za :action Annotate<CR>
map zb :action ViewBreakpoints<CR>
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 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>
if &ide =~? 'rider' " Repurpose 'm' for refactoring (normal mode)
map zhc <Action>(RiderShowIncomingCalls) nmap mg :action Generate<CR>
else nmap mi :action Inline<CR>
map zhc <Action>(CallHierarchy) nmap mn :action RenameElement<CR>
endif nmap mo :action OverrideMethods<CR>
nmap ms :action ChangeSignature<CR>
nmap mS :action NewScratchFile<CR>
nmap zhl <Action>(LocalHistory.ShowHistory) " Repurpose 'm' for refactoring (normal / visual mode)
xmap zhl <Action>(LocalHistory.ShowSelectionHistory) nmap mc :action IntroduceConstant<CR>
nmap zhg <Action>(Vcs.ShowTabbedFileHistory) vmap mc :action IntroduceConstant<CR>
xmap zhg <Action>(Vcs.ShowHistoryForBlock) nmap mf :action IntroduceField<CR>
vmap mf :action IntroduceField<CR>
" Repurpose 'm' for refactoring nmap mm :action ExtractMethod<CR>
map mc <Action>(IntroduceConstant) vmap mm :action ExtractMethod<CR>
map md <Action>(SafeDelete) nmap mM :action ExtractFunction<CR>
map me <Action>(Move) vmap mM :action ExtractFunction<CR>
map mf <Action>(IntroduceField) nmap mp :action IntroduceParameter<CR>
map mg <Action>(Generate) vmap mp :action IntroduceParameter<CR>
map mi <Action>(Inline) nmap mP :action IntroduceProperty<CR>
map mm <Action>(ExtractMethod) vmap mP :action IntroduceProperty<CR>
map mM <Action>(ExtractFunction) nmap mr :action Refactorings.QuickListPopupAction<CR>
map mn <Action>(RenameElement) vmap mr :action Refactorings.QuickListPopupAction<CR>
map mo <Action>(OverrideMethods) nmap mv :action IntroduceVariable<CR>
map mp <Action>(IntroduceParameter) vmap mv :action IntroduceVariable<CR>
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 " Actions for custom version of AceJump
set acejump map <Space> <Plug>(acejump)
map <Space> <Action>(AceVimAction_JumpAllEditors) map <Space>d :action AceVimAction_GoToDeclaration<CR>
map g<Space> <Action>(AceVimAction_JumpAllEditors_GoToDeclaration) map <Space>D :action AceVimAction_GoToTypeDeclaration<CR>
map <Space>i :action AceVimAction_ShowIntentions<CR>
map <Space>u :action AceVimAction_ShowUsages<CR>
map <Space>U :action AceVimAction_FindUsages<CR>
map <Space>r :action AceVimAction_Refactor<CR>
map <Space>n :action AceVimAction_Rename<CR>
+1 -6
View File
@@ -1,15 +1,10 @@
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
set -g escape-time 0
set -g history-limit 50000 set -g history-limit 50000
set -g mouse on set -g mouse on
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection bind -Tcopy-mode MouseDragEnd1Pane send -X copy-selection-no-clear
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
bind '"' split-window -c "#{pane_current_path}" bind '"' split-window -c "#{pane_current_path}"
bind % split-window -hc "#{pane_current_path}" bind % split-window -hc "#{pane_current_path}"
+33 -190
View File
@@ -1,89 +1,35 @@
set autoindent set autoindent
set backspace=indent,eol,start
set completeopt=menuone,preview
set encoding=utf-8 set encoding=utf-8
set guifont=Cascadia_Mono:h12:cANSI:qDRAFT
set guioptions-=t " Remove menu tearoff
set history=1024 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 list
set listchars=lead,trail,tab:→\ ,extends:>,precedes:<
set modeline
set modelines=2
set mouse=a set mouse=a
set noerrorbells set noerrorbells
set nojoinspaces
set noshowcmd set noshowcmd
set noshowmode set noshowmode
set nrformats-=octal
set number set number
set relativenumber set relativenumber
set scrolloff=999 set scrolloff=12
set shiftwidth=0 set shiftwidth=0
set shortmess-=S " Show search count
set shortmess-=l " Show full description for lines and bytes
set showbreak=↪\
set showmatch set showmatch
set sidescrolloff=999 set sidescrolloff=48
set smartcase set smartcase
set tabstop=4 set tabstop=4
set ttimeout
set ttimeoutlen=50
set ttymouse=xterm2
set virtualedit=onemore
set wildmenu set wildmenu
set winaltkeys=no
set wrap set wrap
if has("patch-9.1.0463") " Color support
set completeopt+=fuzzy set t_Co=256
endif
" Windows paths
set packpath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
" Color scheme " Color scheme
syntax enable syntax enable
colorscheme custom
if has("gui_running") highlight LineNr ctermfg=244
colorscheme retrobox highlight IncSearch ctermfg=251 ctermbg=238
highlight NonText ctermfg=14 guifg=#7c6f64 highlight Search ctermfg=251 ctermbg=238
else highlight Visual ctermfg=240 ctermbg=250
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 top row on Czech keyboard layout to digits
map + 1 map + 1
@@ -98,75 +44,49 @@ map í 9
map é 0 map é 0
" Move some commands closer on Czech keyboard layout " Move some commands closer on Czech keyboard layout
map ů %
nnoremap ú @@ nnoremap ú @@
noremap , + noremap ů ;
map § %
noremap § ` " Navigate to end of previous word
noremap §§ `` nnoremap <A-b> ge
nnoremap m§ m nnoremap <A-S-b> gE
sunmap ů " Navigate to indents
sunmap § nnoremap J +
vnoremap J +
" Enter visual block mode nnoremap K -
noremap <M-v> <C-v> 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
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 <M-e> ge
noremap <M-S-e> 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'
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 " Edit from cursor to start/end of parenthesized block
nnoremap c) c]) nnoremap c) c])
nnoremap d) d]) nnoremap d) d])
nnoremap c( c[(( nnoremap c( c[((
nnoremap d( c[((<Esc>l nnoremap d( c[((<ESC>l
" Create lines " Delete lines
nnoremap go o<Esc>$
nnoremap gO O<Esc>$
nnoremap g<CR> i<CR><Esc>l
" Edit current line
nnoremap C cc nnoremap C cc
xnoremap C cc
nnoremap D dd nnoremap D dd
xnoremap D dd vnoremap C cc
nnoremap < << vnoremap D dd
nnoremap > >>
" Alternative way to enter visual block mode
nnoremap <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>
@@ -175,91 +95,14 @@ 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
" Clear search highlights
nnoremap <Esc> :nohlsearch<Return><Esc>
" Prevent deleting whitespace on empty lines when exiting Normal mode
inoremap <silent> <Esc> <C-O>:stopinsert<CR>
" Completion
inoremap <C-Space> <C-n>
inoremap <expr> j pumvisible() ? '<C-n>' : 'j'
inoremap <expr> k pumvisible() ? '<C-p>' : 'k'
inoremap <expr> <Esc> pumvisible() ? '<C-e>' : '<Esc>'
inoremap <expr> <Enter> pumvisible() ? '<C-y>' : '<Enter>'
" 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 " 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
" Plugin: https://github.com/luochen1990/rainbow " Plugin: https://github.com/luochen1990/rainbow
let g:rainbow_active = 1 let g:rainbow_active = 1
+9 -23
View File
@@ -16,7 +16,7 @@
/* Reload/stop buttons */ /* Reload/stop buttons */
#reload-button, #stop-button { #reload-button, #stop-button {
display: flex !important; display: -moz-box !important;
} }
#stop-reload-button .toolbarbutton-icon { #stop-reload-button .toolbarbutton-icon {
@@ -57,10 +57,6 @@
/* Tabs & toolbars */ /* Tabs & toolbars */
#navigator-toolbox {
border-bottom: none !important;
}
#toolbar-menubar { #toolbar-menubar {
min-height: 21px !important; min-height: 21px !important;
} }
@@ -108,33 +104,23 @@
padding: 0 1px !important; 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 */ /* Address bar */
#urlbar-container { #urlbar-container {
--urlbar-container-height: 34px !important; --urlbar-container-height: 34px !important;
margin-top: -2px !important;
margin-inline: 3px !important; margin-inline: 3px !important;
} }
#urlbar {
margin: 1px 0 !important;
}
#urlbar .urlbarView-row-inner { #urlbar .urlbarView-row-inner {
padding-block: 4px !important; padding-block: 4px !important;
} }
#urlbar .search-one-offs:not([hidden]) { #urlbar .search-one-offs:not([hidden]){
padding-block: 4px !important; padding-block: 4px !important;
} }
@@ -154,6 +140,7 @@
padding: 0 !important; padding: 0 !important;
-moz-padding-start: 0 !important; -moz-padding-start: 0 !important;
-moz-padding-end: 0 !important; -moz-padding-end: 0 !important;
border-top: 1px solid var(--chrome-content-separator-color) !important;
background-color: #0E0E0E !important; background-color: #0E0E0E !important;
z-index: 1000 !important; z-index: 1000 !important;
} }
@@ -168,8 +155,7 @@
#PersonalToolbar .toolbarbutton-1 { #PersonalToolbar .toolbarbutton-1 {
margin: 0 !important; margin: 0 !important;
padding: 3px 0 !important; padding: 3px 4px !important;
--toolbarbutton-inner-padding: 6px !important;
} }
#PersonalToolbar .toolbarbutton-icon { #PersonalToolbar .toolbarbutton-icon {
+1 -8
View File
@@ -12,19 +12,12 @@
- { name: "highlighted-yank" , repo: "https://github.com/machakann/vim-highlightedyank.git" } - { name: "highlighted-yank" , repo: "https://github.com/machakann/vim-highlightedyank.git" }
- { name: "indent-object" , repo: "https://github.com/michaeljsmith/vim-indent-object.git" } - { name: "indent-object" , repo: "https://github.com/michaeljsmith/vim-indent-object.git" }
- { name: "lightline" , repo: "https://github.com/itchyny/lightline.vim.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: "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"