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
" A little annoying becuase NrrwRgn doesn't seem to be well suited for this. | |
" But, it gets the job done. | |
" Uses <leader>i in normal mode to open the split. | |
function! s:nrrw_head() abort | |
let saved = winsaveview() | |
keepjumps normal! 1G | |
let start = 1 | |
let end = search('^\%(def\|class\)\s', 'ncW') | |
if !end |
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
function edit-command-line() { | |
tmpfile=$(mktemp -t zsheditXXXXXXXX.sh) | |
print -R - "$PREBUFFER$BUFFER" > $tmpfile | |
editor=${VISUAL:-${EDITOR:-vi}} | |
args=() | |
if [[ "$editor" =~ vim ]]; then | |
pb=${#PREBUFFER} | |
(( b=pb+CURSOR )) | |
args+=("-c" ":call cursor(byte2line($b), ($b - $pb) + 1)") | |
fi |
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 python | |
'''Truncates matches from ag | |
Place this script somewhere in your $PATH, like ~/bin and pipe ag into it. | |
Vim could be setup like this: | |
if executable('ag') | |
set grepprg=ag\ --vimgrep\ -w\ $* | |
if executable('agtrunc') |
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
-- Script for creating the autoindent GIF for braceless.vim | |
-- https://github.com/tweekmonster/braceless.vim | |
to slowType(someText) | |
tell application "System Events" | |
repeat with i from 1 to count characters of someText | |
keystroke (character i of someText) | |
delay 0.15 | |
end repeat | |
end tell |
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 | |
echo -en "${@}\x04" > /tmp/fifo_queue |
NewerOlder