Compare commits

..
5 Commits
Author SHA1 Message Date
Fabian IsingandClaude Opus 5.5 61ff4a8daa [ZSH] Remove duplicate plugins
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:57:15 +02:00
Fabian Ising a7a06cd75e [NVIM] Rework folding 2026-10-14 08:56:56 +02:00
Fabian Ising bf77e1486b [NVIM] Make update checker portable 2026-10-14 08:56:56 +02:00
Fabian Ising ee189b408b Fix comment handling in tex files 2026-10-14 08:56:56 +02:00
Fabian Ising c7569e48dc Fix delzip 2026-10-14 08:56:55 +02:00
5 changed files with 83 additions and 13 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
set formatoptions+=1rnmBa
setlocal formatoptions+=1rnmBj
" Reformat lines (getting the spacing correct) {{{
fun! TeX_fmt()
+13 -6
View File
@@ -96,7 +96,14 @@ local function check_plugin_updates()
local concurrency = 2
local function git_command(args)
local command = { 'ionice', '-c', '3', 'nice', '-n', '10', 'git' }
local command = {}
if vim.fn.executable('ionice') == 1 then
vim.list_extend(command, { 'ionice', '-c', '3' })
end
if vim.fn.executable('nice') == 1 then
vim.list_extend(command, { 'nice', '-n', '10' })
end
table.insert(command, 'git')
vim.list_extend(command, args)
return command
end
@@ -371,16 +378,16 @@ let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets
" Folding
set foldmethod=syntax
set foldmethod=indent
set foldlevel=100
" Use F9 to toggle folding
" Use F9 or <Leader>z to toggle folding
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
nnoremap <Leader>a za
onoremap <Leader>a <C-C>za
vnoremap <Leader>a zf
nnoremap <Leader>z za
onoremap <Leader>z <C-C>za
vnoremap <Leader>z zf
try
source ~/.config/nvim/.vimrc_config_expand_region
-2
View File
@@ -7,14 +7,12 @@ ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/command-not-found
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
-2
View File
@@ -6,14 +6,12 @@ ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/command-not-found
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
urbainvaes/fzf-marks
+69 -2
View File
@@ -21,10 +21,77 @@ alias ls='ls --color=always'
alias cgrep='grep --color=always'
alias cdiff='git diff --color-words --no-index'
# Remove the files an archive extracted into the current directory.
# Lists what it will delete and asks first; -f skips the prompt, -n dry-runs.
# Directories are only removed if they end up empty.
delzip() {
unzip -Z -1 "$@" | xargs -I{} rm -rf {}
emulate -L zsh
setopt local_options
local dry=0 force=0
while [[ $1 == -[nf] ]]; do
[[ $1 == -n ]] && dry=1 || force=1
shift
done
(( $# )) || { print -ru2 "usage: delzip [-n|-f] <archive.zip>..."; return 2 }
local zip entry parent
local -a entries files dirs
for zip in "$@"; do
[[ -f $zip ]] || { print -ru2 "delzip: no such file: $zip"; return 1 }
entries=("${(f)$(unzip -Z -1 -- $zip)}") || return 1
for entry in $entries; do
[[ -n $entry ]] || continue
# zip-slip guard: never touch anything outside the cwd
if [[ $entry == (/|~)* || $entry == (|*/)..(|/*) ]]; then
print -ru2 "delzip: refusing unsafe path: $entry"
return 1
fi
[[ $entry == */ ]] && dirs+=(${entry%/}) || files+=($entry)
# many archives omit directory entries, so infer them from the
# paths as well; unzip creates those dirs regardless
parent=${entry%/}
while [[ $parent == */* ]]; do
parent=${parent%/*}
dirs+=($parent)
done
done
done
dirs=(${(u)dirs})
# only keep what is actually on disk, so the list reflects reality;
# -L catches broken symlinks, which -e alone misses
local -a present
present=(); for entry in $files; do [[ -e $entry || -L $entry ]] && present+=($entry); done
files=($present)
present=(); for entry in $dirs; do [[ -d $entry ]] && present+=($entry); done
dirs=($present)
(( $#files + $#dirs )) || { print -ru2 "delzip: nothing to remove here (already gone?)"; return 1 }
if (( dry )); then
print -rl -- ${files} ${(O)dirs}
return 0
fi
if (( ! force )); then
[[ -t 0 ]] || { print -ru2 "delzip: not a terminal, use -f to skip the prompt"; return 1 }
print -r -- "delzip: remove ${#files} file(s) under ${PWD}:"
print -rl -- " "${^files[1,20]}
(( $#files > 20 )) && print -r -- " ... and $(( $#files - 20 )) more"
(( $#dirs )) && print -r -- "plus ${#dirs} directory/ies, if they end up empty."
read -q "?Proceed? [y/N] " || { print -r -- $'\naborted'; return 1 }
print
fi
(( $#files )) && rm -f -- $files
# deepest first, so parents can empty out; rmdir refuses non-empty dirs
for entry in ${(O)dirs}; do
[[ -d $entry ]] && rmdir -- $entry 2>/dev/null
done
return 0
}
export MITMPROXY_SSLKEYLOGFILE='~/.mitmproxy/sslkeylogfile.txt'
export MITMPROXY_SSLKEYLOGFILE="$HOME/.mitmproxy/sslkeylogfile.txt"
unset ZSH_AUTOSUGGEST_USE_ASYNC
export LANG='en_US.UTF-8'