This has become the single-file-git.vim plug-in building on single-file-git
This file contains hidden or 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
| Set-ExecutionPolicy Bypass -Scope Process -Force | |
| [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 | |
| iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco feature enable -n=allowGlobalConfirmation | |
| # remove bloat as in | |
| # https://lifehacker.com/you-can-get-rid-of-windows-bloatware-with-one-command-1848707156 | |
| iwr -useb https://git.io/debloat | iex | |
| iwr -useb https://christitus.com/win | iex |
This file contains hidden or 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
| " Generate compile_commands.json for clangd. | |
| " Prefer CMake export, else Ninja compdb, else Bear + Make with optional append. | |
| if exists('b:did_c_compdb_ftplugin') | finish | endif | |
| let b:did_c_compdb_ftplugin = 1 | |
| let s:inflight = {} | |
| augroup c_compdb | |
| autocmd! * <buffer> |
This file contains hidden or 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
| if !executable('aichat') | finish | endif | |
| function! s:ProcessInstruction(instruction) abort | |
| let instruction = trim(a:instruction) | |
| if instruction[0] ==# '/' | |
| let i = match(instruction..' ', '\s') | |
| if i > 1 | |
| " Extract the role and the remaining instruction | |
| let role = instruction[1:i-1] |
This file contains hidden or 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
| # To make Mise work in MSYS2/Cygwin, see | |
| # https://github.com/jdx/mise/discussions/3961#discussioncomment-16024383 | |
| # -- 1. Locate the mise binary ------------------------------------------ | |
| local mise_bin="" | |
| if [[ -n "$MSYSTEM" ]]; then | |
| # MSYS2 / Cygwin: prefer the Windows-native exe resolved through cygpath | |
| local scoop_shim_dir="$(/usr/bin/cygpath -u "$USERPROFILE")/scoop/shims" | |
| local scoop_mise="${scoop_shim_dir}/mise" |
This file contains hidden or 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 | |
| # git worktrees enable working with differing dependencies: | |
| # auto-install common dependencies on worktree creation by this | |
| # post-checkout hook; drop insto post-checkout.d with multihook : | |
| # https://gist.github.com/Konfekt/d9e86763b0f3febd7b2f7ca589f6c482 | |
| set -Eeuo pipefail | |
| if ((BASH_VERSINFO[0] > 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 4))); then |
This file contains hidden or 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 | |
| # | |
| # This script is meant to be put into a directory pointed to by core.hooksPath | |
| # in Git 2.9. | |
| # Then for each hook you want to support, create a directory "hookname.d" and | |
| # a symlink "hookname -> stub", and put all scripts for that hook into the | |
| # hookname.d directory. | |
| # | |
| # - ./HOOKNAME.d/* | |
| # - $GIT_CUSTOM_HOOKS_DIR/HOOKNAME.d/* |
This file contains hidden or 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
| " Set &grepprg to rg, ugrep, git grep or grep otherwise. | |
| " Assumes a global ignore file `$XDG_CONFIG_HOME/grep/ignore`; create it by, | |
| " say `touch ~/.config/grep/ignore` to ensure its existence. | |
| augroup vimrcGrep | |
| autocmd! | |
| augroup END | |
| " Scheduling niceness on Linux. | |
| let s:scheduler = (has('unix') && executable('chrt') && executable('ionice')) |
This file contains hidden or 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
| " Purpose: Fast file finding via 'findfunc', with caching and git-aware file listing. | |
| augroup vimrcFind | |
| autocmd! | |
| augroup END | |
| " Scheduling niceness on Linux. | |
| let s:scheduler = has('unix') && executable('chrt') && executable('ionice') ? | |
| \ 'chrt --idle 0 ionice -c2 -n7 ' : '' |
This file contains hidden or 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 | |
| # trace exit on error of program or pipe (or use of undeclared variable) | |
| set -o errtrace -o errexit -o pipefail # -o nounset | |
| # optionally debug output by supplying TRACE=1 | |
| [[ "${TRACE:-0}" == "1" ]] && set -o xtrace | |
| if [[ "${BASH_VERSINFO:-0}" -gt 4 || ( "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 ) ]]; then | |
| shopt -s inherit_errexit | |
| fi |
NewerOlder