Quickly writeup and save drafts for messaging apps in your favorite editor vimawesome.com/plugin/draft-vim
I often write important messages in a vim buffer before I send it.
- The main reason for this is because it is simply faster.
- The second reason is you might want syntax highlighting or auto formating.
- Also, sometimes you want to write a message without worrying about accidentally sending it.
- Pandoc
- wkhtmltopdf
- Dragon (https://github.com/mwh/dragon)
- Quickly open a new file, well named
- File contains attributes like date, title, and platform that can be searchable
" Add the command to setup a drafts directory
let g:drafts_directory = "/path/to/drafts/"
nnoremap <Leader>nd :call NewDraft()<CR>
nnoremap <Leader>ld :call ListDrafts()<CR>
nnoremap <Leader>z :call OpenDrafts()<CR>
Command | Description |
---|---|
Draft | Open a blanck new draft |
Draft "title" |
Open a draft with a title |
DraftExt "extension" |
Change the file extension of a draft |
Drafts | Open the draft directory in a buffer |
DraftCopy | Copy the contents of the draft to the clipboard |
DraftSearch | Search through drafts by keyword |
- New draft: run `:Draft` or `:Draft "<Title>"` to auto name with the date and time
- Edit the file extension: run `:DraftExt .md` to change the file to markdown
- Open the drafts directory: run `:Drafts`
- Copy the contents of the current draft `:DraftCopy`
- Draft will open a new file in a specific directory, with a unique name
- The file will be based on a template with stuff like the title and datetime
Plug 'jakeroggenbuck/draft.vim'
Plugin 'jakeroggenbuck/draft.vim'
- Open a new draft with a name
- List the draft but no reopening them
- Add
OpenDrafts()
- Add new command aliases
Draft
,DraftExt
- Add
ClipDraft()
orDraftCopy
- Add
Buffer reload for DraftExt
- Add
ConvertMDToHTML()
forDraftToHTML
- Add
ConvertMDToPDF()
forDraftToPDF
- Add
ConvertHTMLToPDF
andConvertToPDFFromTemplate()
forDraftToTemplatePDF
- Add template for html conversion
- Change readme format a little
- Add vimawesome link!
- Add
DraftDragonPDF
forDraftDragonPDF
- Add
DraftOpenPDF
forOpenPDF
- Add requirements
- Add
DraftSearch
by word
:DraftSearch <term>
:DraftSearch school
- Rank searches
- Fix parenthesis in filename bug
- Make md to template pdf correctly do syntax highlight
- Make a draft file type with metadata and parse out the metadata when opened in vim, then use this data to search for notes better and stuff, like have raw data for python to search better with