nvbn / everpad

Evernote client well integrated with linux desktop
1.17k stars 143 forks source link

Leading Tabs not preserved or converted #24

Open hdave opened 12 years ago

hdave commented 12 years ago

Version 1.5.0 on Ubuntu 12.04.

Steps to reproduce:

1) Create/edit a note and on one or more new line hit tab once or twice and then enter some text 2) Save and close the note 3) Sync

Discrepancy:

At this point when opening the note in Evernote the leading tab characters are not there. I would have expected them to be there.

Idea:

I believe the root cause of this issue is because Evernote does not handle tab characters. If this is the case, then I would like to make a suggestion that could really make Everpad THE BEST CLIENT EDITOR for Evernote bar none.

Everpad could convert leading tabs to whatever indent markup Evernote uses, and then on the way from Evernote to Everpad convert the indents back into tabs.

Idea Justification:

1) Everpad currently lacks toolbar buttons to increase or decrease indentation, this capability would eliminate the need to add them in the future. 2) From an end user perspective, using toolbar buttons to control indent is a HUGE pain and is very unnatural. Other than Evernote, what text editor requires you to click on the toolbar to create a tab-like indent?! 3) Like me, there are many Linux (e.g. ex-Tomboy) users on Evernote that really wish that they had a client that would support the tab characters for quick editing of indented notes 4) It's a simple 1:1 mapping -- one level of indent = 1 tab character. 5) Evernote clients are notorious for screwing up indentation. Converting them to tabs in Everpad would make Everpad the go to client for cleaning up your notes. 6) I'll send more money!

Again, this is only for lines that have leading tabs, not for any tabs that can be found in the middle or the end of a line of text. And again, the idea would be to actually use the tab characters in the Everpad editor...not to have tab/shift-tab indent the lines.

Thoughts?

nvbn commented 12 years ago

It's good and necessary but later. Now this feature requires some big hacks.

ghost commented 12 years ago

I'm gutted to say that despite being really impressed with Everpad in the last hour it's been on my computer, I can't use it until it supports tabs. I do all my 500+ notes with Nixnote currently using tab indents in every note. I could type 5 spaces as a workaround, but no - I'll keep using Nixnote at work and Everpad at home until Everpad supports tabs. This is an incredible project - many thanks to nvbn for putting this together. Is there an official website?

hdave commented 12 years ago

I too make heavy use of tabs to represent indentation levels in an outline. Everpad is mostly read-only for me until this gets addressed. I can appreciate is requires a big hack, but without it, I can't edit 98% of my notes.

hdave commented 12 years ago

Here's some feedback on the 1.10.0 release:

1) When I type a "tab" character as a leading tab for a line, I would have expected it to stay as a tab in the Everpad editor...it's only during the "upload" of the note that I would expect the line leading tabs to get converted to indents. As it is, they get converted to indents as I type, which makes deleting them or adjusting them impossible. In other words, I think that the Everpad editor should only uses "tabs"...ever....but that they should be converted 1:1 with "indent" levels when going to and from Evernote servers.

2) After I created a note with tabs in it, and then sync'd all the tabs/indents were missing inside of Evernote.

3) If I hit "enter" at the end of a line with leading tabs, I'd expect Everpad to add the same number of leading tabs to the new empty line created.

4) Indents in existing evernote notes were not converted to tabs.

In any event, thanks for tackling this difficult issue...we are getting there!

ghost commented 11 years ago

I notice in 1.11 that Everpad now preserves leading tabs on upload/sync, but Evernote and Nixnote still fail to "notice" the tabs and they simply disappear, causing all my careful indentation to disappear. Is a simple workaround to have Everpad insert 5 spaces when the tab key is pressed? Or convert to 5 spaces when uploading to Evernote?

ghost commented 11 years ago

This seems to be fixed for me now. Tested using Everpad 2, then looking on the Evernote website. I haven't checked Nixnote compatibility, but if the website is showing them, that's all that really matters.

fmoo commented 11 years ago

@hdave - can you confirm the latest evernote works well for you?

hdave commented 11 years ago

Here is my latest feedback (Architecture: amd64, Version: 2.0.1-0~quantal):

Sub Issue 1 -- It appears that all tabs in Everpad are converted to 4 spaces on their way to Evernote and groups of 4 spaces are converted back into tabs. IIRC Evernote editors do not support tab (\t) characters so this behavior is probably a nice feature for tab characters that appear in the middle of a line (or at the end), but it is not good for tabs that appear at the beginning of a line. When tabs appear at the beginning of a line they should be converrted to whatever indentation markup Evernote uses.

Sub Issue 2 -- The conversion of tabs to spaces is buggy. For example, if you create a note in evernote with multiple spaces in the middle of a sentence you will notice it deletes a character after every sync, thus slowly destroying your note!. Also sometimes groups of spaces in EN are converted to a single space in EP instead of a tab. This feature needs more testing for sure. I would also suggest you have an option for controlling how many space characters should be used during the substitution.

Sub Issue 3 -- When typing in EP, hitting tab once at the beginning of a line has the effect of indenting the line within the EP editor. This is not desirable as there is no easy way to control the indentation level. The result is that if you want to remove the indent, you need to delete the entire line of text. I suggest you simply leave tabs as plain tabs while in the EP editor and never use indentation markup. Also, the second or third tab you hit on a line stays as a tab character...so having the first tab result in an indentation is also inconsistent.

Sub Issue 4 -- When pushing the note to EN, EP should convert leading tab characters to indentation markup for all contiguous lines that have (at least) the same number of tabs. Likewise, when pulling an updated note from EN, you should convert indentation markup to leading tabs for all the lines within the indented region. I realize that this algorithm may not be easy to code, but it is a fundamental requirement to making EP a usable EN editor.

Sub Issue 5 -- By default, when typing a "return" in the EP editor, the editor should automatically add the same number of tabs at the beginning of the newly created line that the previous line had. Thus simulating the indentation capability in the other EN editors.

Hope this helps. If you want I can close this issue and create 5 separate issues.

hdave commented 11 years ago

accidently hit the close button! wups...