"cd ~/doc/ideas && gvim ideas.md"
Mod4 + i
-#"cd ~/doc/drafts && drafts_prepend && gvim -c NERDTreeFind drafts.md"
+
"cd ~/doc/drafts && drafts_prepend && gvim drafts.md"
Mod4 + d + Shift
-"cd ~/doc/drafts && gvim $(draft)"
+"cd ~/doc/drafts && gvim $(draft ~/doc/drafts/adhoc)"
Mod4 + d
+
"cd ~/doc/notes && notes_prepend && gvim -c NERDTreeFind notes.md"
+ Mod4 + n + Shift
+"cd ~/doc/notes && gvim $(draft ~/doc/notes/adhoc)"
Mod4 + n
+
"cd ~/doc/bookmarks && gvim bookmarks.md"
Mod4 + b
+
"cd ~/doc/quotations && gvim quotations.md"
Mod4 + q
set -euo pipefail
+DEFAULT_BASE="$HOME/doc/drafts/adhoc"
+
bar() {
local -r len="${1:-80}" # 1st arg or 80.
local -r char="${2:--}" # 2nd arg or a dash.
}
main() {
+ local -r base="${1:-$DEFAULT_BASE}"
+
local -r title_given='Untitled'
local -r title_lower=$(echo "$title_given" | tr '[:upper:]' '[:lower:]')
local -r title_lower_dashed=$(echo "$title_lower" | sed 's/\s\+/-/g')
- local -r base="${HOME}/doc/drafts/adhoc"
local -r timestamp="$(date --iso-8601=ns)"
local -r file="${base}/${timestamp}--${title_lower_dashed}.md"