mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-26 21:10:31 +01:00
Compare commits
17 Commits
33f24fe6de
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c5ecd6c98d | |||
| a939dfe553 | |||
| 47436ddc59 | |||
| 4bd7364423 | |||
| 7b2830d0f9 | |||
| 94a179c162 | |||
| 9b03c61bf2 | |||
| 97e6e79755 | |||
| 515f854701 | |||
| c71460b481 | |||
| 804d6dab3c | |||
| 44cf9ba4b7 | |||
| 671fa71ae3 | |||
| d43495f5e8 | |||
| 00f39b4fad | |||
| 5dbac71442 | |||
| 4829a72892 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -61,3 +61,6 @@
|
|||||||
[submodule "zsh/.config/zsh/plugins/zsh-auto-notify"]
|
[submodule "zsh/.config/zsh/plugins/zsh-auto-notify"]
|
||||||
path = zsh/.config/zsh/plugins/zsh-auto-notify
|
path = zsh/.config/zsh/plugins/zsh-auto-notify
|
||||||
url = https://github.com/MichaelAquilina/zsh-auto-notify.git
|
url = https://github.com/MichaelAquilina/zsh-auto-notify.git
|
||||||
|
[submodule "vim/.vim/pack/bundle/start/vim-pkgbuild"]
|
||||||
|
path = vim/.vim/pack/bundle/start/vim-pkgbuild
|
||||||
|
url = https://github.com/m-pilia/vim-pkgbuild.git
|
||||||
|
|||||||
@@ -20,9 +20,11 @@
|
|||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
autoSetupRemote = true
|
autoSetupRemote = true
|
||||||
|
followTags = true
|
||||||
|
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
|
conflictstyle = zdiff3
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
autocorrect = 10
|
autocorrect = 10
|
||||||
@@ -46,11 +48,13 @@
|
|||||||
|
|
||||||
[rebase]
|
[rebase]
|
||||||
autosquash = true
|
autosquash = true
|
||||||
updateRefs = true
|
updaterefs = true
|
||||||
autoStash = true
|
autoStash = true
|
||||||
|
|
||||||
[fetch]
|
[fetch]
|
||||||
prune = true
|
prune = true
|
||||||
|
pruneTags = true
|
||||||
|
all = true
|
||||||
|
|
||||||
[sendemail]
|
[sendemail]
|
||||||
smtpserver = charon.bertptrs.nl
|
smtpserver = charon.bertptrs.nl
|
||||||
@@ -72,3 +76,15 @@
|
|||||||
# Mark any lines that were added in a skipped commit and can not be
|
# Mark any lines that were added in a skipped commit and can not be
|
||||||
# attributed with a `*`
|
# attributed with a `*`
|
||||||
markUnblamableLines = true
|
markUnblamableLines = true
|
||||||
|
[branch]
|
||||||
|
sort = -committerdate
|
||||||
|
[diff]
|
||||||
|
algorithm = histogram
|
||||||
|
colorMoved = plain
|
||||||
|
mnemonicprefix = true
|
||||||
|
renames = true
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
autoupdate = true
|
||||||
|
[tag]
|
||||||
|
sort = version:refname
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
#!/hint/bash
|
#!/hint/bash
|
||||||
# Modify default build parameters to build native optimizations
|
PACKAGER="Bert Peters <bertptrs@archlinux.org>"
|
||||||
CFLAGS="${CFLAGS/-mtune=generic/-mtune=native}"
|
GPGKEY="0x38100C24376CD5F6ED4FF4B46918400C2703040C"
|
||||||
CXXFLAGS="${CXXFLAGS/-mtune=generic/-mtune=native}"
|
|
||||||
|
|
||||||
# Enable rust to do the same
|
|
||||||
export RUSTFLAGS="-C target_cpu=native"
|
|
||||||
|
|
||||||
# Do a parallel build and enable output combining
|
# Do a parallel build and enable output combining
|
||||||
MAKEFLAGS="-j$(nproc) -Otarget -k"
|
MAKEFLAGS="-j$(nproc) -Otarget -k"
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
---
|
---
|
||||||
BUNDLE_PATH: "~/.gem"
|
|
||||||
BUNDLE_AUTO_INSTALL: "true"
|
BUNDLE_AUTO_INSTALL: "true"
|
||||||
|
|||||||
1
vim/.vim/pack/bundle/start/vim-pkgbuild
Submodule
1
vim/.vim/pack/bundle/start/vim-pkgbuild
Submodule
Submodule vim/.vim/pack/bundle/start/vim-pkgbuild added at 5fc4106609
@@ -54,6 +54,7 @@ fun! StripTrailingWhitespace()
|
|||||||
endfun
|
endfun
|
||||||
|
|
||||||
autocmd BufWritePre * call StripTrailingWhitespace()
|
autocmd BufWritePre * call StripTrailingWhitespace()
|
||||||
|
autocmd filetype pkgbuild setlocal tabstop=2 shiftwidth=2 expandtab
|
||||||
|
|
||||||
" Keep backup files etc out of the way
|
" Keep backup files etc out of the way
|
||||||
set undofile
|
set undofile
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ plugins=(
|
|||||||
zsh-autosuggestions/zsh-autosuggestions.zsh
|
zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
zsh-you-should-use/you-should-use.plugin.zsh
|
zsh-you-should-use/you-should-use.plugin.zsh
|
||||||
nix-zsh-completions/nix-zsh-completions.plugin.zsh
|
nix-zsh-completions/nix-zsh-completions.plugin.zsh
|
||||||
zsh-auto-notify/auto-notify.plugin.zsh
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for plugin in "${plugins[@]}"; do
|
for plugin in "${plugins[@]}"; do
|
||||||
@@ -61,24 +60,6 @@ done
|
|||||||
|
|
||||||
fpath+=("$ZDOTDIR/plugins/nix-zsh-completions")
|
fpath+=("$ZDOTDIR/plugins/nix-zsh-completions")
|
||||||
|
|
||||||
# Configure auto-notify
|
|
||||||
AUTO_NOTIFY_IGNORE+=(
|
|
||||||
"gcloud compute ssh"
|
|
||||||
"nix run"
|
|
||||||
"bash"
|
|
||||||
"sem debug"
|
|
||||||
"git "{commit,grep,log}
|
|
||||||
"journalctl"
|
|
||||||
"jekyll serve"
|
|
||||||
"sudoedit"
|
|
||||||
"ipython"{,3}
|
|
||||||
"sem "{attach,debug}
|
|
||||||
"psql"
|
|
||||||
"sqlite3"
|
|
||||||
"iotop"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
## Autosuggest plugin configuration
|
## Autosuggest plugin configuration
|
||||||
# Consider autocomplete in completion
|
# Consider autocomplete in completion
|
||||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||||
@@ -104,16 +85,27 @@ alias nrc='nix shell --file default.nix -c'
|
|||||||
alias gcs='gcloud compute ssh --tunnel-through-iap'
|
alias gcs='gcloud compute ssh --tunnel-through-iap'
|
||||||
alias gscp='gcloud compute scp --tunnel-through-iap'
|
alias gscp='gcloud compute scp --tunnel-through-iap'
|
||||||
alias gci='gcloud compute instances'
|
alias gci='gcloud compute instances'
|
||||||
|
# This invocation is so much more complicated than it needs to be, but
|
||||||
|
# Google will only show mountain time otherwise.
|
||||||
|
alias gops='gcloud compute operations list --format=":(TIMESTAMP.date(tz=LOCAL))" --sort-by=TIMESTAMP'
|
||||||
|
|
||||||
# Not an alias but useful nonetheless.
|
# Not an alias but useful nonetheless.
|
||||||
function pasters() {
|
function pasters() {
|
||||||
local file=${1:-/dev/stdin}
|
local file=${1:-/dev/stdin}
|
||||||
curl --data-binary @${file} https://paste.rs
|
# Explicitly write the newline because paste.rs doesn't and sakura
|
||||||
|
# gets confused.
|
||||||
|
curl --write-out "\n" --data-binary @${file} https://paste.rs
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ensure we can make cheap copies on btrfs
|
# Ensure we can make cheap copies on btrfs
|
||||||
alias cp='cp --reflink=auto'
|
alias cp='cp --reflink=auto'
|
||||||
|
|
||||||
|
function pullall() {
|
||||||
|
for repo in "$@"; do
|
||||||
|
echo "$repo"
|
||||||
|
done | xargs -P0 -I{} git -C {} pull
|
||||||
|
}
|
||||||
|
|
||||||
if (( $+commands[thefuck] ))
|
if (( $+commands[thefuck] ))
|
||||||
then
|
then
|
||||||
alias fuck='$(thefuck $(fc -ln -1))'
|
alias fuck='$(thefuck $(fc -ln -1))'
|
||||||
@@ -123,6 +115,11 @@ eval "$(dircolors)"
|
|||||||
|
|
||||||
# Initialize the prompt
|
# Initialize the prompt
|
||||||
source "${ZDOTDIR:-$HOME}/.zshtheme"
|
source "${ZDOTDIR:-$HOME}/.zshtheme"
|
||||||
|
# Report commands that take longer than ten seconds, or more than 10MB
|
||||||
|
# of RAM
|
||||||
|
REPORTTIME=10
|
||||||
|
REPORTMEMORY=10240
|
||||||
|
TIMEFMT='%J %U user %S system %P cpu %*E total; max RSS %MkB'
|
||||||
|
|
||||||
# Setup the CNF hook
|
# Setup the CNF hook
|
||||||
if [[ -s /usr/share/doc/pkgfile/command-not-found.zsh ]]; then
|
if [[ -s /usr/share/doc/pkgfile/command-not-found.zsh ]]; then
|
||||||
@@ -308,7 +305,30 @@ if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
|||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize direnv if available
|
#####################
|
||||||
if (($+commands[direnv])); then
|
# Arch Linux things #
|
||||||
eval "$(direnv hook zsh)"
|
#####################
|
||||||
fi
|
function arch-pkg-cd() {
|
||||||
|
# Inspired by Segaja: https://gitlab.com/Segaja/dotfiles_base/-/blob/main/distro_arch/.config/zsh/os.zsh#L118-133
|
||||||
|
local arch_repo_folder="${HOME}/projects/arch/packaging/packages"
|
||||||
|
|
||||||
|
if [[ ! -d "$arch_repo_folder/$1" ]]; then
|
||||||
|
if pacman -Si "$1" &> /dev/null; then
|
||||||
|
cd "$arch_repo_folder"
|
||||||
|
pkgctl repo clone "$1"
|
||||||
|
elif [[ "$2" = '-c' ]]; then
|
||||||
|
cd "$arch_repo_folder"
|
||||||
|
pkgctl repo create --clone "$1"
|
||||||
|
else
|
||||||
|
echo "Non-existent package, use -c to create" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$1"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
cd "$arch_repo_folder/$1"
|
||||||
|
pkgctl repo configure
|
||||||
|
git pull --rebase --autostash
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ function prompt_ps1() {
|
|||||||
host="%S%B$host"
|
host="%S%B$host"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local shlvl="%{$fg[black]%}%{$bg[magenta]%}\${(l:$SHLVL-1::>:)}%{$reset_color%}"
|
||||||
local prompt="%n@%{$fg[cyan]%}%m$rs %# "
|
local prompt="%n@%{$fg[cyan]%}%m$rs %# "
|
||||||
ps1=(
|
ps1=(
|
||||||
"$host"
|
"$host"
|
||||||
@@ -61,6 +62,7 @@ function prompt_ps1() {
|
|||||||
$'\n'
|
$'\n'
|
||||||
'$(prompt_handle_virtualenv)'
|
'$(prompt_handle_virtualenv)'
|
||||||
'${vcs_info_msg_0_:+${vcs_info_msg_0_}\n}'
|
'${vcs_info_msg_0_:+${vcs_info_msg_0_}\n}'
|
||||||
|
"$shlvl"
|
||||||
"$prompt"
|
"$prompt"
|
||||||
)
|
)
|
||||||
echo "${(j::)ps1}"
|
echo "${(j::)ps1}"
|
||||||
|
|||||||
Submodule zsh/.config/zsh/plugins/nix-zsh-completions updated: 247e8cc192...6e782b9709
Submodule zsh/.config/zsh/plugins/zsh-auto-notify deleted from f8cd00f2b6
Submodule zsh/.config/zsh/plugins/zsh-autosuggestions updated: a411ef3e09...e52ee8ca55
Reference in New Issue
Block a user