This has become the Filepicker.vim plug-in.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add the following snippet to your vimrc or put it into (Neo)Vim's plugin dir | |
" to grep interactively in the current work dir. | |
" Open the topmost file in (Neo)Vim by hitting <F2>. | |
" Requires [ugrep](https://github.com/Genivia/ugrep), a drop-in alternative to grep | |
" similar to ripgrep. | |
let s:term = has('nvim') ? 'term' : 'term ++close' | |
let s:cmd = 'ugrep --config --query --no-confirm --view='..shellescape(v:progpath) | |
let s:cleanup = has('nvim') ? 'autocmd TermClose <buffer=abuf> if !v:event.status |bwipeout!| endif' : 'redraw!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
command -v zypper >/dev/null 2>&1 || return 1 | |
# Zypper {{{1 | |
zcommands=( | |
licenses ps shell source-download tos vcmp if patch-info pattern-info product-info pt se wp | |
) | |
len=${#zcommands[*]} | |
for (( i=0; i<len; i++ )); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
command -v apt >/dev/null 2>&1 || return 1 | |
# apt commands {{{ | |
apt_commands=( | |
"ls list" | |
"cl changelog" | |
"se search" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Better gx to open URLs. | |
" | |
" Adapted from https://github.com/habamax/.vim/blob/d5087779fee4a7372c1dd2c407674997fdb1268d/autoload/os.vim | |
" to use in particular :Open command from https://gist.github.com/Konfekt/8e484af2955a0c7bfe82114df683ce0f | |
" See also https://gist.github.com/AndrewRadev/1ba9eba62df82d616fc8040338c4c4e1 | |
" URL regexes | |
let s:regex_url = '\%(\%(http\|ftp\|irc\)s\?\|file\)://\S\{-}' | |
func! s:GetURL() abort |
This has become the local-viminfo plug-in.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pacman -S \ | |
--needed \ | |
base-devel \ | |
mingw-w64-ucrt-x86_64-toolchain \ | |
cmake \ | |
mingw-w64-ucrt-x86_64-cmake-gui \ | |
\ | |
ctags \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Adaption of https://github.com/tom-doerr/fix/blob/main/main.py | |
This script executes a program. | |
If the program throws an error, the script generates suggestions | |
for fixing the error. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Swap Alt+Tab and Win+Tab | |
; From https://www.autohotkey.com/boards/viewtopic.php?style=19&p=548067&sid=dfc532a1b55a0d25862c8ee98674e0db#p548067 | |
#HotIf WinActive("ahk_class XamlExplorerHostIslandWindow") | |
*!Tab::Send("{Alt Down}{Right}") | |
~*Alt Up::Send("{Enter}") | |
#HotIf | |
*!Tab::#Tab | |
; From https://www.autohotkey.com/docs/v2/Hotkeys.htm#AltTabWindow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# for each file, either back it up or restore it, in case it ends in a bkp extension | |
for f in "$@"; do | |
p="${f%/}" | |
[ "$p" != "${p%.bkp}" ] && | |
cp --archive --interactive --update --verbose "$p" "${p%.bkp}" || | |
cp -aiuv "${p}" "$p.bkp" | |
done; } |
NewerOlder