Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I search a way to edit evernote notes from vim

I begin with this

dataDir=$(ls -trlh $evernoteDir| tail -n 1| awk '{print $NF}')
file=$(ls -trlh $contentDir | tail -n 1| awk '{print $NF}')
vim -c 's/div>/div>\r/g' $contentDir/$file/content.html

or maybe create a vim plugin for this ...

you have any suggestion?


for a more simple edition of the evernote note in html format, I make this vim function

" Markup function {{{ 
    fun! MkdToHtml() "{{{
        " markdown to html
        silent! execute '%s/  $/<br\/>/g'
        silent! execute '%s/\*\*\(.*\)\*\*/<b>\1<\/b>/g'
        silent! execute '%s/\t*###\(.*\)/<H3>\1<\/H3>/g'
    endf "}}}
    command! -complete=command MkdToHtml call MkdToHtml()
    nn <silent> <leader>mm :MkdToHtml<CR>
" }}} 

and a vim function for open the last note edited

fun! LastEvernote() "{{{
    " a better solution is with evernote api
    let evernoteDir=expand("$HOME")."/Library/Application*Support/Evernote/data"
    let dataDir=system("ls -trlh ".evernoteDir."| tail -n 1| awk '{print $NF}'")
    let contentDir=evernoteDir."/".dataDir."/content"
    let contentDir=substitute(contentDir,"\n","",'g')
    let note=system("ls -trlh ".contentDir." | tail -n 1| awk '{print $NF}'")
    let note=substitute(note,"\n","",'g')
    sil! exec 'sp '.contentDir.'/'.note.'/content.html'
    sil! exec '1s/>/>\r/g'
    sil! exec '%s/<br.*\/>/<br\/>\r/g'
    sil! exec '%s/<\//\r<\//g'
    sil! exec 'g/^\s*$/d'
    normal gg
    sil! exec '1,4fo'
    sil! exec '$-1,$fo'

share|improve this question

migrated from Oct 3 '11 at 8:37

This question came from our site for professional and enthusiast programmers.

why to superuser? if is a development question. – juanpablo Oct 4 '11 at 14:30

Have you tried Geeknote (

"Edit your Evernote notes with any console editor you like - nano, vi, vim, mcedit, etc ... Save changes and Geeknote will automatically upload them to Evernote."

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.