Skip to content
Emanuele D'Osualdo edited this page Apr 25, 2016 · 1 revision

The command to create a new note is

new_evernote_note

it accepts the following arguments:

Argument Description
contents A string with the initial contents of the new note's view. You can use Sublime's Snippets syntax
template The filename or pattern for the template to use in the new note's view. See below.

The new note command does not upload anything to the Evernote server until the user explicitly performs a "Send to evernote" command.

Arguments

The new_evernote_note command's arguments control the initial contents of the view of the new note.

When the contents argument is specified, the template argument is ignored.

When none of the arguments is specified (as is the case when invoking the command from the Command Palette), the default_template setting is used as the value for template. The default_template setting can be changed in your Evernote.sublime-settings file, accessible from Preferences > Package Settings > Evernote > Settings - User.

The value for template can be of two kinds:

  1. a full path like "Packages/User/NewNote.md";
  2. a filename pattern like "EvernoteTemplate*.md".

In the first case, any path relative to Sublime Text's base directory can be given.

In the second case, the pattern cannot contain a path; if there are multiple files matching the pattern, a quick panel is shown offering a choice among all matches.

Usage

In a keymap

 { "keys": ["super+e", "super+n"], "command": "new_evernote_note", "args": {"template": "EvernoteTemplate*.md"} }

or from the console/a plugin

 window.run_command("new_evernote_note", {"contents": "---\ntag:todo\n---\n\n"+view.substr(view.sel()[0])})
Clone this wiki locally