⚡ bash hooks + vim clean up
This commit is contained in:
@@ -1 +1,2 @@
|
||||
#!/bin/env bash
|
||||
[[ -f "/dev/shm/bash/$BASHPID/oncd" ]] && source "/dev/shm/bash/$BASHPID/oncd"
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/env bash
|
||||
[[ -f "/dev/shm/bash/$BASHPID/onexit" ]] && source "/dev/shm/bash/$BASHPID/onexit"
|
||||
rm -rf /dev/shm/bash/$BASHPID
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#! /bin/env bash
|
||||
if [[ -x /usr/bin/neofetch ]]; then
|
||||
neofetch
|
||||
fi
|
||||
@@ -1,2 +1,3 @@
|
||||
#!/bin/env bash
|
||||
[[ -f "/dev/shm/bash/$BASHPID/onprompt" ]] && source "/dev/shm/bash/$BASHPID/onprompt"
|
||||
history -a
|
||||
|
||||
@@ -10,5 +10,3 @@ shopt -s globstar 2>/dev/null || true # Recursive globbing
|
||||
# Auto-correct
|
||||
shopt -s cdspell
|
||||
shopt -s dirspell 2>/dev/null || true
|
||||
|
||||
[[ -x /usr/bin/neofetch ]] && neofetch
|
||||
|
||||
@@ -5,6 +5,6 @@ export HISTCONTROL="ignoreboth:erasedups"
|
||||
shopt -s histappend cmdhist
|
||||
export HISTFILESIZE=10000
|
||||
export HISTSIZE="$HISTFILESIZE"
|
||||
export HISTIGNORE="?? :but:but rub *:but commit:but ?? ?? :tree:vim:git info:git i:git lazy:git l"
|
||||
export HISTIGNORE="?? :but:but rub *:but commit:but ?? ?? :tree:vim:git:git info:git i:git lazy:git l"
|
||||
|
||||
bind '"\C-@": "\e^I history | grep '\''\e\e^A'\''\e\ei"'
|
||||
|
||||
@@ -39,3 +39,7 @@ Development tool configurations including aliases and environment managers.
|
||||
- Contains development tools and shortcuts
|
||||
- Environment managers handle Java, Node.js, PHP, Gradle versions
|
||||
- Automatically sourced by main `.bashrc`
|
||||
|
||||
## Todo
|
||||
|
||||
- special behaviour inside dolphin? ([`if [[ $(ps -o comm= -p $PPID) == dolphin ]]; then …`](https://unix.stackexchange.com/a/775802))
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# vim: filetype=bash
|
||||
export OLDPWD="/home/jaandrle/Dokumenty/Projekty/CommaFeedPodcasts"
|
||||
export OLDPWD="/home/jaandrle/Vzdálené/GitHub/facilitator-network-cell"
|
||||
export mwdcp='/home/jaandrle/Vzdálené/GitHub/dcp-fe-container-certifedpassport'
|
||||
export mdde='/home/jaandrle/Vzdálené/GitHub/deka-dom-el'
|
||||
export mwdgf='/home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy'
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
"exec": "yes",
|
||||
"description": "AI Browser",
|
||||
"glare": "AppImage",
|
||||
"last_update": "2026-04-15T14:22:20Z",
|
||||
"version": "v7.2.0",
|
||||
"last_update": "2026-04-18T21:36:57Z",
|
||||
"version": "v7.2.6",
|
||||
"downloads": "/home/jaandrle/.local/bin/pinokio"
|
||||
},
|
||||
{
|
||||
@@ -111,9 +111,9 @@
|
||||
"group": "nondev",
|
||||
"file_name": "fedistar.appimage",
|
||||
"exec": "yes",
|
||||
"last_update": "2026-03-16T00:48:08Z",
|
||||
"last_update": "2026-04-29T05:16:21Z",
|
||||
"downloads": "/home/jaandrle/.local/bin/fedistar.appimage",
|
||||
"version": "v1.12.8",
|
||||
"version": "v1.13.0",
|
||||
"glare": ".*amd64.*.AppImage"
|
||||
},
|
||||
{
|
||||
@@ -136,9 +136,9 @@
|
||||
"file_name": "vim",
|
||||
"exec": "yes",
|
||||
"downloads": "/home/jaandrle/.local/bin/vim",
|
||||
"version": "v9.2.0360",
|
||||
"version": "v9.2.0413",
|
||||
"glare": "GVim.*x86_64.*.AppImage",
|
||||
"last_update": "2026-04-17T02:20:55Z"
|
||||
"last_update": "2026-04-29T02:46:09Z"
|
||||
},
|
||||
{
|
||||
"repository": "viarotel-org/escrcpy",
|
||||
@@ -147,9 +147,9 @@
|
||||
"group": "dev",
|
||||
"file_name": "escrcpy.appimage",
|
||||
"exec": "yes",
|
||||
"last_update": "2026-04-07T11:27:21Z",
|
||||
"last_update": "2026-04-24T10:29:24Z",
|
||||
"downloads": "/home/jaandrle/.local/bin/escrcpy.appimage",
|
||||
"version": "v2.8.1",
|
||||
"version": "v2.9.0",
|
||||
"glare": ".*x86_64.*.AppImage"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -73,8 +73,7 @@ set keytranslatemap {"ě":";",";":":"}
|
||||
bindurl ^https://mail.centrum.cz/* ;; composite hint_focus ; js document.activeElement.dispatchEvent(new CustomEvent("mouseover"))
|
||||
bind --mode=normal ;gt hint -c [tabindex]
|
||||
|
||||
bind š tab #
|
||||
bind sš fillcmdline tab
|
||||
bind ž fillcmdline tab
|
||||
|
||||
" b→t→n to make more consistent with gn*
|
||||
unbind --mode=normal b
|
||||
|
||||
@@ -3,7 +3,7 @@ AntiAliasFonts=true
|
||||
BoldIntense=true
|
||||
ColorScheme=DarkPastels
|
||||
DimmValue=54
|
||||
Font=BlexMono Nerd Font Mono Medium,8,-1,5,500,0,0,0,0,0,0,0,0,0,0,1,Regular
|
||||
Font=BlexMono Nerd Font Mono,8,-1,5,500,0,0,0,0,0,0,0,0,0,0,1,Medium
|
||||
UseFontLineChararacters=true
|
||||
|
||||
[General]
|
||||
|
||||
+34
-45
@@ -1,4 +1,4 @@
|
||||
""" VIM config file | Jan Andrle | 2026-03-05 (VIM >=9.2 AppImage)
|
||||
""" VIM config file | Jan Andrle | 2026-05-05 (VIM >=9.2 AppImage)
|
||||
"" #region B – Base
|
||||
scriptencoding utf-8 | set encoding=utf-8
|
||||
set pythonthreedll=/lib/x86_64-linux-gnu/libpython3.12.so.1.0
|
||||
@@ -12,15 +12,9 @@
|
||||
packadd! cfilter
|
||||
let g:ft_man_folding_enable = 1
|
||||
runtime! ftplugin/man.vim
|
||||
" set hidden
|
||||
|
||||
execute 'source' fnameescape(s:root . '/rc-cat.vim')
|
||||
|
||||
cabbrev <expr> %PWD% execute('pwd')
|
||||
cabbrev <expr> %CD% fnameescape(expand('%:p:h'))
|
||||
cabbrev <expr> %CS% mini_enhancement#selectedText()
|
||||
cabbrev <expr> %CW% echo '<c-r><c-w>'
|
||||
|
||||
let mapleader = "\\"
|
||||
" better for my keyboard, but maybe use `:help keymap`?
|
||||
nnoremap § @
|
||||
@@ -29,22 +23,27 @@
|
||||
nnoremap ; :
|
||||
nnoremap <leader>u U
|
||||
nnoremap U <c-r>
|
||||
nnoremap ž <c-]>
|
||||
nnoremap <c-up> <c-y>
|
||||
nnoremap <c-down> <c-e>
|
||||
" <c-bs>
|
||||
imap <c-w>
|
||||
cmap <c-w>
|
||||
" use tab/s-tab for tabnex/tabNext
|
||||
nnoremap <silent><tab> :tabnext<cr>
|
||||
nnoremap <silent><s-tab> :tabprevious<cr>
|
||||
nnoremap <silent>]t :tabnext<cr>
|
||||
nnoremap <silent>[t :tabprevious<cr>
|
||||
nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
||||
nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
|
||||
" history checkpoints
|
||||
for key in ['<C-u>', '<C-w>', '<CR>', '.']
|
||||
execute printf('inoremap %s <C-g>u%s', key, key)
|
||||
endfor
|
||||
|
||||
set diffopt+=algorithm:patience,inline:word,linematch:60
|
||||
augroup vimrc_help
|
||||
autocmd!
|
||||
autocmd BufEnter *.txt if &buftype == 'help' | wincmd L | vertical resize 90 | endif
|
||||
augroup END
|
||||
|
||||
if has('langmap') && exists('+langremap') && &langremap
|
||||
set nolangremap
|
||||
endif
|
||||
""" #region BB – Build-in plugins
|
||||
" https://github.com/rbtnn/vim-gloaded/blob/master/plugin/gloaded.vim
|
||||
let g:loaded_vimballPlugin = 1 " :h pi_vimball … for plugin creators
|
||||
@@ -52,9 +51,6 @@
|
||||
""" #endregion BB
|
||||
"" #endregion B
|
||||
"" #region H – Helpers
|
||||
command! -nargs=0
|
||||
\ ALTredrawSyntax edit | exec 'normal `"' | exec 'set ft='.&ft
|
||||
|
||||
let g:quickfix_len= 0
|
||||
function! QuickFixStatus() abort
|
||||
hi! link User1 StatusLine
|
||||
@@ -81,7 +77,7 @@
|
||||
|
||||
cabbrev wbw w<bar>bw
|
||||
|
||||
set sessionoptions-=options
|
||||
set sessionoptions-=options " causes more problems than it solves
|
||||
|
||||
function! NumberOfBuffers()
|
||||
return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
|
||||
@@ -90,7 +86,6 @@
|
||||
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
|
||||
@@ -106,7 +101,11 @@
|
||||
command! HELPtextwidth echo "textwidth=".&textwidth." colorcolumn=".&colorcolumn
|
||||
set nowrap " Don't wrap long lines by default
|
||||
set breakindent breakindentopt=shift:2 showbreak=↳
|
||||
set scrolloff=5 sidescrolloff=10 " offset for lines/columns when scrolling
|
||||
set scrolloff=5 sidescrolloff=10 sidescroll=1 " offset for lines/columns when scrolling
|
||||
set display+=lastline
|
||||
if has('patch-7.4.2109')
|
||||
set display+=truncate
|
||||
endif
|
||||
"" #endregion LLW
|
||||
"" #region CN – Clipboard + Navigation throught Buffers + Windows + … (CtrlP)
|
||||
set pastetoggle=<F2> | nnoremap <F2> :set invpaste paste?<CR>
|
||||
@@ -128,12 +127,8 @@
|
||||
endfunction
|
||||
nnoremap <silent> <leader>" :call JaaCopyRegister()<cr>
|
||||
|
||||
" CtrlP previously
|
||||
nmap <expr> š buffer_number("#")==-1 ? ":CocList --normal buffers\<cr>" : "\<c-^>"
|
||||
nmap ě :CocList
|
||||
nmap <leader>3 :buffers<cr>:b<space>
|
||||
nmap <leader>š :CocList buffers<cr> | :syntax on<cr>
|
||||
nmap č <leader>š
|
||||
nmap ž :CocList buffers<cr> | :syntax on<cr>
|
||||
nmap <leader>ž :buffers<cr>:buffer
|
||||
"" #endregion CN
|
||||
"" #region FOS – File(s) + Openning + Saving
|
||||
set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime
|
||||
@@ -176,10 +171,10 @@
|
||||
command! Explore call Explore()
|
||||
nmap <silent> <leader>e :Explore<cr>
|
||||
nnoremap gx :silent exec "!xdg-open '".shellescape(substitute(expand('<cfile>'), '?', '\\?', ''), 1)."'" \| redraw!<cr>
|
||||
vnoremap gx :silent exec "!xdg-open '".shellescape(substitute(mini_enhancement#selectedText(), '?', '\\?', ''), 1)."'" \| redraw!<cr>
|
||||
vnoremap gx :silent exec "!xdg-open '".shellescape(substitute('<c-r>*', '?', '\\?', ''), 1)."'" \| redraw!<cr>
|
||||
"" #endregion FOS
|
||||
"" #region EN – Editor navigation + search
|
||||
set grepprg=LC_ALL=C\ grep\ -HRIns
|
||||
set grepprg=LC_ALL=C\ grep\ -HRIns\ $*\ /dev/null
|
||||
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 " TODO? <bar>syntax sync fromstart
|
||||
@@ -189,6 +184,15 @@
|
||||
nmap <Leader>m <Plug>ToggleMarkbar
|
||||
"" #endregion EN
|
||||
"" #region EA – Editing adjustment + Syntax + White chars + Folds
|
||||
" Correctly highlight $() and other modern affordances in filetype=sh.
|
||||
if !exists('g:is_posix') && !exists('g:is_bash') && !exists('g:is_kornshell') && !exists('g:is_dash')
|
||||
let g:is_posix = 1
|
||||
endif
|
||||
nnoremap Y y$
|
||||
for pair in ['<>', '()', '{}', '[]', '""', "''", '``']
|
||||
execute printf('inoremap %s <C-g>u%s<Left>', pair, pair)
|
||||
execute printf('cnoremap %s %s<Left>', pair, pair)
|
||||
endfor
|
||||
" surround `:echo char2nr(…)`
|
||||
let g:surround_8222= "„\r”"
|
||||
let g:surround_8218= "‚\r’"
|
||||
@@ -264,7 +268,6 @@
|
||||
" EDIT HEPERS
|
||||
nnoremap <leader>o o<space><bs><esc>
|
||||
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.'map <leader>'.l.' "+'.l | endfor | endfor " no noremap ⇐ https://github.com/jasonccox/vim-wayland-clipboard?tab=readme-ov-file#non-recursive-mappings
|
||||
command HELPfold echo 'foldmethod='.&foldmethod.' foldlevel='.&foldlevel.' foldnestmax='.&foldnestmax
|
||||
@@ -298,17 +301,6 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
\ "settings": {}
|
||||
\ })
|
||||
autocmd FileType scss setl iskeyword+=@-@
|
||||
function! CustomKeyWord(word)
|
||||
if(a:word=="gulp_place")
|
||||
highlight link gulp_place ErrorMsg
|
||||
syntax match gulp_place "gulp_place"
|
||||
augroup gulp_place
|
||||
autocmd!
|
||||
autocmd BufEnter *.{js,html} syntax match gulp_place "gulp_place"
|
||||
augroup END
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
set completeopt=menuone,longest,preview "longest vs ,noinsert,noselect
|
||||
inoremap <silent><expr> <F1> coc#pum#visible() ? coc#pum#confirm() : coc#refresh()
|
||||
@@ -332,10 +324,10 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
\ : []
|
||||
endfunction
|
||||
" 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 <silent> K :call <sid>show_documentation(expand("<cword>"))<cr>
|
||||
vnoremap <silent> K :<c-u>call <sid>show_documentation('<c-r>*"')<cr>
|
||||
nnoremap <leader>gf :CocList --normal --input='<c-r>=expand("<cword>")<cr>' g
|
||||
vnoremap <leader>gf :<c-u>CocList --normal --input='<c-r>=mini_enhancement#selectedText()<cr>' g
|
||||
vnoremap <leader>gf :<c-u>CocList --normal --input='<c-r>*' g
|
||||
""" #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>"
|
||||
@@ -364,9 +356,6 @@ imap <f3>! <Cmd>call codeium#Complete()<CR>
|
||||
command! CLhelpCocAction call feedkeys(':<c-u>help CocAction('' ', 'tn')
|
||||
command! CLrepeatLastChange call feedkeys('/\V<C-r>"<CR>cgn<C-a><Esc>', 'tn')
|
||||
|
||||
command! -nargs=?
|
||||
\ CLcheat call cheat_copilot#open(<q-args>==''?&filetype:<q-args>)
|
||||
|
||||
function! s:show_documentation(word)
|
||||
if (!CocAction('hasProvider', 'hover'))
|
||||
if &filetype=='man' | call dist#man#PreGetPage(0) | return 0 | endif
|
||||
|
||||
Reference in New Issue
Block a user