dotfiles/dot_vim/charm.vim
2024-05-18 18:50:38 -07:00

18 lines
344 B
VimL

fu! SendToCharm(subject,mood)
if a:subject == ""
let subject=input("Subject: ")
else
let subject=a:subject
endif
if a:mood == ""
let mood=input("Mood: ")
else
let mood=a:mood
endif
exe "w!"
exe "!cat % | charm -q -s \"".subject."\" -m \"".mood."\""
endf
if !exists(":PostToLJ")
command PostToLJ :call SendToCharm("","")
endif