⚡
This commit is contained in:
parent
46e9b50a13
commit
04477c25bf
@ -152,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"; }
|
||||
aai(){
|
||||
[[ "$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-qnm='npx -y qnm'
|
||||
alias npx-hint='npx -y hint'
|
||||
alias npx-markdown='nohup npx markserv'
|
||||
alias npx-markdown='npx -y markserv'
|
||||
|
||||
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 @@'
|
||||
|
@ -11,11 +11,11 @@ alias C--asana='eval "$($HOME/bin/asana.mjs completion_bash)"'
|
||||
alias C--himalaya='\. "$BASH_DOTFILES/himalaya.completion"'
|
||||
alias C--uu='eval "$($HOME/bin/uu --completion-bash)"'
|
||||
alias C--jc='eval "$(jc -B)" … newer version needed'
|
||||
eval "$(bs .completion bash)"
|
||||
\. <(bs .completion bash)
|
||||
\. "$BASH_DOTFILES/cordova.completion"
|
||||
eval "$(node --completion-bash)"
|
||||
eval "$(npm completion)"
|
||||
eval "$(nodejsscript --completion bash)"
|
||||
\. <(node --completion-bash)
|
||||
\. <(npm completion)
|
||||
\. <(nodejsscript --completion bash)
|
||||
\. "$BASH_DOTFILES/pnpm.completion"
|
||||
|
||||
_npx() {
|
||||
|
3
.bashrc
3
.bashrc
@ -12,7 +12,8 @@ shopt -s expand_aliases
|
||||
[ -f $BASH_DOTFILES/.bash_sdkman ] && . $BASH_DOTFILES/.bash_sdkman
|
||||
[ -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 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
|
||||
|
||||
[[ $- != *i* ]] && return # If not running interactively, don't do anything
|
||||
|
@ -1,5 +1,41 @@
|
||||
# better? defaults
|
||||
[help]
|
||||
autocorrect = prompt
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[column]
|
||||
ui = auto
|
||||
[branch]
|
||||
sort = -committerdate
|
||||
[rebase]
|
||||
updateRefs = true
|
||||
[tag]
|
||||
sort = version:refname
|
||||
[status]
|
||||
submoduleSummary = true
|
||||
[log]
|
||||
date = iso
|
||||
[fetch]
|
||||
prune = true
|
||||
pruneTags = true
|
||||
all = true
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
followTags = true
|
||||
[rerere]
|
||||
enabled = true
|
||||
autoupdate = true
|
||||
[gc]
|
||||
reflogExpire = 200
|
||||
reflogExpireUnreachable = 90
|
||||
[commit]
|
||||
verbose = true
|
||||
gpgsign = true
|
||||
[rebase]
|
||||
autoSquash = true
|
||||
autoStash = true
|
||||
updateRefs = true
|
||||
# me
|
||||
[user]
|
||||
name = Jan Andrle
|
||||
email = andrle.jan@centrum.cz
|
||||
@ -7,6 +43,20 @@
|
||||
[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 =
|
||||
helper = !/usr/bin/gh auth git-credential
|
||||
[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
|
||||
# my setup
|
||||
[core]
|
||||
editor = vim
|
||||
pager = delta
|
||||
whitespace = -trailing-space,-space-before-tab
|
||||
[alias]
|
||||
# * replaced by git-extras
|
||||
aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920
|
||||
@ -28,52 +78,39 @@
|
||||
submodule-update-merge = submodule update --remote --merge
|
||||
set-upstream-to-current = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
|
||||
push-new=!git push -u origin `git rev-parse --abbrev-ref HEAD`
|
||||
[core]
|
||||
editor = vim
|
||||
pager = delta
|
||||
whitespace = -trailing-space,-space-before-tab
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[status]
|
||||
submoduleSummary = true
|
||||
[diff]
|
||||
tool = vimdiff
|
||||
colorMoved = default
|
||||
submodule = log
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
conflictstyle = diff3
|
||||
[log]
|
||||
date = iso
|
||||
algorithm = histogram
|
||||
# https://git-scm.com/docs/git-diff#Documentation/git-diff.txt-code--color-movedltmodegtcode
|
||||
colorMoved = dimmed-zebra
|
||||
mnemonicPrefix = true
|
||||
renames = true
|
||||
[interactive]
|
||||
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)
|
||||
syntax-theme= Visual Studio Dark+
|
||||
navigate = true
|
||||
side-by-side = true
|
||||
line-numbers = true
|
||||
[gc]
|
||||
reflogExpire = 200
|
||||
reflogExpireUnreachable = 90
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[rerere]
|
||||
enabled = true
|
||||
[credential "https://github.com"]
|
||||
helper =
|
||||
helper = !/usr/bin/gh auth git-credential
|
||||
[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
|
||||
[filter "lfs"]
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[diff "exif"]
|
||||
textconv = exiftool
|
||||
[difftool "kommitdiff"]
|
||||
cmd = kommitdiff \"$LOCAL\" \"$REMOTE\"
|
||||
[mergetool "kommitmerge"]
|
||||
cmd = kommitmerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
|
||||
trustExitCode = true
|
||||
|
||||
[maintenance]
|
||||
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/DGF-Certified-Supervisory-Academy
|
||||
repo = /home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy
|
@ -21,8 +21,8 @@
|
||||
"exec": "yes",
|
||||
"description": "AI Browser",
|
||||
"glare": "AppImage",
|
||||
"last_update": "2025-02-01T14:42:48Z",
|
||||
"version": "3.6.0",
|
||||
"last_update": "2025-03-25T01:43:01Z",
|
||||
"version": "3.7.1",
|
||||
"downloads": "/home/jaandrle/bin/pinokio"
|
||||
},
|
||||
{
|
||||
@ -136,9 +136,9 @@
|
||||
"group": "nondev",
|
||||
"file_name": "fedistar.appimage",
|
||||
"exec": "yes",
|
||||
"last_update": "2025-01-09T12:37:14Z",
|
||||
"last_update": "2025-03-03T15:06:09Z",
|
||||
"downloads": "/home/jaandrle/bin/fedistar.appimage",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.11.1",
|
||||
"glare": ".*amd64.*.AppImage"
|
||||
},
|
||||
{
|
||||
@ -148,9 +148,9 @@
|
||||
"group": "ai",
|
||||
"file_name": "ollama",
|
||||
"exec": "yes",
|
||||
"last_update": "2025-02-14T08:25:18Z",
|
||||
"last_update": "2025-03-22T02:56:08Z",
|
||||
"downloads": "/home/jaandrle/bin/ollama",
|
||||
"version": "v0.5.11",
|
||||
"version": "v0.6.3-rc0",
|
||||
"glare": "linux-amd64"
|
||||
},
|
||||
{
|
||||
@ -173,8 +173,8 @@
|
||||
"file_name": "vim",
|
||||
"exec": "yes",
|
||||
"downloads": "/home/jaandrle/bin/vim",
|
||||
"version": "v9.1.1106",
|
||||
"last_update": "2025-02-12T01:15:34Z",
|
||||
"version": "v9.1.1238",
|
||||
"last_update": "2025-03-26T01:19:17Z",
|
||||
"glare": "GVim.*x86_64.*.AppImage"
|
||||
},
|
||||
{
|
||||
@ -208,9 +208,9 @@
|
||||
"group": "ai",
|
||||
"file_name": "jan",
|
||||
"exec": "yes",
|
||||
"last_update": "2025-02-11T07:09:50Z",
|
||||
"last_update": "2025-03-24T02:02:04Z",
|
||||
"downloads": "/home/jaandrle/bin/jan",
|
||||
"version": "v0.5.15-rc9-beta",
|
||||
"version": "v0.5.16",
|
||||
"glare": ".*x86_64.*.AppImage"
|
||||
},
|
||||
{
|
||||
@ -234,8 +234,8 @@
|
||||
"exec": "yes",
|
||||
"downloads": "/home/jaandrle/bin/r-quick-share",
|
||||
"glare": ".*main.*amd64.AppImage",
|
||||
"last_update": "2025-01-14T08:36:53Z",
|
||||
"version": "v0.11.4"
|
||||
"last_update": "2025-02-23T18:15:49Z",
|
||||
"version": "v0.11.5"
|
||||
}
|
||||
]
|
||||
}
|
@ -9,4 +9,5 @@
|
||||
"signature_error_highlighting": "no_public_key",
|
||||
"theme": "Merge Dark.sublime-theme",
|
||||
"expand_merge_commits_by_default": true,
|
||||
"ignore_diff_white_space": false,
|
||||
}
|
||||
|
@ -27,19 +27,18 @@
|
||||
"" #region G – General
|
||||
" set vicmd=elvis\ -G\ termcap | " set vicmd=vile
|
||||
set vicmd=vim
|
||||
"set vimhelp
|
||||
command! README :!vim ~/Dokumenty/GitHub/dotfiles/vifm/README.md
|
||||
command! Help :!vim ~/.config/vifm/vifm-help.txt
|
||||
map <f1> :Help<cr>
|
||||
cabbrev help Help
|
||||
" cabbrev help Help
|
||||
set vimhelp
|
||||
if !has('win')
|
||||
set fusehome=/tmp/vifm_FUSE
|
||||
set slowfs=curlftpfs
|
||||
endif
|
||||
set syscalls norunexec
|
||||
" Automatically resolve symbolic links on l or Enter.
|
||||
set nofollowlinks
|
||||
set trash
|
||||
set notrash
|
||||
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>
|
||||
set history=100 undolevels=100
|
||||
@ -291,8 +290,8 @@
|
||||
fileviewer <video/*>,<audio/*> mediainfo %c
|
||||
endif
|
||||
" #endregion FmediaBin
|
||||
fileviewer .*/,*/ tree %c -L 3 &
|
||||
fileviewer ../ tree %c -L 1 &
|
||||
fileviewer .*/,*/ tree %c -L 3 -C &
|
||||
fileviewer ../ tree %c -L 1 -C &
|
||||
fileviewer *.js,*.mjs,*.ts,*.sh,
|
||||
\*.css,*.scss,
|
||||
\*.php,
|
||||
|
@ -1,3 +1,5 @@
|
||||
Include /home/jaandrle/.config/colima/ssh_config
|
||||
|
||||
Host vpsfree
|
||||
HostName 37.205.11.208
|
||||
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
|
124
.vimrc
124
.vimrc
@ -1,4 +1,4 @@
|
||||
""" VIM config file | Jan Andrle | 2025-01-08 (VIM >=9.1 AppImage)
|
||||
""" VIM config file | Jan Andrle | 2025-04-05 (VIM >=9.1 AppImage)
|
||||
"" #region B – Base
|
||||
scriptencoding utf-8 | set encoding=utf-8
|
||||
set pythonthreedll=/lib/x86_64-linux-gnu/libpython3.12.so.1.0
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
set title
|
||||
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 belloff=esc
|
||||
set confirm
|
||||
@ -88,21 +88,15 @@
|
||||
cabbrev wbw w<bar>bw
|
||||
|
||||
set sessionoptions-=options
|
||||
" TODO DEL
|
||||
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")
|
||||
execute 'hi! User2 ctermbg='.synIDattr(synIDtrans(hlID('StatusLine')), 'bg').' ctermfg=grey' | endif
|
||||
function! NumberOfBuffers()
|
||||
return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
|
||||
endfunction
|
||||
set laststatus=2 " Show status line on startup
|
||||
set statusline+=··%1*≡·%{QuickFixStatus()}%*··%2*»·%{user_tips#current()}%*··%=
|
||||
set statusline+=%<%f%R\%M··▶·%{&fileformat}·%{&fileencoding?&fileencoding:&encoding}·%{&filetype}··∷·%{mini_sessions#name('–')}··
|
||||
set statusline+=··≡·%{QuickFixStatus()}%*··»·%{user_tips#current()}%*··%=
|
||||
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 nobackup nowritebackup noswapfile " …there is issue #649 (for servers) and I’m using git/system backups
|
||||
@ -112,8 +106,7 @@
|
||||
command! SETundoClear let old_undolevels=&undolevels | set undolevels=-1 | exe "normal a \<BS>\<Esc>" | let &undolevels=old_undolevels | unlet old_undolevels | write
|
||||
"" #endregion SLH
|
||||
"" #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=number | else | set signcolumn=yes | endif " show always to prevent shifting when diagnosticappears
|
||||
set signcolumn=yes
|
||||
set cursorline cursorcolumn " Always show current position
|
||||
set number foldcolumn=2 " enable line numbers and add a bit extra margin to the left
|
||||
set colorcolumn=+1 " …marker visual
|
||||
@ -145,18 +138,12 @@
|
||||
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>š :CtrlPBuffer<cr>
|
||||
nmap <leader>š :CocList buffers<cr>
|
||||
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
|
||||
"" #region FOS – File(s) + Openning + Saving
|
||||
set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime
|
||||
@ -197,7 +184,7 @@
|
||||
set grepprg=LC_ALL=C\ grep\ -HRIns
|
||||
set hlsearch incsearch " highlight search, start when typing
|
||||
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_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
|
||||
@ -227,8 +214,9 @@
|
||||
let g:rainbow#blacklist = [203,9]
|
||||
autocmd VimEnter * try
|
||||
\| call rainbow_parentheses#toggle() | catch | endtry
|
||||
" HIGHLIGHT&YANK plugins machakann/vim-highlightedyank & cwordhi.vim
|
||||
let g:highlightedyank_highlight_duration= 250
|
||||
" HIGHLIGHT&YANK plugins (buildin) hlyank & cwordhi.vim
|
||||
packadd hlyank
|
||||
let g:hlyank_duration= 250
|
||||
let g:cwordhi#autoload= 1
|
||||
set showmatch " Quick highlight oppening bracket/… for currently writted
|
||||
set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape TAB
|
||||
@ -245,11 +233,12 @@
|
||||
if ($TERM =~ '256' && has("termguicolors"))
|
||||
set termguicolors | endif
|
||||
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 redrawtime=10000
|
||||
augroup syntax_sync_min_lines
|
||||
autocmd!
|
||||
autocmd Syntax * syn sync minlines=2000
|
||||
autocmd BufEnter * syntax sync fromstart "TODO DEL syn sync minlines=2000
|
||||
augroup END
|
||||
let g:vim_vue_plugin_config = { 'foldexpr': 1, 'attribute': 1, 'keyword': 1 }
|
||||
" SPELL
|
||||
@ -261,7 +250,7 @@
|
||||
nnoremap <leader>O O<space><bs><esc>
|
||||
nnoremap <s-k> a<cr><esc>
|
||||
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: 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
|
||||
@ -275,41 +264,6 @@
|
||||
autocmd BufWinEnter *.* silent! loadview
|
||||
augroup END
|
||||
"" #endregion EA
|
||||
"" #region GIT
|
||||
function s:gitCompletion(_, CmdLine, __)
|
||||
let l:cmd= a:CmdLine->split()
|
||||
let l:cmd_start= l:cmd[0]
|
||||
\ ->substitute('GIThub', 'gh', '')
|
||||
\ ->substitute('GIT', 'git ', '')->trim()->split(' ')
|
||||
return bash#complete((l:cmd_start+l:cmd[1:])->join())
|
||||
endfunction
|
||||
function s:gitCmd(candidate)
|
||||
execute '!clear && echo ":: git '.a:candidate->escape('"').' ::" && git '.a:candidate
|
||||
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--interactive-v <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
|
||||
"" #endregion GIT
|
||||
"" #region AI
|
||||
let g:codeium_disable_bindings = 1
|
||||
imap <script><silent><nowait><expr> <f3><f3> codeium#Accept()
|
||||
@ -321,7 +275,7 @@ imap <f3>d <Cmd>call codeium#Clear()<CR>
|
||||
imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
"" #endregion AI
|
||||
"" #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
|
||||
call coc#config('languageserver.cssmodules', {
|
||||
\ "command": "cssmodules-language-server",
|
||||
@ -353,7 +307,7 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent><nowait> gd <Plug>(coc-definition)
|
||||
command! -nargs=* -complete=customlist,<sid>SCommandCocActionComplete CocAction call CocActionAsync(<f-args>)
|
||||
function s:SCommandCocActionComplete(argLead, cmdLine, cursorPos)
|
||||
return readfile(expand('~/.vim/pack/coc/start/coc.nvim/doc/tags'), 'r')
|
||||
@ -364,8 +318,8 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
" navigate diagnostics, use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||
nnoremap <silent> gh :call <sid>show_documentation(expand("<cword>"))<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>
|
||||
vnoremap <leader>gf :<c-u>let g:ctrlp_default_input=mini_enhancement#selectedText() <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>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.)
|
||||
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>"
|
||||
@ -379,7 +333,7 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
|
||||
command! -nargs=? CLhelpMy if <q-args>!='' | exec 'map '.<q-args> | else | call popup_notification([
|
||||
\ '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',
|
||||
\], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) | endif
|
||||
nnoremap <c-g> :CLwhereami<cr>
|
||||
@ -415,27 +369,6 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
\ CLcheat call cheat_copilot#open(<q-args>==''?&filetype:<q-args>)
|
||||
|
||||
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 &filetype=='man' | call dist#man#PreGetPage(0) | return 0 | endif
|
||||
return feedkeys('K', 'in')
|
||||
@ -446,9 +379,6 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
|
||||
return CocActionAsync('doHover')
|
||||
endfunction
|
||||
function! s:show_documentation_vim(cmd)
|
||||
call execute(a:cmd) | call histadd("cmd", a:cmd)
|
||||
endfunction
|
||||
"" #endregion COC
|
||||
|
||||
" vim: set textwidth=250 :
|
||||
|
1685
bin/README.md
1685
bin/README.md
File diff suppressed because it is too large
Load Diff
@ -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");
|
||||
|
||||
$.api()
|
||||
.version("2025-01-06")
|
||||
.version("2025-04-02")
|
||||
.command("pull", "Pull new/today image(s)")
|
||||
.action(async function pull(){
|
||||
const images= {
|
||||
@ -24,6 +24,7 @@ $.api()
|
||||
{});
|
||||
convert(paths, images_save);
|
||||
s.echo(JSON.stringify(images_save, null, "\t")).to(path_info);
|
||||
newPanel(images_save.now);
|
||||
$.exit(0);
|
||||
})
|
||||
.command("redraw")
|
||||
@ -31,6 +32,7 @@ $.api()
|
||||
const paths= [ "now", "prev" ].map(key=> join(path_home, `${key}.jpg`));
|
||||
const images= s.cat(path_info).xargs(JSON.parse);
|
||||
convert(paths, images);
|
||||
newPanel(images.now);
|
||||
$.exit(0);
|
||||
})
|
||||
.command("status")
|
||||
@ -41,6 +43,10 @@ $.api()
|
||||
$.exit(0);
|
||||
})
|
||||
.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 {Record<"now"|"prev",T_response>} T_images */
|
||||
/** @param {Record<"now"|"prev",string>} paths */
|
||||
|
Loading…
x
Reference in New Issue
Block a user