Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading Tabs not preserved or converted #24

Open
hdave opened this issue Aug 28, 2012 · 9 comments
Open

Leading Tabs not preserved or converted #24

hdave opened this issue Aug 28, 2012 · 9 comments
Labels

Comments

@hdave
Copy link

hdave commented Aug 28, 2012

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
Copy link
Owner

nvbn commented Sep 9, 2012

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

@ghost
Copy link

ghost commented Sep 16, 2012

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
Copy link
Author

hdave commented Sep 27, 2012

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.

nvbn added a commit that referenced this issue Sep 27, 2012
@hdave
Copy link
Author

hdave commented Sep 30, 2012

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
Copy link

ghost commented Oct 8, 2012

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?

nvbn added a commit that referenced this issue Oct 19, 2012
@ghost
Copy link

ghost commented Oct 21, 2012

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
Copy link
Collaborator

fmoo commented Oct 22, 2012

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

@hdave
Copy link
Author

hdave commented Oct 23, 2012

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 hdave closed this as completed Oct 23, 2012
@hdave hdave reopened this Oct 23, 2012
@hdave
Copy link
Author

hdave commented Oct 23, 2012

accidently hit the close button! wups...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants