Compare commits
7 Commits
5e7e5b6f33
...
main
Author | SHA1 | Date | |
---|---|---|---|
386ff7259c
|
|||
28f1604b78
|
|||
04477c25bf
|
|||
46e9b50a13
|
|||
fff74676d9
|
|||
40b17c99e4
|
|||
cf083e866b
|
@ -15,8 +15,6 @@ if [ -x /usr/bin/dircolors ]; then
|
|||||||
alias diff='diff --color=auto'
|
alias diff='diff --color=auto'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
~sezení(){ ~/Dokumenty/Projekty/Sezení; }
|
|
||||||
|
|
||||||
alias §rm='rm -vi'
|
alias §rm='rm -vi'
|
||||||
alias §cp='cp -vi'
|
alias §cp='cp -vi'
|
||||||
alias §mv='mv -vi'
|
alias §mv='mv -vi'
|
||||||
@ -29,9 +27,42 @@ alias §df='df -Th'
|
|||||||
alias §xclip-copy='xclip -selection clipboard'
|
alias §xclip-copy='xclip -selection clipboard'
|
||||||
alias §xclip-paste='xclip -o -selection clipboard'
|
alias §xclip-paste='xclip -o -selection clipboard'
|
||||||
|
|
||||||
LAST_PWD_PATH="$BASH_DOTFILES/.bash_last_pwd"
|
CROSS_SESSION="$BASH_DOTFILES/.bash_cross_session"
|
||||||
[ -f "$LAST_PWD_PATH" ] && OLDPWD=`cat $LAST_PWD_PATH`
|
[ -f "$CROSS_SESSION" ] && . "$CROSS_SESSION"
|
||||||
cd(){ builtin cd "$@" && echo `pwd` > "$LAST_PWD_PATH"; }
|
crossSession() {
|
||||||
|
if [[ '--help' == "${1:---help}" ]]; then
|
||||||
|
echo 'crossSession [--help]'
|
||||||
|
echo ' Print this help.'
|
||||||
|
echo 'crossSession [--list]'
|
||||||
|
echo ' Lists all cross session variables or print this help.'
|
||||||
|
echo 'crossSession <name> [<value>]'
|
||||||
|
echo ' Sets cross session variable <name> to <value> (or empty for unset).'
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [[ '--list' == "$1" ]]; then
|
||||||
|
cat "$CROSS_SESSION"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
local name="$1"
|
||||||
|
local value="$2"
|
||||||
|
|
||||||
|
# Check if the variable already exists in the file
|
||||||
|
if grep -q "^export $name=" "$CROSS_SESSION"; then
|
||||||
|
if [ -z "$value" ]; then
|
||||||
|
# If new value is empty, remove the variable from the file
|
||||||
|
sed -i "/^export $name=/d" "$CROSS_SESSION"
|
||||||
|
else
|
||||||
|
# If it exists, replace the old value with the new value
|
||||||
|
sed -i "s|^export $name=.*|export $name=\"$value\"|" "$CROSS_SESSION"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -n "$value" ]; then
|
||||||
|
# If it doesn't exist and new value is not empty, append the new variable to the file
|
||||||
|
echo "export $name=\"$value\"" >> "$CROSS_SESSION"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
cd(){ builtin cd "$@" && crossSession 'OLDPWD' "$(pwd)"; }
|
||||||
|
|
||||||
history_clean(){ awk '!seen[$0]++ {print $0}' $HOME/.bash_history; }
|
history_clean(){ awk '!seen[$0]++ {print $0}' $HOME/.bash_history; }
|
||||||
history_edit(){ vim $HOME/.bash_history; }
|
history_edit(){ vim $HOME/.bash_history; }
|
||||||
@ -49,6 +80,11 @@ history_most_used(){ LC_ALL=C cat ~/.bash_history | cut -d ';' -f 2- | §awk 1 |
|
|||||||
alias §less='less -R -S'
|
alias §less='less -R -S'
|
||||||
|
|
||||||
m(){
|
m(){
|
||||||
|
if [[ '-d' == "$1" ]]; then
|
||||||
|
unset "m$2"
|
||||||
|
crossSession "m$2"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
printenv | grep -e '^m'
|
printenv | grep -e '^m'
|
||||||
return 0
|
return 0
|
||||||
@ -56,6 +92,8 @@ m(){
|
|||||||
if [[ "--help" == "$1" ]]; then
|
if [[ "--help" == "$1" ]]; then
|
||||||
echo 'm [--help]'
|
echo 'm [--help]'
|
||||||
echo ' Lists all marks or print this help.'
|
echo ' Lists all marks or print this help.'
|
||||||
|
echo 'm -d <name>'
|
||||||
|
echo ' Deletes mark <name>. Unsets variable and cross session variable.'
|
||||||
echo 'm <name> [path]'
|
echo 'm <name> [path]'
|
||||||
echo ' Sets mark <name> to current directory or [path].'
|
echo ' Sets mark <name> to current directory or [path].'
|
||||||
echo ' The mark is just a bash variable, use `$m<name>`.'
|
echo ' The mark is just a bash variable, use `$m<name>`.'
|
||||||
@ -64,6 +102,7 @@ m(){
|
|||||||
local n="m$1"
|
local n="m$1"
|
||||||
[[ -z "${!n}" ]] || return 1
|
[[ -z "${!n}" ]] || return 1
|
||||||
[[ -z "$2" ]] && local p="$(pwd)" || local p="$(readlink -f $2)"
|
[[ -z "$2" ]] && local p="$(pwd)" || local p="$(readlink -f $2)"
|
||||||
|
crossSession "$n" "$p"
|
||||||
export $n="$p"
|
export $n="$p"
|
||||||
}
|
}
|
||||||
alias cd-vifm='cd `vifm --choose-dir -`'
|
alias cd-vifm='cd `vifm --choose-dir -`'
|
||||||
@ -113,13 +152,14 @@ alias §ck-grep='cat /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose | gre
|
|||||||
§cmdfu(){ curl "https://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; }
|
§cmdfu(){ curl "https://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; }
|
||||||
aai(){
|
aai(){
|
||||||
[[ "$1" == '--help' ]] && ai ask --help && return 0;
|
[[ "$1" == '--help' ]] && ai ask --help && return 0;
|
||||||
echo "ai ask \"$*, thanks for your help\""; ai ask "\"$*, thanks for your help\"";
|
#echo "ai ask \"$*, thanks for your help\""; ai ask "\"$*, thanks for your help\"";
|
||||||
|
aipick -m "hi, would like to ask for help: $*\n…please response only with plain text to be used in terminal command without any explanation, thanks for your help";
|
||||||
}
|
}
|
||||||
|
|
||||||
alias npx-wca='npx -y web-component-analyzer'
|
alias npx-wca='npx -y web-component-analyzer'
|
||||||
alias npx-qnm='npx -y qnm'
|
alias npx-qnm='npx -y qnm'
|
||||||
alias npx-hint='npx -y hint'
|
alias npx-hint='npx -y hint'
|
||||||
alias npx-markdown='nohup npx markserv'
|
alias npx-markdown='npx -y markserv'
|
||||||
|
|
||||||
alias fzf=fzf-carroarmato0.fzf
|
alias fzf=fzf-carroarmato0.fzf
|
||||||
alias smerge='/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=sublime_merge --file-forwarding com.sublimemerge.App @@u %u @@'
|
alias smerge='/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=sublime_merge --file-forwarding com.sublimemerge.App @@u %u @@'
|
||||||
|
@ -8,15 +8,15 @@ source "$SCRIPT_DIR/complete-alias/complete_alias"
|
|||||||
complete -F _complete_alias gitdotfiles
|
complete -F _complete_alias gitdotfiles
|
||||||
|
|
||||||
alias C--asana='eval "$($HOME/bin/asana.mjs completion_bash)"'
|
alias C--asana='eval "$($HOME/bin/asana.mjs completion_bash)"'
|
||||||
alias C--himalaya='\. "$BASH_DOTFILES/himalaya.completion"'
|
alias C--brew='\. "$BASH_DOTFILES/brew.completion"'
|
||||||
|
alias C--pnpm='\. "$BASH_DOTFILES/pnpm.completion"'
|
||||||
alias C--uu='eval "$($HOME/bin/uu --completion-bash)"'
|
alias C--uu='eval "$($HOME/bin/uu --completion-bash)"'
|
||||||
alias C--jc='eval "$(jc -B)" … newer version needed'
|
alias C--jc='eval "$(jc -B)" … newer version needed'
|
||||||
eval "$(bs .completion bash)"
|
\. <(bs .completion bash)
|
||||||
\. "$BASH_DOTFILES/cordova.completion"
|
\. "$BASH_DOTFILES/cordova.completion"
|
||||||
eval "$(node --completion-bash)"
|
\. <(node --completion-bash)
|
||||||
eval "$(npm completion)"
|
\. <(npm completion)
|
||||||
eval "$(nodejsscript --completion bash)"
|
\. <(nodejsscript --completion bash)
|
||||||
\. "$BASH_DOTFILES/pnpm.completion"
|
|
||||||
|
|
||||||
_npx() {
|
_npx() {
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
File diff suppressed because it is too large
Load Diff
8
.bashrc
8
.bashrc
@ -12,7 +12,8 @@ shopt -s expand_aliases
|
|||||||
[ -f $BASH_DOTFILES/.bash_sdkman ] && . $BASH_DOTFILES/.bash_sdkman
|
[ -f $BASH_DOTFILES/.bash_sdkman ] && . $BASH_DOTFILES/.bash_sdkman
|
||||||
[ -f $BASH_DOTFILES/.bash_nvm ] && . $BASH_DOTFILES/.bash_nvm
|
[ -f $BASH_DOTFILES/.bash_nvm ] && . $BASH_DOTFILES/.bash_nvm
|
||||||
export NODE_COMPILE_CACHE=~/.cache/nodejs-compile-cache # https://nolanlawson.com/2024/10/20/why-im-skeptical-of-rewriting-javascript-tools-in-faster-languages/
|
export NODE_COMPILE_CACHE=~/.cache/nodejs-compile-cache # https://nolanlawson.com/2024/10/20/why-im-skeptical-of-rewriting-javascript-tools-in-faster-languages/
|
||||||
export PATH="$HOME/.local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
[ -f $BASH_DOTFILES/.bash_completions ] && . $BASH_DOTFILES/.bash_completions # for Vim
|
[ -f $BASH_DOTFILES/.bash_completions ] && . $BASH_DOTFILES/.bash_completions # for Vim
|
||||||
|
|
||||||
[[ $- != *i* ]] && return # If not running interactively, don't do anything
|
[[ $- != *i* ]] && return # If not running interactively, don't do anything
|
||||||
@ -21,7 +22,8 @@ export PATH="$HOME/.local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin"
|
|||||||
set -o vi # VIM mode for bash
|
set -o vi # VIM mode for bash
|
||||||
bind -m vi-command 'Control-l: clear-screen'
|
bind -m vi-command 'Control-l: clear-screen'
|
||||||
bind -m vi-insert 'Control-l: clear-screen'
|
bind -m vi-insert 'Control-l: clear-screen'
|
||||||
export MANPAGER="/bin/sh -c \"sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
|
# export MANPAGER="/bin/sh -c \"sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
|
||||||
|
export MANPAGER="vim --appimage-extract-and-run +MANPAGER --not-a-term -c 'set ts=8 nolist' -"
|
||||||
shopt -s checkwinsize # dynamic columns update after every cmd
|
shopt -s checkwinsize # dynamic columns update after every cmd
|
||||||
|
|
||||||
## History
|
## History
|
||||||
@ -59,6 +61,8 @@ if ! shopt -oq posix; then
|
|||||||
fi
|
fi
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
|
shopt -s cdspell # autocorrects cd misspellings
|
||||||
|
|
||||||
# HSTR configuration - add this to ~/.bashrc
|
# HSTR configuration - add this to ~/.bashrc
|
||||||
# if this is interactive shell, then bind hstr to Ctrl-space
|
# if this is interactive shell, then bind hstr to Ctrl-space
|
||||||
# if [[ $- =~ .*i.* ]]; then bind '"\C-@": "\e^ihstr -- \C-j"'; fi
|
# if [[ $- =~ .*i.* ]]; then bind '"\C-@": "\e^ihstr -- \C-j"'; fi
|
||||||
|
@ -43,7 +43,7 @@ Dockerfile=Dockerfile;dockerfile;*.dockerfile;*.Dockerfile;
|
|||||||
#Haxe=*.hx;
|
#Haxe=*.hx;
|
||||||
#HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;
|
#HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;
|
||||||
#Java=*.java;*.jsp;
|
#Java=*.java;*.jsp;
|
||||||
JavaScript=*.js;*.mjs;
|
JavaScript=*.js;*.mjs;*.jsx;
|
||||||
#JSON=*.json;
|
#JSON=*.json;
|
||||||
#Julia=*.jl;
|
#Julia=*.jl;
|
||||||
#Kotlin=*.kt;*.kts;
|
#Kotlin=*.kt;*.kts;
|
||||||
|
@ -1,79 +1,116 @@
|
|||||||
|
# better? defaults
|
||||||
|
[help]
|
||||||
|
autocorrect = prompt
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
[user]
|
[column]
|
||||||
name = Jan Andrle
|
ui = auto
|
||||||
email = andrle.jan@centrum.cz
|
[branch]
|
||||||
signingkey = B3A25AED155AFFAB
|
sort = -committerdate
|
||||||
[credential]
|
[tag]
|
||||||
# see https://stackoverflow.com/questions/5343068/is-there-a-way-to-cache-https-credentials-for-pushing-commits/18362082#18362082
|
sort = version:refname
|
||||||
helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
|
[status]
|
||||||
[alias]
|
branch = true
|
||||||
# * replaced by git-extras
|
short = true
|
||||||
aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920
|
showStash = true
|
||||||
checkout-default= !git checkout `git branch-default`
|
showUntrackedFiles = all
|
||||||
branch-default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
|
submoduleSummary = true
|
||||||
branches = for-each-ref --sort=-committerdate refs --format=\"%(authordate:iso8601)\t%(color:blue)%(refname:short)%(HEAD)\t%(if:notequals="")%(upstream:short)%(then)→ %(upstream:short)%(color:reset)%(else)%(color:yellow)%(objectname:short)%(color:reset)\t%(contents:subject)%(end)\"
|
[log]
|
||||||
tags = tag -l --sort=-creatordate --format='%(refname:short): [%(creatordate:short)] %(subject)'
|
date = iso
|
||||||
# * authors: log-authors = shortlog -ns
|
[fetch]
|
||||||
log-list = log --color --graph --pretty=format:'%Cred%h%Creset %Cgreen[%ad] -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset'
|
prune = true
|
||||||
log-list-nocolors = log --graph --pretty=format:'%h [%ad] -%d %s <%an>'
|
pruneTags = true
|
||||||
status--= !git fetch && git status && echo && echo Commits unpushed: && git log @{push}..HEAD && echo
|
[push]
|
||||||
commit--interactive-v= !clear && git status -sb | grep -v -e '^ M' & git commit --interactive -v
|
autoSetupRemote = true
|
||||||
pu-shll-stash = !git stash && git pull && git push && git stash pop
|
followTags = true
|
||||||
unstage = reset HEAD --
|
recurseSubmodules = on-demand
|
||||||
undoall = reset --soft HEAD^
|
[pull]
|
||||||
diff-dirs = diff --dirstat --find-copies --find-renames --histogram --color
|
rebase = true
|
||||||
submodule-foreach-status = !git submodule --quiet foreach 'git fetch' && git submodule foreach 'git status && echo'
|
[rerere]
|
||||||
# * delete-submodule: rm-submodule = !git submodule deinit -f $1 && rm -rf .git/modules/$1 && git rm -rf $1
|
enabled = true
|
||||||
submodule-update-merge = submodule update --remote --merge
|
autoupdate = true
|
||||||
set-upstream-to-current = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
|
[gc]
|
||||||
push-new=!git push -u origin `git rev-parse --abbrev-ref HEAD`
|
reflogExpire = 200
|
||||||
|
reflogExpireUnreachable = 90
|
||||||
|
[commit]
|
||||||
|
verbose = true
|
||||||
|
gpgsign = true
|
||||||
|
template = ~/.config/git/template
|
||||||
|
[rebase]
|
||||||
|
autoSquash = true
|
||||||
|
autoStash = true
|
||||||
|
updateRefs = true
|
||||||
|
# my setup
|
||||||
[core]
|
[core]
|
||||||
editor = vim
|
editor = vim
|
||||||
pager = delta
|
pager = delta
|
||||||
whitespace = -trailing-space,-space-before-tab
|
whitespace = -trailing-space,-space-before-tab
|
||||||
[filter "lfs"]
|
compression = 9 # trade cpu for network
|
||||||
clean = git-lfs clean -- %f
|
[alias]
|
||||||
smudge = git-lfs smudge -- %f
|
# * replaced by git-extras
|
||||||
process = git-lfs filter-process
|
# * (alias) aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920
|
||||||
required = true
|
branch-default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
|
||||||
[status]
|
# * branches (↓) = for-each-ref --sort=-committerdate refs --format=\"%(authordate:iso8601)\t%(color:blue)%(refname:short)%(HEAD)\t%(if:notequals="")%(upstream:short)%(then)→ %(upstream:short)%(color:reset)%(else)%(color:yellow)%(objectname:short)%(color:reset)\t%(contents:subject)%(end)\"
|
||||||
submoduleSummary = true
|
h-branches = !echo 'brv (git-extras)'
|
||||||
|
tags = tag -l --sort=-creatordate --format='%(refname:short): [%(creatordate:short)] %(subject)'
|
||||||
|
# * authors: log-authors = shortlog -ns
|
||||||
|
h-format-htma = !echo '%Cred%h%Creset %Cgreen[%ad] -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset'
|
||||||
|
commit--interactive= !clear && git status && git commit --interactive
|
||||||
|
h-unstage = !echo reset HEAD --
|
||||||
|
h-undoall = !echo reset --soft HEAD^
|
||||||
|
diff-dirs = diff --dirstat --find-copies --find-renames --histogram --color
|
||||||
|
h-submodule-delete = !echo 'delete-submodule (git-extras)' # * delete-submodule: rm-submodule = !git submodule deinit -f $1 && rm -rf .git/modules/$1 && git rm -rf $1
|
||||||
|
submodule-update-merge = submodule update --remote --merge
|
||||||
|
set-upstream-to-current = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
|
||||||
[diff]
|
[diff]
|
||||||
|
wsErrorHighlight = all
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
colorMoved = default
|
|
||||||
submodule = log
|
submodule = log
|
||||||
[merge]
|
algorithm = histogram
|
||||||
tool = vimdiff
|
# https://git-scm.com/docs/git-diff#Documentation/git-diff.txt-code--color-movedltmodegtcode
|
||||||
conflictstyle = diff3
|
colorMoved = dimmed-zebra
|
||||||
[log]
|
mnemonicPrefix = true
|
||||||
date = iso
|
renames = true
|
||||||
[interactive]
|
[interactive]
|
||||||
diffFilter = delta --color-only
|
diffFilter = delta --color-only
|
||||||
|
[merge]
|
||||||
|
tool = vimdiff
|
||||||
|
conflictstyle = zdiff3
|
||||||
[delta] # [dandavison/delta: A syntax-highlighting pager for git, diff, and grep output](https://github.com/dandavison/delta)
|
[delta] # [dandavison/delta: A syntax-highlighting pager for git, diff, and grep output](https://github.com/dandavison/delta)
|
||||||
syntax-theme= Visual Studio Dark+
|
syntax-theme= Visual Studio Dark+
|
||||||
navigate = true
|
navigate = true
|
||||||
side-by-side = true
|
side-by-side = true
|
||||||
line-numbers = true
|
line-numbers = true
|
||||||
[gc]
|
[filter "lfs"]
|
||||||
reflogExpire = 200
|
required = true
|
||||||
reflogExpireUnreachable = 90
|
clean = git-lfs clean -- %f
|
||||||
[push]
|
smudge = git-lfs smudge -- %f
|
||||||
autoSetupRemote = true
|
process = git-lfs filter-process
|
||||||
[commit]
|
[diff "exif"]
|
||||||
gpgsign = true
|
textconv = exiftool
|
||||||
[rerere]
|
[difftool "kommitdiff"]
|
||||||
enabled = true
|
cmd = kommitdiff \"$LOCAL\" \"$REMOTE\"
|
||||||
[credential "https://github.com"]
|
[mergetool "kommitmerge"]
|
||||||
helper =
|
cmd = kommitmerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
|
||||||
helper = !/usr/bin/gh auth git-credential
|
trustExitCode = true
|
||||||
[credential "https://gist.github.com"]
|
|
||||||
helper =
|
|
||||||
helper = !/usr/bin/gh auth git-credential
|
|
||||||
[credential "https://git.dhl.com"]
|
|
||||||
helper =
|
|
||||||
helper = !/usr/bin/gh auth git-credential
|
|
||||||
[maintenance]
|
[maintenance]
|
||||||
repo = /home/jaandrle/Vzdálené/GitHub/dcp-fe-container-certifedpassport
|
repo = /home/jaandrle/Vzdálené/GitHub/dcp-fe-container-certifedpassport
|
||||||
repo = /home/jaandrle/Vzdálené/GitHub/DHLC-Internet-Networking-old
|
repo = /home/jaandrle/Vzdálené/GitHub/DHLC-Internet-Networking-old
|
||||||
repo = /home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy
|
repo = /home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy
|
||||||
|
[submodule]
|
||||||
|
recurse = true
|
||||||
|
|
||||||
|
[format]
|
||||||
|
coverLetter = auto
|
||||||
|
compactSummary = true
|
||||||
|
minimal = true
|
||||||
|
signOff = true
|
||||||
|
outputDirectory = .patches
|
||||||
|
thread = shallow
|
||||||
|
numbered = auto
|
||||||
|
[am]
|
||||||
|
# keepcr = true # to preserve line endings
|
||||||
|
threeWay = true
|
||||||
|
[include]
|
||||||
|
path = ./identities/current.conf
|
||||||
|
21
.config/git/identities/default.conf
Normal file
21
.config/git/identities/default.conf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[user]
|
||||||
|
name = Jan Andrle
|
||||||
|
email = andrle.jan@centrum.cz
|
||||||
|
signingkey = B3A25AED155AFFAB
|
||||||
|
[credential]
|
||||||
|
# see https://stackoverflow.com/questions/5343068/is-there-a-way-to-cache-https-credentials-for-pushing-commits/18362082#18362082
|
||||||
|
helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
|
||||||
|
[credential "https://github.com"]
|
||||||
|
helper = !/usr/bin/gh auth git-credential
|
||||||
|
[credential "https://gist.github.com"]
|
||||||
|
helper = !/usr/bin/gh auth git-credential
|
||||||
|
[credential "https://git.dhl.com"]
|
||||||
|
helper = !/usr/bin/gh auth git-credential
|
||||||
|
[sendemail]
|
||||||
|
anotate = true
|
||||||
|
smtpserver = smtp.centrum.cz
|
||||||
|
# chainReplyTo = false
|
||||||
|
suppresscc = self
|
||||||
|
smtpuser = andrle.jan@centrum.cz
|
||||||
|
smtpencryption = ssl
|
||||||
|
smtpserverport = 465
|
@ -21,8 +21,8 @@
|
|||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"description": "AI Browser",
|
"description": "AI Browser",
|
||||||
"glare": "AppImage",
|
"glare": "AppImage",
|
||||||
"last_update": "2024-09-17T15:03:29Z",
|
"last_update": "2025-04-01T05:57:12Z",
|
||||||
"version": "2.15.1",
|
"version": "3.8.0",
|
||||||
"downloads": "/home/jaandrle/bin/pinokio"
|
"downloads": "/home/jaandrle/bin/pinokio"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -112,9 +112,9 @@
|
|||||||
"group": "nondev",
|
"group": "nondev",
|
||||||
"file_name": "upscayl",
|
"file_name": "upscayl",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"last_update": "2024-06-01T14:48:20Z",
|
"last_update": "2024-12-25T13:44:34Z",
|
||||||
"downloads": "/home/jaandrle/bin/upscayl",
|
"downloads": "/home/jaandrle/bin/upscayl",
|
||||||
"version": "v2.11.5",
|
"version": "v2.15.0",
|
||||||
"glare": "AppImage"
|
"glare": "AppImage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -134,11 +134,11 @@
|
|||||||
"name": "Fedistar",
|
"name": "Fedistar",
|
||||||
"description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop",
|
"description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop",
|
||||||
"group": "nondev",
|
"group": "nondev",
|
||||||
"file_name": "fedistar",
|
"file_name": "fedistar.appimage",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"last_update": "2024-10-23T12:45:06Z",
|
"last_update": "2025-04-08T11:56:38Z",
|
||||||
"downloads": "/home/jaandrle/bin/fedistar",
|
"downloads": "/home/jaandrle/bin/fedistar.appimage",
|
||||||
"version": "v1.9.12",
|
"version": "v1.11.3",
|
||||||
"glare": ".*amd64.*.AppImage"
|
"glare": ".*amd64.*.AppImage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -148,9 +148,9 @@
|
|||||||
"group": "ai",
|
"group": "ai",
|
||||||
"file_name": "ollama",
|
"file_name": "ollama",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"last_update": "2024-11-08T19:58:30Z",
|
"last_update": "2025-04-26T09:16:02Z",
|
||||||
"downloads": "/home/jaandrle/bin/ollama",
|
"downloads": "/home/jaandrle/bin/ollama",
|
||||||
"version": "v0.4.1",
|
"version": "v0.6.7-rc1",
|
||||||
"glare": "linux-amd64"
|
"glare": "linux-amd64"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -173,8 +173,8 @@
|
|||||||
"file_name": "vim",
|
"file_name": "vim",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"downloads": "/home/jaandrle/bin/vim",
|
"downloads": "/home/jaandrle/bin/vim",
|
||||||
"version": "v9.1.0857",
|
"version": "v9.1.1355",
|
||||||
"last_update": "2024-11-12T01:13:27Z",
|
"last_update": "2025-04-30T01:25:38Z",
|
||||||
"glare": "GVim.*x86_64.*.AppImage"
|
"glare": "GVim.*x86_64.*.AppImage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -182,11 +182,11 @@
|
|||||||
"name": "Escrcpy",
|
"name": "Escrcpy",
|
||||||
"description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。",
|
"description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。",
|
||||||
"group": "dev",
|
"group": "dev",
|
||||||
"file_name": "escrcpy",
|
"file_name": "escrcpy.appimage",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"last_update": "2024-11-08T07:30:51Z",
|
"last_update": "2025-04-27T07:04:58Z",
|
||||||
"downloads": "/home/jaandrle/bin/escrcpy",
|
"downloads": "/home/jaandrle/bin/escrcpy.appimage",
|
||||||
"version": "v1.26.3",
|
"version": "v1.29.6",
|
||||||
"glare": ".*x86_64.*.AppImage"
|
"glare": ".*x86_64.*.AppImage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -208,9 +208,9 @@
|
|||||||
"group": "ai",
|
"group": "ai",
|
||||||
"file_name": "jan",
|
"file_name": "jan",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"last_update": "2024-10-24T08:03:18Z",
|
"last_update": "2025-03-24T02:02:04Z",
|
||||||
"downloads": "/home/jaandrle/bin/jan",
|
"downloads": "/home/jaandrle/bin/jan",
|
||||||
"version": "v0.5.7",
|
"version": "v0.5.16",
|
||||||
"glare": ".*x86_64.*.AppImage"
|
"glare": ".*x86_64.*.AppImage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -220,10 +220,34 @@
|
|||||||
"group": "ai",
|
"group": "ai",
|
||||||
"file_name": "Chatbox",
|
"file_name": "Chatbox",
|
||||||
"exec": "yes",
|
"exec": "yes",
|
||||||
"last_update": "2024-11-07T15:22:15Z",
|
"last_update": "2025-01-14T13:29:06Z",
|
||||||
"downloads": "/home/jaandrle/bin/Chatbox",
|
"downloads": "/home/jaandrle/bin/Chatbox",
|
||||||
"version": "v0.10.2",
|
"version": "v0.10.4",
|
||||||
"glare": ".*x86_64.*.AppImage"
|
"glare": ".*x86_64.*.AppImage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"repository": "Martichou/rquickshare",
|
||||||
|
"group": "nondev",
|
||||||
|
"name": "r-quick-share",
|
||||||
|
"description": "Rust implementation of NearbyShare/QuickShare from Android for Linux and macOS.",
|
||||||
|
"file_name": "r-quick-share",
|
||||||
|
"exec": "yes",
|
||||||
|
"downloads": "/home/jaandrle/bin/r-quick-share",
|
||||||
|
"glare": ".*main.*amd64.AppImage",
|
||||||
|
"last_update": "2025-02-23T18:15:49Z",
|
||||||
|
"version": "v0.11.5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"repository": "konnektoren/konnektoren-mobile-app",
|
||||||
|
"group": "nondev",
|
||||||
|
"name": "Konnektoren",
|
||||||
|
"description": "Konnektoren Mobile App (learning german) — https://konnektoren.help/home/",
|
||||||
|
"file_name": "konnektoren",
|
||||||
|
"exec": "yes",
|
||||||
|
"downloads": "/home/jaandrle/bin/konnektoren",
|
||||||
|
"glare": "AppImage",
|
||||||
|
"last_update": "2025-04-27T07:33:51Z",
|
||||||
|
"version": "konnektoren-mobile-app-v0.1.4"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"draw_white_space": "all"
|
"draw_white_space": "all",
|
||||||
|
"word_wrap": true,
|
||||||
}
|
}
|
||||||
|
@ -9,4 +9,5 @@
|
|||||||
"signature_error_highlighting": "no_public_key",
|
"signature_error_highlighting": "no_public_key",
|
||||||
"theme": "Merge Dark.sublime-theme",
|
"theme": "Merge Dark.sublime-theme",
|
||||||
"expand_merge_commits_by_default": true,
|
"expand_merge_commits_by_default": true,
|
||||||
|
"ignore_diff_white_space": false,
|
||||||
}
|
}
|
||||||
|
@ -27,19 +27,18 @@
|
|||||||
"" #region G – General
|
"" #region G – General
|
||||||
" set vicmd=elvis\ -G\ termcap | " set vicmd=vile
|
" set vicmd=elvis\ -G\ termcap | " set vicmd=vile
|
||||||
set vicmd=vim
|
set vicmd=vim
|
||||||
"set vimhelp
|
|
||||||
command! README :!vim ~/Dokumenty/GitHub/dotfiles/vifm/README.md
|
command! README :!vim ~/Dokumenty/GitHub/dotfiles/vifm/README.md
|
||||||
command! Help :!vim ~/.config/vifm/vifm-help.txt
|
command! Help :!vim ~/.config/vifm/vifm-help.txt
|
||||||
map <f1> :Help<cr>
|
map <f1> :Help<cr>
|
||||||
cabbrev help Help
|
" cabbrev help Help
|
||||||
|
set vimhelp
|
||||||
if !has('win')
|
if !has('win')
|
||||||
set fusehome=/tmp/vifm_FUSE
|
set fusehome=/tmp/vifm_FUSE
|
||||||
set slowfs=curlftpfs
|
set slowfs=curlftpfs
|
||||||
endif
|
endif
|
||||||
set syscalls norunexec
|
set syscalls norunexec
|
||||||
" Automatically resolve symbolic links on l or Enter.
|
" Automatically resolve symbolic links on l or Enter.
|
||||||
set nofollowlinks
|
set notrash
|
||||||
set trash
|
|
||||||
nmap dd :!trash %"f<cr>
|
nmap dd :!trash %"f<cr>
|
||||||
nmap d? :exe "!clear && echo 'Native system trash (`trash-cli`): use `trash`|`trash-empty`|`trash-list`|`trash-put`|`trash-restore`|`trash-rm`' && trash-list | sort -r" | shell<cr>
|
nmap d? :exe "!clear && echo 'Native system trash (`trash-cli`): use `trash`|`trash-empty`|`trash-list`|`trash-put`|`trash-restore`|`trash-rm`' && trash-list | sort -r" | shell<cr>
|
||||||
set history=100 undolevels=100
|
set history=100 undolevels=100
|
||||||
@ -291,8 +290,8 @@
|
|||||||
fileviewer <video/*>,<audio/*> mediainfo %c
|
fileviewer <video/*>,<audio/*> mediainfo %c
|
||||||
endif
|
endif
|
||||||
" #endregion FmediaBin
|
" #endregion FmediaBin
|
||||||
fileviewer .*/,*/ tree %c -L 3 &
|
fileviewer .*/,*/ tree %c -L 3 -C &
|
||||||
fileviewer ../ tree %c -L 1 &
|
fileviewer ../ tree %c -L 1 -C &
|
||||||
fileviewer *.js,*.mjs,*.ts,*.sh,
|
fileviewer *.js,*.mjs,*.ts,*.sh,
|
||||||
\*.css,*.scss,
|
\*.css,*.scss,
|
||||||
\*.php,
|
\*.php,
|
||||||
|
@ -14,3 +14,6 @@ Parent=FALLBACK/
|
|||||||
[Scrolling]
|
[Scrolling]
|
||||||
HistoryMode=2
|
HistoryMode=2
|
||||||
ScrollBarPosition=2
|
ScrollBarPosition=2
|
||||||
|
|
||||||
|
[Terminal Features]
|
||||||
|
BellMode=1
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
Include /home/jaandrle/.config/colima/ssh_config
|
||||||
|
|
||||||
Host vpsfree
|
Host vpsfree
|
||||||
HostName 37.205.11.208
|
HostName 37.205.11.208
|
||||||
IdentityFile ~/.ssh/vpsfree
|
IdentityFile ~/.ssh/vpsfree
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
nmap <leader>vd /diff --git<cr>0vG$
|
|
||||||
command! AIcommit ALTredir !§ai-commit.mjs
|
|
||||||
command! AIcommitConventional ALTredir !§ai-commit.mjs --format conventional
|
|
||||||
command! AIcommitGitmoji ALTredir !§ai-commit.mjs --format gitmoji
|
|
||||||
command! AIcommitGit3moji ALTredir !§ai-commit.mjs --format git3moji
|
|
||||||
nmap <leader><f1> :AIcommitOP
|
|
@ -26,5 +26,6 @@
|
|||||||
"complexity": ["error", 15]
|
"complexity": ["error", 15]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"snippets.ultisnips.pythonPrompt": false
|
||||||
}
|
}
|
||||||
|
224
.vimrc
224
.vimrc
@ -1,15 +1,18 @@
|
|||||||
""" VIM config file | Jan Andrle | 2024-10-21 (VIM >=9.1 AppImage)
|
""" VIM config file | Jan Andrle | 2025-04-05 (VIM >=9.1 AppImage)
|
||||||
"" #region B – Base
|
"" #region B – Base
|
||||||
scriptencoding utf-8 | set encoding=utf-8
|
scriptencoding utf-8 | set encoding=utf-8
|
||||||
set pythonthreedll=/lib/x86_64-linux-gnu/libpython3.10.so.1.0
|
set pythonthreedll=/lib/x86_64-linux-gnu/libpython3.12.so.1.0
|
||||||
let $BASH_ENV = "~/.bashrc"
|
let $BASH_ENV = "~/.bashrc"
|
||||||
set runtimepath^=~/.vim/bundle/*
|
set runtimepath^=~/.vim/bundle/*
|
||||||
packadd! matchit
|
packadd! matchit
|
||||||
|
packadd! cfilter
|
||||||
|
let g:ft_man_folding_enable = 1
|
||||||
|
runtime! ftplugin/man.vim
|
||||||
" set hidden
|
" set hidden
|
||||||
|
|
||||||
set title
|
set title
|
||||||
colorscheme codedark
|
colorscheme codedark
|
||||||
set updatetime=300 lazyredraw ttyfast " Having longer updatetime (default is 4s) leads to noticeable delays and poor user experience. Also reduce redraw frequency and fast terminal typing
|
set updatetime=300 "TODO DEL lazyredraw
|
||||||
set noerrorbells novisualbell
|
set noerrorbells novisualbell
|
||||||
set belloff=esc
|
set belloff=esc
|
||||||
set confirm
|
set confirm
|
||||||
@ -51,14 +54,12 @@
|
|||||||
""" #endregion BB
|
""" #endregion BB
|
||||||
"" #endregion B
|
"" #endregion B
|
||||||
"" #region H – Helpers
|
"" #region H – Helpers
|
||||||
|
" TODO DEL
|
||||||
command! -nargs=? CLscratch 10split | enew | setlocal buftype=nofile bufhidden=wipe noswapfile nobuflisted | if <q-args>!='' | execute 'normal "'.<q-args>.'p' | endif | nnoremap <buffer> ;q :q<cr>
|
command! -nargs=? CLscratch 10split | enew | setlocal buftype=nofile bufhidden=wipe noswapfile nobuflisted | if <q-args>!='' | execute 'normal "'.<q-args>.'p' | endif | nnoremap <buffer> ;q :q<cr>
|
||||||
|
|
||||||
cabbrev ALTR ALTredrawSyntax
|
cabbrev ALTR ALTredrawSyntax
|
||||||
set grepprg=LC_ALL=C\ grep\ -nrsH
|
|
||||||
command! -nargs=0
|
command! -nargs=0
|
||||||
\ ALTredrawSyntax edit | exec 'normal `"' | exec 'set ft='.&ft
|
\ ALTredrawSyntax edit | exec 'normal `"' | exec 'set ft='.&ft
|
||||||
command! -complete=command -bar -range -nargs=+
|
|
||||||
\ ALTredir call jaandrle_utils#redir(0, <q-args>, <range>, <line1>, <line2>)
|
|
||||||
|
|
||||||
let g:quickfix_len= 0
|
let g:quickfix_len= 0
|
||||||
function! QuickFixStatus() abort
|
function! QuickFixStatus() abort
|
||||||
@ -77,16 +78,6 @@
|
|||||||
augroup quickfix
|
augroup quickfix
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd QuickFixCmdPost * call <sid>QuickFixCmdPost()
|
autocmd QuickFixCmdPost * call <sid>QuickFixCmdPost()
|
||||||
autocmd filetype qf
|
|
||||||
\ if filter(getwininfo(), {i,v -> v.winnr == winnr()})[0].loclist
|
|
||||||
\| nnoremap <buffer> ;q :lclose<cr>
|
|
||||||
\| nnoremap <buffer> ;w :lgetbuffer<CR>:lclose<CR>:lopen<CR>
|
|
||||||
\| nnoremap <buffer> ;s :ldo s///gc \| update<c-left><c-left><c-left><right><right>
|
|
||||||
\| else
|
|
||||||
\| nnoremap <buffer> ;q :cclose<cr>
|
|
||||||
\| nnoremap <buffer> ;w :cgetbuffer<CR>:cclose<CR>:copen<CR>
|
|
||||||
\| nnoremap <buffer> ;s :cdo s///gc \| update<c-left><c-left><c-left><right><right>
|
|
||||||
\| endif
|
|
||||||
augroup END
|
augroup END
|
||||||
"" #endregion H
|
"" #endregion H
|
||||||
"" #region SLH – Status Line + Command Line + History (general) + Sessions + File Update, …
|
"" #region SLH – Status Line + Command Line + History (general) + Sessions + File Update, …
|
||||||
@ -97,20 +88,15 @@
|
|||||||
cabbrev wbw w<bar>bw
|
cabbrev wbw w<bar>bw
|
||||||
|
|
||||||
set sessionoptions-=options
|
set sessionoptions-=options
|
||||||
command! -nargs=1
|
|
||||||
\ CLSESSIONcreate :call mini_sessions#create(<f-args>)
|
|
||||||
command! -nargs=0
|
|
||||||
\ CLSESSIONconfig :call mini_sessions#sessionConfig()
|
|
||||||
command! -nargs=1 -complete=customlist,mini_sessions#complete
|
|
||||||
\ CLSESSIONload :call mini_sessions#load(<f-args>)
|
|
||||||
command! -nargs=0
|
|
||||||
\ Scd :call mini_sessions#recoverPwd()
|
|
||||||
|
|
||||||
if !has("gui_running")
|
function! NumberOfBuffers()
|
||||||
execute 'hi! User2 ctermbg='.synIDattr(synIDtrans(hlID('StatusLine')), 'bg').' ctermfg=grey' | endif
|
return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
|
||||||
|
endfunction
|
||||||
set laststatus=2 " Show status line on startup
|
set laststatus=2 " Show status line on startup
|
||||||
set statusline+=··%1*≡·%{QuickFixStatus()}%*··%2*»·%{user_tips#current()}%*··%=
|
set statusline+=··≡·%{QuickFixStatus()}%*··»·%{user_tips#current()}%*··%=
|
||||||
set statusline+=%<%f%R\%M··▶·%{&fileformat}·%{&fileencoding?&fileencoding:&encoding}·%{&filetype}··∷·%{mini_sessions#name('–')}··
|
set statusline+=(%{NumberOfBuffers()})··%<%f%R\%M··▶·%{&fileformat}·%{&fileencoding?&fileencoding:&encoding}·%{&filetype}
|
||||||
|
set statusline+=··
|
||||||
|
" set statusline+=··∷·%{mini_sessions#name('–')}··
|
||||||
|
|
||||||
set history=500 " How many lines of (cmd) history has to remember
|
set history=500 " How many lines of (cmd) history has to remember
|
||||||
set nobackup nowritebackup noswapfile " …there is issue #649 (for servers) and I’m using git/system backups
|
set nobackup nowritebackup noswapfile " …there is issue #649 (for servers) and I’m using git/system backups
|
||||||
@ -120,11 +106,11 @@
|
|||||||
command! SETundoClear let old_undolevels=&undolevels | set undolevels=-1 | exe "normal a \<BS>\<Esc>" | let &undolevels=old_undolevels | unlet old_undolevels | write
|
command! SETundoClear let old_undolevels=&undolevels | set undolevels=-1 | exe "normal a \<BS>\<Esc>" | let &undolevels=old_undolevels | unlet old_undolevels | write
|
||||||
"" #endregion SLH
|
"" #endregion SLH
|
||||||
"" #region LLW – Left Column + Line + Wrap + Scrolling
|
"" #region LLW – Left Column + Line + Wrap + Scrolling
|
||||||
if has("nvim-0.5.0") || has("patch-8.1.1564") " Recently vim can merge signcolumn and number column into one
|
set signcolumn=yes
|
||||||
set signcolumn=number | else | set signcolumn=yes | endif " show always to prevent shifting when diagnosticappears
|
|
||||||
set cursorline cursorcolumn " Always show current position
|
set cursorline cursorcolumn " Always show current position
|
||||||
set number foldcolumn=2 " enable line numbers and add a bit extra margin to the left
|
set number foldcolumn=2 " enable line numbers and add a bit extra margin to the left
|
||||||
set colorcolumn=+1 " …marker visual
|
set colorcolumn=+1 " …marker visual
|
||||||
|
" TODO DEL
|
||||||
command -nargs=? SETtextwidth if <q-args> | let &textwidth=<q-args> | let &colorcolumn='<args>,120,240' | else | let &textwidth=250 | let &colorcolumn='120,240' | endif
|
command -nargs=? SETtextwidth if <q-args> | let &textwidth=<q-args> | let &colorcolumn='<args>,120,240' | else | let &textwidth=250 | let &colorcolumn='120,240' | endif
|
||||||
SETtextwidth " wraping lines and show two lines
|
SETtextwidth " wraping lines and show two lines
|
||||||
set nowrap " Don't wrap long lines by default
|
set nowrap " Don't wrap long lines by default
|
||||||
@ -134,26 +120,53 @@
|
|||||||
"" #endregion LLW
|
"" #endregion LLW
|
||||||
"" #region CN – Clipboard + Navigation throught Buffers + Windows + … (CtrlP)
|
"" #region CN – Clipboard + Navigation throught Buffers + Windows + … (CtrlP)
|
||||||
set pastetoggle=<F2> | nnoremap <F2> :set invpaste paste?<CR>
|
set pastetoggle=<F2> | nnoremap <F2> :set invpaste paste?<CR>
|
||||||
nnoremap <silent> <leader>" :call jaandrle_utils#copyRegister()<cr>
|
function! JaaCopyRegister()
|
||||||
|
echo "Copy content of the register: "
|
||||||
|
let sourceReg = nr2char(getchar())
|
||||||
|
if sourceReg !~# '\v^[a-z0-9"*+]'
|
||||||
|
echon sourceReg." – invalid register"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
echon sourceReg."\ninto the register: "
|
||||||
|
let destinationReg = nr2char(getchar())
|
||||||
|
if destinationReg !~# '\v^[a-z0-9"*+]'
|
||||||
|
echon destinationReg." – invalid register"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
call setreg(destinationReg, getreg(sourceReg, 1))
|
||||||
|
echon destinationReg
|
||||||
|
endfunction
|
||||||
|
nnoremap <silent> <leader>" :call JaaCopyRegister()<cr>
|
||||||
|
|
||||||
nmap <expr> š buffer_number("#")==-1 ? "\<leader>š<cr>" : "\<c-^>"
|
" CtrlP previously
|
||||||
|
nmap <expr> š buffer_number("#")==-1 ? ":CocList --normal buffers\<cr>" : "\<c-^>"
|
||||||
|
nmap ě :CocList
|
||||||
nmap <leader>3 :buffers<cr>:b<space>
|
nmap <leader>3 :buffers<cr>:b<space>
|
||||||
nmap <leader>š :CtrlPBuffer<cr>
|
nmap <leader>š :CocList buffers<cr> | :syntax on<cr>
|
||||||
nmap č <leader>š
|
nmap č <leader>š
|
||||||
let g:ctrlp_map = 'ě'
|
|
||||||
command! -nargs=? SETctrlp execute 'nnoremap '.g:ctrlp_map.' :CtrlP <args><cr>'
|
|
||||||
let g:ctrlp_clear_cache_on_exit = 0
|
|
||||||
let g:ctrlp_prompt_mappings= {
|
|
||||||
\ 'ToggleType(1)': ['<c-up>'],
|
|
||||||
\ 'ToggleType(-1)': ['<c-down>'],
|
|
||||||
\ 'PrtCurStart()': ['<c-b>'],
|
|
||||||
\}
|
|
||||||
"" #endregion CN
|
"" #endregion CN
|
||||||
"" #region FOS – File(s) + Openning + Saving
|
"" #region FOS – File(s) + Openning + Saving
|
||||||
set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime
|
set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime
|
||||||
set modeline
|
set modeline
|
||||||
command! -nargs=?
|
function! JaaAppendModeline(additional= 0)
|
||||||
\ CLmodeline :call jaandrle_utils#AppendModeline(<q-args>=='basic' ? 0 : 1)
|
let l:modeline= printf(" vim: set tabstop=%d shiftwidth=%d textwidth=%d %sexpandtab :",
|
||||||
|
\ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
|
||||||
|
let l:modeline= substitute(&commentstring, "%s", l:modeline, "")
|
||||||
|
call append(line("$"), l:modeline)
|
||||||
|
|
||||||
|
if !a:additional | return 0 | endif
|
||||||
|
if &foldmethod=="marker"
|
||||||
|
let l:modeline= printf(" vim>60: set foldmethod=marker foldmarker=%s :",
|
||||||
|
\ &foldmarker)
|
||||||
|
elseif &foldmethod=="indent"
|
||||||
|
let l:modeline= printf(" vim>60: set foldmethod=indent foldlevel=%d foldnestmax=%d:",
|
||||||
|
\ &foldlevel, &foldnestmax)
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
let l:modeline= substitute(&commentstring, "%s", l:modeline, "")
|
||||||
|
call append(line("$"), l:modeline)
|
||||||
|
endfunction
|
||||||
|
|
||||||
set path+=src/**,app/**,build/** " File matching for `:find`
|
set path+=src/**,app/**,build/** " File matching for `:find`
|
||||||
for ignore in [ '.git', '.npm', 'node_modules' ]
|
for ignore in [ '.git', '.npm', 'node_modules' ]
|
||||||
@ -171,7 +184,7 @@
|
|||||||
set grepprg=LC_ALL=C\ grep\ -HRIns
|
set grepprg=LC_ALL=C\ grep\ -HRIns
|
||||||
set hlsearch incsearch " highlight search, start when typing
|
set hlsearch incsearch " highlight search, start when typing
|
||||||
if maparg('<C-L>', 'n') ==# ''
|
if maparg('<C-L>', 'n') ==# ''
|
||||||
nnoremap <silent> <c-l> :nohlsearch<c-r>=has('diff')?'<bar>diffupdate':''<cr><cr><c-l> | endif
|
nnoremap <silent> <c-l> :nohlsearch<c-r>=has('diff')?'<bar>diffupdate':''<cr><cr><c-l> | endif " TODO? <bar>syntax sync fromstart
|
||||||
|
|
||||||
let g:markbar_persist_mark_names = v:false
|
let g:markbar_persist_mark_names = v:false
|
||||||
let g:markbar_cache_with_hidden_buffers = v:false " last buffers are reopened as hidden https://github.com/Yilin-Yang/vim-markbar/blob/9f5a948d44652074bf2b90d3da6a400d8a369ba5/doc/vim-markbar.txt#L136
|
let g:markbar_cache_with_hidden_buffers = v:false " last buffers are reopened as hidden https://github.com/Yilin-Yang/vim-markbar/blob/9f5a948d44652074bf2b90d3da6a400d8a369ba5/doc/vim-markbar.txt#L136
|
||||||
@ -181,7 +194,6 @@
|
|||||||
" use <c-v>§ for §
|
" use <c-v>§ for §
|
||||||
inoremap § <esc>
|
inoremap § <esc>
|
||||||
set nrformats-=octal
|
set nrformats-=octal
|
||||||
command! -nargs=1 SETTOGGLEnrformats if &nf=~<q-args> | set nf-=<args> | else | set nf+=<args> | endif
|
|
||||||
|
|
||||||
let g:htl_css_templates=1
|
let g:htl_css_templates=1
|
||||||
let g:markdown_fenced_languages= [ 'javascript', 'js=javascript', 'json', 'html', 'php', 'bash', 'vim', 'vimscript=javascript', 'sass' ]
|
let g:markdown_fenced_languages= [ 'javascript', 'js=javascript', 'json', 'html', 'php', 'bash', 'vim', 'vimscript=javascript', 'sass' ]
|
||||||
@ -202,15 +214,16 @@
|
|||||||
let g:rainbow#blacklist = [203,9]
|
let g:rainbow#blacklist = [203,9]
|
||||||
autocmd VimEnter * try
|
autocmd VimEnter * try
|
||||||
\| call rainbow_parentheses#toggle() | catch | endtry
|
\| call rainbow_parentheses#toggle() | catch | endtry
|
||||||
command! SETTOGGLErainbowParentheses call rainbow_parentheses#toggle()
|
" HIGHLIGHT&YANK plugins (buildin) hlyank & cwordhi.vim
|
||||||
" HIGHLIGHT&YANK plugins machakann/vim-highlightedyank & cwordhi.vim
|
packadd hlyank
|
||||||
let g:highlightedyank_highlight_duration= 250
|
let g:hlyank_duration= 250
|
||||||
let g:cwordhi#autoload= 1
|
let g:cwordhi#autoload= 1
|
||||||
set showmatch " Quick highlight oppening bracket/… for currently writted
|
set showmatch " Quick highlight oppening bracket/… for currently writted
|
||||||
set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape TAB
|
set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape TAB
|
||||||
if v:version > 703 || v:version == 703 && has("patch541")
|
if v:version > 703 || v:version == 703 && has("patch541")
|
||||||
set formatoptions+=j | endif " Delete comment character when joining commented lines
|
set formatoptions+=j | endif " Delete comment character when joining commented lines
|
||||||
set smarttab
|
set smarttab
|
||||||
|
" TODO DEL
|
||||||
command! -nargs=1 SETtab let &shiftwidth=<q-args> | let &tabstop=<q-args> | let &softtabstop=<q-args>
|
command! -nargs=1 SETtab let &shiftwidth=<q-args> | let &tabstop=<q-args> | let &softtabstop=<q-args>
|
||||||
SETtab 4
|
SETtab 4
|
||||||
set backspace=indent,eol,start " Allow cursor keys in insert mode: http://vi.stackexchange.com/a/2163
|
set backspace=indent,eol,start " Allow cursor keys in insert mode: http://vi.stackexchange.com/a/2163
|
||||||
@ -220,11 +233,12 @@
|
|||||||
if ($TERM =~ '256' && has("termguicolors"))
|
if ($TERM =~ '256' && has("termguicolors"))
|
||||||
set termguicolors | endif
|
set termguicolors | endif
|
||||||
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
|
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
|
||||||
syntax on | endif
|
syntax enable | endif
|
||||||
set list listchars=tab:»·,trail:·,extends:#,nbsp:~,space:· " Highlight spec. chars / Display extra whitespace
|
set list listchars=tab:»·,trail:·,extends:#,nbsp:~,space:· " Highlight spec. chars / Display extra whitespace
|
||||||
|
set redrawtime=10000
|
||||||
augroup syntax_sync_min_lines
|
augroup syntax_sync_min_lines
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd Syntax * syn sync minlines=2000
|
autocmd BufEnter * syntax sync fromstart "TODO DEL syn sync minlines=2000
|
||||||
augroup END
|
augroup END
|
||||||
let g:vim_vue_plugin_config = { 'foldexpr': 1, 'attribute': 1, 'keyword': 1 }
|
let g:vim_vue_plugin_config = { 'foldexpr': 1, 'attribute': 1, 'keyword': 1 }
|
||||||
" SPELL
|
" SPELL
|
||||||
@ -236,7 +250,7 @@
|
|||||||
nnoremap <leader>O O<space><bs><esc>
|
nnoremap <leader>O O<space><bs><esc>
|
||||||
nnoremap <s-k> a<cr><esc>
|
nnoremap <s-k> a<cr><esc>
|
||||||
for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ]
|
for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ]
|
||||||
execute m.'noremap <leader>'.l.' "+'.l | endfor | endfor
|
execute m.'map <leader>'.l.' "+'.l | endfor | endfor " no noremap ⇐ https://github.com/jasonccox/vim-wayland-clipboard?tab=readme-ov-file#non-recursive-mappings
|
||||||
" TODO DEL: FOLDS
|
" TODO DEL: FOLDS
|
||||||
" TODO DEL: command! -nargs=0 SETFOLDregions set foldmethod=marker
|
" TODO DEL: command! -nargs=0 SETFOLDregions set foldmethod=marker
|
||||||
" TODO DEL: command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel=<q-args> | let &foldnestmax=<q-args>+1
|
" TODO DEL: command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel=<q-args> | let &foldnestmax=<q-args>+1
|
||||||
@ -250,45 +264,18 @@
|
|||||||
autocmd BufWinEnter *.* silent! loadview
|
autocmd BufWinEnter *.* silent! loadview
|
||||||
augroup END
|
augroup END
|
||||||
"" #endregion EA
|
"" #endregion EA
|
||||||
"" #region GIT
|
"" #region AI
|
||||||
function s:gitCompletion(_, CmdLine, __)
|
let g:codeium_disable_bindings = 1
|
||||||
let l:cmd= a:CmdLine->split()
|
imap <script><silent><nowait><expr> <f3><f3> codeium#Accept()
|
||||||
let l:cmd_start= l:cmd[0]
|
imap <script><silent><nowait><expr> <f3><w> codeium#AcceptNextWord()
|
||||||
\ ->substitute('GIThub', 'gh', '')
|
imap <script><silent><nowait><expr> <f3><j> codeium#AcceptLine()
|
||||||
\ ->substitute('GIT', 'git ', '')->trim()->split(' ')
|
imap <f3>n <Cmd>call codeium#CycleCompletions(1)<CR>
|
||||||
return bash#complete((l:cmd_start+l:cmd[1:])->join())
|
imap <f3>N <Cmd>call codeium#CycleCompletions(-1)<CR>
|
||||||
endfunction
|
imap <f3>d <Cmd>call codeium#Clear()<CR>
|
||||||
function s:gitCmd(candidate)
|
imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||||
execute '!clear && echo ":: git '.a:candidate->escape('"').' ::" && git '.a:candidate
|
"" #endregion AI
|
||||||
endfunction
|
|
||||||
command! -nargs=* -complete=customlist,<sid>gitCompletion
|
|
||||||
\ GIT call <sid>gitCmd(<q-args>)
|
|
||||||
command! -nargs=* -complete=customlist,<sid>gitCompletion
|
|
||||||
\ GITstatus !git status-- <args>
|
|
||||||
command! -nargs=* -complete=customlist,<sid>gitCompletion
|
|
||||||
\ GITcommit !git commit-- <args>
|
|
||||||
command! -nargs=* -complete=customlist,<sid>gitCompletion
|
|
||||||
\ GITpush !git push <args>
|
|
||||||
command! -nargs=* -complete=customlist,<sid>gitCompletion
|
|
||||||
\ GITdiff if <q-args>=='' | execute '!clear && git diff %:p' | else | silent! execute '!git diff <args>' | endif
|
|
||||||
command! -nargs=*
|
|
||||||
\ GITrestore execute '!clear && git status '.(<q-args>=='.' ? '%:p':'<args>').' -bs & git restore '.(<q-args>=='' ? '%:p':'<args>').' --patch'
|
|
||||||
command! -nargs=* -complete=customlist,<sid>gitCompletion
|
|
||||||
\ GIThub execute '!clear && echo ":: gh '.<q-args>->escape('"').' ::" && gh '.<q-args>
|
|
||||||
command! -nargs=?
|
|
||||||
\ GIThubIssue execute '!clear && gh issue view '.expand('<cword>').' '.<q-args>
|
|
||||||
let g:git_messenger_no_default_mappings= v:true
|
|
||||||
let g:git_messenger_date_format= '%Y-%m-%d (%c)'
|
|
||||||
let g:git_messenger_always_into_popup= v:true
|
|
||||||
augroup git_messenger_help
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType gitmessengerpopup setlocal keywordprg=git\ show
|
|
||||||
augroup END
|
|
||||||
command! -nargs=0
|
|
||||||
\ GITblameThis GitMessenger
|
|
||||||
"" #endregion GIT
|
|
||||||
"" #region COC – COC and so on, compilers, code/commands completions
|
"" #region COC – COC and so on, compilers, code/commands completions
|
||||||
let g:coc_global_extensions= ['coc-css', 'coc-docthis', 'coc-emmet', 'coc-emoji', 'coc-pretty-ts-errors', 'coc-eslint', 'coc-gitmoji', 'coc-html', 'coc-json', 'coc-marketplace', 'coc-phpls', 'coc-sh', 'coc-snippets', 'coc-styled-components', 'coc-svg', 'coc-tabnine', 'coc-tsserver']
|
let g:coc_global_extensions= ['coc-css', 'coc-docthis', 'coc-emmet', 'coc-emoji', 'coc-git', 'coc-pretty-ts-errors', 'coc-eslint', 'coc-gitmoji', 'coc-html', 'coc-json', 'coc-lists', 'coc-marketplace', 'coc-phpls', 'coc-sh', 'coc-snippets', 'coc-styled-components', 'coc-svg', 'coc-tsserver']
|
||||||
" https://github.com/antonk52/cssmodules-language-server
|
" https://github.com/antonk52/cssmodules-language-server
|
||||||
call coc#config('languageserver.cssmodules', {
|
call coc#config('languageserver.cssmodules', {
|
||||||
\ "command": "cssmodules-language-server",
|
\ "command": "cssmodules-language-server",
|
||||||
@ -298,21 +285,6 @@
|
|||||||
\ "settings": {}
|
\ "settings": {}
|
||||||
\ })
|
\ })
|
||||||
autocmd FileType scss setl iskeyword+=@-@
|
autocmd FileType scss setl iskeyword+=@-@
|
||||||
command -nargs=? ALTmake if &filetype=='javascript' | compiler jshint | elseif &filetype=='php' | compiler php | endif
|
|
||||||
\| if <q-args>!='' | silent make <args> | else | silent make '%' | endif | checktime | silent redraw! " …prev line, hotfix (filetype detection does’t works)
|
|
||||||
function <sid>ToggleALTmakeOnWrite()
|
|
||||||
if exists('#ALTmake_auto#BufWritePost')
|
|
||||||
augroup ALTmake_auto
|
|
||||||
autocmd!
|
|
||||||
augroup END
|
|
||||||
else
|
|
||||||
augroup ALTmake_auto
|
|
||||||
autocmd!
|
|
||||||
autocmd BufWritePost *.{php,js,mjs} execute 'ALTmake' | call <sid>QuickFixCmdPost()
|
|
||||||
augroup END
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
command! ALTmakeOnWrite call <sid>ToggleALTmakeOnWrite()
|
|
||||||
function! CustomKeyWord(word)
|
function! CustomKeyWord(word)
|
||||||
if(a:word=="gulp_place")
|
if(a:word=="gulp_place")
|
||||||
highlight link gulp_place ErrorMsg
|
highlight link gulp_place ErrorMsg
|
||||||
@ -335,9 +307,7 @@
|
|||||||
return !col || getline('.')[col - 1] =~# '\s'
|
return !col || getline('.')[col - 1] =~# '\s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
nmap <silent><nowait> gd <Plug>(coc-definition)
|
||||||
nmap <leader>/ :CocSearch
|
|
||||||
nmap <leader>? <leader>/
|
|
||||||
command! -nargs=* -complete=customlist,<sid>SCommandCocActionComplete CocAction call CocActionAsync(<f-args>)
|
command! -nargs=* -complete=customlist,<sid>SCommandCocActionComplete CocAction call CocActionAsync(<f-args>)
|
||||||
function s:SCommandCocActionComplete(argLead, cmdLine, cursorPos)
|
function s:SCommandCocActionComplete(argLead, cmdLine, cursorPos)
|
||||||
return readfile(expand('~/.vim/pack/coc/start/coc.nvim/doc/tags'), 'r')
|
return readfile(expand('~/.vim/pack/coc/start/coc.nvim/doc/tags'), 'r')
|
||||||
@ -348,8 +318,8 @@
|
|||||||
" navigate diagnostics, use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
" navigate diagnostics, use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||||
nnoremap <silent> gh :call <sid>show_documentation(expand("<cword>"))<cr>
|
nnoremap <silent> gh :call <sid>show_documentation(expand("<cword>"))<cr>
|
||||||
vnoremap <silent> gh :<c-u>call <sid>show_documentation(mini_enhancement#selectedText())<cr>
|
vnoremap <silent> gh :<c-u>call <sid>show_documentation(mini_enhancement#selectedText())<cr>
|
||||||
nnoremap <leader>gf :let g:ctrlp_default_input=expand("<cword>") <bar> execute 'CtrlP' <bar> unlet g:ctrlp_default_input <cr>
|
nnoremap <leader>gf :CocList --interactive --normal --input='<c-r>=expand("<cword>")<cr>' files<cr>
|
||||||
vnoremap <leader>gf :<c-u>let g:ctrlp_default_input=mini_enhancement#selectedText() <bar> execute 'CtrlP' <bar> unlet g:ctrlp_default_input <cr>
|
vnoremap <leader>gf :<c-u>CocList --interactive --normal --input='<c-r>=mini_enhancement#selectedText()<cr>' files<cr>
|
||||||
""" #region COCP – Coc popups scroll (Remap <C-f> and <C-b> for scroll float windows/popups.)
|
""" #region COCP – Coc popups scroll (Remap <C-f> and <C-b> for scroll float windows/popups.)
|
||||||
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
||||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||||
@ -360,11 +330,10 @@
|
|||||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||||
endif
|
endif
|
||||||
""" #endregion COCP
|
""" #endregion COCP
|
||||||
" TODO DEL: command! -nargs=? SETFOLDcoc :call CocAction('fold', <f-args>)
|
|
||||||
|
|
||||||
command! -nargs=? CLhelpMy if <q-args>!='' | exec 'map '.<q-args> | else | call popup_notification([
|
command! -nargs=? CLhelpMy if <q-args>!='' | exec 'map '.<q-args> | else | call popup_notification([
|
||||||
\ 'Custom mappings starting: '.mapleader.',§, ů, ;, U, ž',
|
\ 'Custom mappings starting: '.mapleader.',§, ů, ;, U, ž',
|
||||||
\ 'Custom commands starting: CL, SET, ALT, CtrlP, Vifm, GIT, Coc',
|
\ 'Custom commands starting: CL, SET, ALT, Vifm, Coc',
|
||||||
\ 'Helpful commands: CocAction, CocCommand, CocList',
|
\ 'Helpful commands: CocAction, CocCommand, CocList',
|
||||||
\], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) | endif
|
\], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) | endif
|
||||||
nnoremap <c-g> :CLwhereami<cr>
|
nnoremap <c-g> :CLwhereami<cr>
|
||||||
@ -400,28 +369,8 @@
|
|||||||
\ CLcheat call cheat_copilot#open(<q-args>==''?&filetype:<q-args>)
|
\ CLcheat call cheat_copilot#open(<q-args>==''?&filetype:<q-args>)
|
||||||
|
|
||||||
function! s:show_documentation(word)
|
function! s:show_documentation(word)
|
||||||
if (index(['vim', 'help'], &filetype) >= 0)
|
|
||||||
" inspired by https://github.com/tpope/vim-scriptease/blob/74bd5bf46a63b982b100466f9fd47d2d0597fcdd/autoload/scriptease.vim#L737
|
|
||||||
let syn= get(reverse(map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')), 0, '')
|
|
||||||
if syn ==# 'vimFuncName' | return <sid>show_documentation_vim('h '.a:word.'()')
|
|
||||||
elseif syn ==# 'vimOption' | return <sid>show_documentation_vim("h '".a:word."'")
|
|
||||||
elseif syn ==# 'vimUserAttrbKey' | return <sid>show_documentation_vim('h :command-'.a:word)
|
|
||||||
endif
|
|
||||||
|
|
||||||
let col= col('.') - 1
|
|
||||||
while col && getline('.')[col] =~# '\k' | let col-= 1 | endwhile
|
|
||||||
let pre= col == 0 ? '' : getline('.')[0 : col]
|
|
||||||
let col= col('.') - 1
|
|
||||||
while col && getline('.')[col] =~# '\k' | let col+= 1 | endwhile
|
|
||||||
if pre =~# '^\s*:\=$' | return <sid>show_documentation_vim('h :'.a:word)
|
|
||||||
elseif pre =~# '\<v:$' | return <sid>show_documentation_vim('h v:'.a:word)
|
|
||||||
endif
|
|
||||||
|
|
||||||
let post= getline('.')[col : -0]
|
|
||||||
if a:word ==# 'v' && post =~# ':\w\+' | return <sid>show_documentation_vim('h v'.matchstr(post, ':\w\+')) | endif
|
|
||||||
return <sid>show_documentation_vim('h '.a:word)
|
|
||||||
endif
|
|
||||||
if (!CocAction('hasProvider', 'hover'))
|
if (!CocAction('hasProvider', 'hover'))
|
||||||
|
if &filetype=='man' | call dist#man#PreGetPage(0) | return 0 | endif
|
||||||
return feedkeys('K', 'in')
|
return feedkeys('K', 'in')
|
||||||
endif
|
endif
|
||||||
if &filetype=='html' && coc#source#custom_elements#hover(a:word)!=0
|
if &filetype=='html' && coc#source#custom_elements#hover(a:word)!=0
|
||||||
@ -430,18 +379,7 @@
|
|||||||
|
|
||||||
return CocActionAsync('doHover')
|
return CocActionAsync('doHover')
|
||||||
endfunction
|
endfunction
|
||||||
function! s:show_documentation_vim(cmd)
|
|
||||||
call execute(a:cmd) | call histadd("cmd", a:cmd)
|
|
||||||
endfunction
|
|
||||||
"" #endregion COC
|
"" #endregion COC
|
||||||
let g:codeium_disable_bindings = 1
|
|
||||||
imap <script><silent><nowait><expr> <f3><f3> codeium#Accept()
|
|
||||||
imap <script><silent><nowait><expr> <f3><w> codeium#AcceptNextWord()
|
|
||||||
imap <script><silent><nowait><expr> <f3><j> codeium#AcceptLine()
|
|
||||||
imap <f3>n <Cmd>call codeium#CycleCompletions(1)<CR>
|
|
||||||
imap <f3>N <Cmd>call codeium#CycleCompletions(-1)<CR>
|
|
||||||
imap <f3>d <Cmd>call codeium#Clear()<CR>
|
|
||||||
imap <f3>! <Cmd>call codeium#Complete()<CR>
|
|
||||||
|
|
||||||
" vim: set textwidth=250 :
|
" vim: set textwidth=250 :
|
||||||
" vim>60: set foldmethod=marker foldmarker=#region,#endregion :
|
" vim>60: set foldmethod=marker foldmarker=#region,#endregion :
|
||||||
|
1685
bin/README.md
1685
bin/README.md
File diff suppressed because it is too large
Load Diff
39
bin/git-identity
Executable file
39
bin/git-identity
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
config="$HOME/.config/git/identities"
|
||||||
|
input="${1:-}"
|
||||||
|
usage="Usage
|
||||||
|
git identity [<name>|help|-]
|
||||||
|
git-identity --help
|
||||||
|
"
|
||||||
|
[ -z "$input" ] \
|
||||||
|
&& echo "$usage"\
|
||||||
|
&& echo -e "$config/current.conf … current identity:" \
|
||||||
|
&& cat "$config/current.conf" \
|
||||||
|
&& exit 0
|
||||||
|
[ "$input" = --help ] \
|
||||||
|
&& input="help"
|
||||||
|
[ "$input" = help ] \
|
||||||
|
&& echo "$usage"\
|
||||||
|
&& echo '- _empty_: shows usage and current identity' \
|
||||||
|
&& echo '- <name>: set identity' \
|
||||||
|
&& echo '- -: show path to identities directory' \
|
||||||
|
&& echo '- help: shows this help' \
|
||||||
|
&& echo -e '\n\nExamples' \
|
||||||
|
&& echo '- git identity' \
|
||||||
|
&& echo '- git identity user' \
|
||||||
|
&& echo '- ls $(git identity -)' \
|
||||||
|
&& echo -e '\n\nGit config' \
|
||||||
|
&& echo "- git config --global include.path '$config/current.conf'" \
|
||||||
|
&& exit 0
|
||||||
|
[ "$input" = - ] \
|
||||||
|
&& echo "$config" \
|
||||||
|
&& exit 0
|
||||||
|
|
||||||
|
identity="$config/$input.conf"
|
||||||
|
[ ! -e "$identity" ] \
|
||||||
|
&& echo "No such identity: $input" >&2 \
|
||||||
|
&& echo "$identity" >&2 \
|
||||||
|
&& exit 1
|
||||||
|
|
||||||
|
ln --verbose --force "$identity" "$config/current.conf"
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
if [[ $(mount | grep OneDrive) ]]; then
|
|
||||||
fusermount -uz ~/Vzdálené/OneDrive
|
|
||||||
notify-send -i system-file-manager "OneDrive disk ODPOJEN"
|
|
||||||
else
|
|
||||||
rclone --vfs-cache-mode full mount "onedrive": ~/Vzdálené/OneDrive &
|
|
||||||
dolphin ~/Vzdálené/OneDrive/ &
|
|
||||||
notify-send -i system-file-manager "OneDrive disk PŘIPOJEN"
|
|
||||||
fi
|
|
@ -1,10 +0,0 @@
|
|||||||
[ ! -r ~/.config/pocketshaddrc ] && echo "\`~/.config/pocketshaddrc\` not found" && exit 1
|
|
||||||
. ~/.config/pocketshaddrc
|
|
||||||
|
|
||||||
curl -sS -X POST \
|
|
||||||
-F "url=$1" \
|
|
||||||
-F "title=$2" \
|
|
||||||
-F "consumer_key=$CONSUMER_KEY" \
|
|
||||||
-F "access_token=$ACCESS_TOKEN" \
|
|
||||||
https://getpocket.com/v3/add \
|
|
||||||
> /dev/null
|
|
@ -9,7 +9,7 @@ const path_home= $.xdg.home`Obrázky/Bing Image Of The Day/`;
|
|||||||
const path_info= join(path_home, "images.json");
|
const path_info= join(path_home, "images.json");
|
||||||
|
|
||||||
$.api()
|
$.api()
|
||||||
.version("2024-11-14")
|
.version("2025-04-02")
|
||||||
.command("pull", "Pull new/today image(s)")
|
.command("pull", "Pull new/today image(s)")
|
||||||
.action(async function pull(){
|
.action(async function pull(){
|
||||||
const images= {
|
const images= {
|
||||||
@ -24,6 +24,7 @@ $.api()
|
|||||||
{});
|
{});
|
||||||
convert(paths, images_save);
|
convert(paths, images_save);
|
||||||
s.echo(JSON.stringify(images_save, null, "\t")).to(path_info);
|
s.echo(JSON.stringify(images_save, null, "\t")).to(path_info);
|
||||||
|
newPanel(images_save.now);
|
||||||
$.exit(0);
|
$.exit(0);
|
||||||
})
|
})
|
||||||
.command("redraw")
|
.command("redraw")
|
||||||
@ -31,6 +32,7 @@ $.api()
|
|||||||
const paths= [ "now", "prev" ].map(key=> join(path_home, `${key}.jpg`));
|
const paths= [ "now", "prev" ].map(key=> join(path_home, `${key}.jpg`));
|
||||||
const images= s.cat(path_info).xargs(JSON.parse);
|
const images= s.cat(path_info).xargs(JSON.parse);
|
||||||
convert(paths, images);
|
convert(paths, images);
|
||||||
|
newPanel(images.now);
|
||||||
$.exit(0);
|
$.exit(0);
|
||||||
})
|
})
|
||||||
.command("status")
|
.command("status")
|
||||||
@ -41,6 +43,10 @@ $.api()
|
|||||||
$.exit(0);
|
$.exit(0);
|
||||||
})
|
})
|
||||||
.parse();
|
.parse();
|
||||||
|
function newPanel(caption){
|
||||||
|
const link= `<a href="https://commons.wikimedia.org/wiki/Template:Potd/${dateISO(0)} (cs)">(i)</a>`;
|
||||||
|
s.sed("-i", /\<aside\>.*?\<\/aside\>/, `<aside>${link} ${caption}</aside>`, join(path_home, "Nový panel.html"));
|
||||||
|
}
|
||||||
/** @typedef {{ url: string, caption: string }} T_response */
|
/** @typedef {{ url: string, caption: string }} T_response */
|
||||||
/** @typedef {Record<"now"|"prev",T_response>} T_images */
|
/** @typedef {Record<"now"|"prev",T_response>} T_images */
|
||||||
/** @param {Record<"now"|"prev",string>} paths */
|
/** @param {Record<"now"|"prev",string>} paths */
|
||||||
@ -96,8 +102,15 @@ async function getImagePath(shift= 0){
|
|||||||
prop: "wikitext",
|
prop: "wikitext",
|
||||||
text: `{{Potd/${date}}}`,
|
text: `{{Potd/${date}}}`,
|
||||||
});
|
});
|
||||||
|
const pluckCaption= response=> response.expandtemplates.wikitext;
|
||||||
|
const caption_fallback= await fetchGet({
|
||||||
|
action: "expandtemplates",
|
||||||
|
prop: "wikitext",
|
||||||
|
text: `{{Potd/${date} (en)}}`,
|
||||||
|
}).then(pluckCaption);
|
||||||
const caption= pipe(
|
const caption= pipe(
|
||||||
response=> response.expandtemplates.wikitext,
|
pluckCaption,
|
||||||
|
caption=> caption !== `[[:Template:Potd/${date} (cs)]]` ? caption : caption_fallback,
|
||||||
caption=> caption.replace(/\[\[.*?\]\]/g, m=> m.slice(2, -2).split("|").reverse()[0]),
|
caption=> caption.replace(/\[\[.*?\]\]/g, m=> m.slice(2, -2).split("|").reverse()[0]),
|
||||||
caption=> caption.replace(/''(.*?)''/g, "„$1”"),
|
caption=> caption.replace(/''(.*?)''/g, "„$1”"),
|
||||||
)(await fetchGet({
|
)(await fetchGet({
|
||||||
|
Reference in New Issue
Block a user