Skip to content

Commit

Permalink
Move indenttime script to dev folder as time-indent
Browse files Browse the repository at this point in the history
  • Loading branch information
axvr committed Jan 26, 2025
1 parent 1ea333a commit aae9ae8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions dev/do/test-indent
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# TODO: colour messages?

pushd "$(dirname "$0")/.."

if [ "$EDITOR" != 'vim' ] && [ "$EDITOR" != 'nvim' ]; then
echo 'ERROR: Set the "EDITOR" environment variable to "vim" or "nvim" and run again.'
exit 1
Expand Down
11 changes: 4 additions & 7 deletions clj/bin/indenttime → dev/do/time-indent
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PREFIX='report_indent'

while getopts :p: opt; do
case "$opt" in
p) PREFIX="$OPTARG";;
h) abort_with_help;;
p) PREFIX="$OPTARG";;
h) abort_with_help;;
esac
done
shift $((OPTIND-1))
Expand All @@ -21,12 +21,9 @@ VIMRC="
set runtimepath^=$(dirname "$0")/../..
filetype plugin indent on
syntax on
let g:clojure_maxlines = 0
profile start $(echo "${PREFIX}-$(date +%s.%N).log")
profile! file $(dirname "$0")/../../syntax/clojure.vim
profile! file $(dirname "$0")/../../indent/clojure.vim
"

exec vim -N -u <(echo "$VIMRC") \
-c 'call feedkeys("gg=G")' \
-c 'call feedkeys(":silent quitall!\<CR>")' \
"$1"
exec vim --clean -NXnu <(echo "$VIMRC") '+normal! gg=G' '+quitall!' "$1"

0 comments on commit aae9ae8

Please sign in to comment.