__ _______ __ __ _____ _ _
\ \ / /_ _| \/ | _ / ____| | (_)
\ \ / / | | | \ / | _| |_ | | | | ___ _ _ _ _ __ ___
\ \/ / | | | |\/| | |_ _| | | | |/ _ \| | | | | '__/ _ \
\ / _| |_| | | | |_| | |____| | (_) | | |_| | | | __/
\/ |_____|_| |_| \_____|_|\___/| |\__,_|_| \___|
_/ |
|__/
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 | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
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 cot=menu,menuone | |
ino <BS> <BS><C-r>=getline('.')[col('.')-3:col('.')-2]=~#'\k\k'?!pumvisible()?"\<lt>C-n>\<lt>C-p>":'':pumvisible()?"\<lt>C-y>":''<CR> | |
ino <CR> <C-r>=pumvisible()?"\<lt>C-y>":""<CR><CR> | |
ino <Tab> <C-r>=pumvisible()?"\<lt>C-n>":"\<lt>Tab>"<CR> | |
ino <S-Tab> <C-r>=pumvisible()?"\<lt>C-p>":"\<lt>S-Tab>"<CR> | |
augroup MyAutoComplete | |
au! | |
au InsertCharPre * if |
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
"with your cursor on a line or a block selected, type `:HL` | |
"to remove, on each line call :sign unplace | |
highlight HL ctermbg=darkgray | |
sign define hl linehl=HL | |
let s:highlightLineSignId = 74000 | |
function! g:HighlightLine() | |
execute 'sign place' s:highlightLineSignId 'line='.line(".") 'name=hl' 'file='.expand("%") | |
let s:highlightLineSignId += 1 | |
endfunction | |
command! HL call g:HighlightLine() |
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
$ FILE=/some/path/to/file.txt | |
################################### | |
### Remove matching suffix pattern | |
################################### | |
$ echo ${FILE%.*} # remove ext | |
/some/path/to/file | |
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |