Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

last evernote from vim

View lastEvernote.vim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
nn <leader>e :call LastEvernote()<CR>
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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.