Files
usaco/lib/cmd/edit.sh
T

6 lines
196 B
Bash

# usaco vim/edit/e <name>
[[ $# -ge 1 ]] || usage
dir="$(find_problem "$1")"
# run from inside the dir so :!./main etc. work and .in files are at hand
(cd "$dir" && exec ${EDITOR:-nvim} main.cpp)