I have an issue with converting/saving the note. Eg. with following text:
test
## Test
line without any indent
one tab indent
Saved with :GeeknoteSaveAsNote
When I load the note with geeknote or vim-geeknote, I see every line is indented by 4 spaces. In Evernote UI, I see plaintext markdown so it wasn't converted to html.
Additional indenting is added every time I re-save the note with vim-geeknote.
################## TITLE ##################
test
=================== META ==================
Created: 17.01.1970
Updated: 17.01.1970
----------------- CONTENT -----------------
## Test
line without any indent
one tab indent
When I edit the note with geeknote edit in Vim, note is saved correctly without additional indenting.
If I open fixed note in vim-geeknote, save without any changes, 4 spaces are added and therefore document is not converted and saved correctly.
Tested with latest vim-geeknote and geeknote from master branch. No special settings used.
Update
It happens somewhere during:
note.content = textToENML(content)
because when I explicitly call strip() on each line during content string creation, I remove my indents but these are still present.
Solution: Found that saved note is not converted to ENML by default so one has to explicitly define GeeknoteFormat:
let g:GeeknoteFormat="markdown"
otherwise following code is executed and indenting is broken somewhere inside (wrapENML maybe?):
Hello,
thank you for this great Vim plugin :-)
I have an issue with converting/saving the note. Eg. with following text:
Saved with
:GeeknoteSaveAsNote
When I load the note with geeknote or vim-geeknote, I see every line is indented by 4 spaces. In Evernote UI, I see plaintext markdown so it wasn't converted to html. Additional indenting is added every time I re-save the note with vim-geeknote.
When I edit the note with
geeknote edit
in Vim, note is saved correctly without additional indenting. If I open fixed note in vim-geeknote, save without any changes, 4 spaces are added and therefore document is not converted and saved correctly.Tested with latest vim-geeknote and geeknote from master branch. No special settings used.
Update
It happens somewhere during:
because when I explicitly call strip() on each line during content string creation, I remove my indents but these are still present.
Solution: Found that saved note is not converted to ENML by default so one has to explicitly define GeeknoteFormat:
otherwise following code is executed and indenting is broken somewhere inside (wrapENML maybe?):
In my opinion
GeeknoteFormat
should be set to markdown by default, because current vim-default doesn't do what user expects.