Skip to content

Instantly share code, notes, and snippets.

@tbnorth
Last active May 2, 2021 19:49
Show Gist options
  • Save tbnorth/cf5cf528ef1ba14e3dae647cef1eaf0e to your computer and use it in GitHub Desktop.
Save tbnorth/cf5cf528ef1ba14e3dae647cef1eaf0e to your computer and use it in GitHub Desktop.
# "compound 'compound .compound but not <spac>compound or compounds
cexpr system("find PATH -name \\*.py | xargs grep -n [.\\'\\\"]compound\\\\b")
# get list of files from a broken session
sed -n '/^cd / p; /^badd / {s/^badd [^ ]* //; H}; $ {x; s/\n/ \\\n/g; p}' /path/to/sessionfile.vim
# some paths will be relative to a folder, this prints the command to cd to the folder first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment