【发布时间】:2011-10-24 17:03:55
【问题描述】:
我刚刚开始使用 Vim。
这是一个我在BBedit 中经常使用的shell 脚本。
#!/bin/sh
filename=$(basename "${BB_DOC_PATH##*/}" .ly)
directory=${BB_DOC_PATH%/*}/
cd "${directory}"
lilypondPDFoutput="${directory}"$filename".pdf"
/Applications/Lilypond.app/Contents/Resources/bin/ lilypond -dno-point-and-click -ddelete-intermediate- files "$BB_DOC_PATH"
wait
open "${lilypondPDFoutput}"
BB_DOC_PATH 是一个变量,代表当前打开文件的路径。 (例如/Users/me/Documents/file.ly)
我将如何将此脚本放在我的 .vimrc 中,并使用像 :typeset 这样的简单命令来调用它?
注意:我正在排版一个Lilypond 文件。
【问题讨论】: