-
Notifications
You must be signed in to change notification settings - Fork 104
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
Feature: Insert links to other notes #36
Conversation
The command allows browsing the note store to find a note, a link to which is inserted into the current view. The command is available only when editing a note.
Commands to allow browsing to, searching for, or picking from recent, the note to which a link should be inserted.
In case a window command would like to operate on the active view, save a reference to it early on so that unexpected things don't happen if the active view changes.
The is_enabled method of the insert link command was checking to see if the evernote GUID setting was present in the view. However, since new notes don't yet have GUIDs, this prevents the command from being available in a new note view. Hence, change to check the syntax instead to see if it is an Evernote note.
I realized that there is already a setting, $evernote, that is set on views created by Evernote. It wasn't getting set for new notes, however. This change sets the setting for new notes as well, then fixes the is_enabled for the insert links command to use that instead.
A text command that opens the note pointed to by the link currently under the cursor.
I felt like the 'Open linked note' command would be more discoverable if it was visible but disabled when on an Evernote note, and enabled when the cursor is on a link
A command that lists all the linked notes in the current note, allowing you to open them from a quick panel.
I just noticed something: when the Evernote official clients insert a note link, the link color is green, whereas links inserted by Sublime-Evernote are always blue (same color as regular links inserted by Evernote official clients). I guess Evernote client is setting the link color directly. Doesn't look like there is much we can do, aside from doing some post-processing on the markdown formatting output. |
Ah! can you inspect the HTML inside the note? Maybe they are hardcoding the color of the link in the style. |
Ability to open links to notes
The |
Ok, |
@bordaigorl Can you please take a look at this change: https://github.com/rahul-ramadas/sublime-evernote/pull/2 I realized that with all this functionality for working with links, I have all the pieces to add another feature that I have sometimes needed: the ability to open the note in the Evernote client. This commit adds that as well. I have a request though: if you have a Mac can you try out the feature on OSX and see if it works? I have tested it on Windows. Linux does not have an official client, but I am calling |
@rahul-ramadas that's a good idea, I only included the Open in Webapp one because that's what I use (I'm on Linux). As for Linux an
Thanks for the love you are giving to the plugin! |
Implemented a command to open the current note in the Evernote client, if it is installed. Perfectly complements the existing 'Open in Web App' command.
I've merged the new feature in. I couldn't figure out a good way to know if the open actually worked. On Windows, if the client is not installed, you get a prompt for selecting an application that can handle the URL. |
Feature: Insert links to other notes
Continued from #34.