From 6e101ea80413991d90f350d8764948b48790d8a8 Mon Sep 17 00:00:00 2001 From: Seongjae Lee Date: Mon, 20 Apr 2015 23:01:08 -0700 Subject: [PATCH] Add a default notebook Also change the default toggle shortcut to alt-cmd-l. The original Notational Velocity uses cmd-L, but it conflicts with Atom's default shortcut. --- CHANGELOG.md | 3 --- LICENSE.md | 2 +- README.md | 11 ++++++----- keymaps/notational-velocity.cson | 2 +- lib/notational-velocity-view.coffee | 3 +++ lib/notational-velocity.coffee | 4 +++- notebook/How to use.md | 5 +++++ notebook/Welcome.md | 14 ++++++++++++++ package.json | 4 ++-- 9 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 notebook/How to use.md create mode 100644 notebook/Welcome.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d858c..e69de29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +0,0 @@ -## 0.1.0 - First Release -* Every feature added -* Every bug fixed diff --git a/LICENSE.md b/LICENSE.md index 69531df..a2ec9d3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014 Seong Jae Lee +Copyright (c) 2014-2015 Seongjae Lee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README.md b/README.md index 83d0d63..35ce574 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Notational Velocity for Atom -[![Build Status](https://travis-ci.org/seongjaelee/notational-velocity.svg?branch=master)](https://travis-ci.org/seongjaelee/notational-velocity) +![Build Status][3] [Notational Velocity][1] is an application that stores and retrieves notes. This Atom package implements the some key features from this amazing app: @@ -8,7 +8,7 @@ - Mouseless interaction - Incremental Search -Integrated with Atom, we have many advantages: +Integrated with Atom, we have several advantages: - __Use Atom's Features__ - Such as Syntax Highlighting and Tree View. - __Use Other Packages__ - Such as Markdown Preview and Minimap. @@ -18,15 +18,15 @@ We do believe Notational Velocity is the precursor of the famous note-taking app - __Open Source__ - __No Rich Text__ - Instead, we strongly recommend to use [Markdown][2]. -- __No Cloud Sync__ - You pick whichever syncing method you prefer. +- __Sync Whereever You Want__ - You can save notes locally, in Dropbox, or in Google Drive. ## Settings -- `Directory`: The directory of archiving markdown files. +- `Note Directory`: The directory to archive notes. ## Key Bindings -- `ctrl-alt-o`: Toggles the search view. +- `alt-cmd-l`: Toggles the search view. ## References @@ -39,3 +39,4 @@ We do believe Notational Velocity is the precursor of the famous note-taking app [1]: http://notational.net/ [2]: http://daringfireball.net/projects/markdown/syntax +[3]: https://travis-ci.org/seongjaelee/notational-velocity.svg?branch=master)](https://travis-ci.org/seongjaelee/notational-velocity diff --git a/keymaps/notational-velocity.cson b/keymaps/notational-velocity.cson index 76826c1..ccb401c 100644 --- a/keymaps/notational-velocity.cson +++ b/keymaps/notational-velocity.cson @@ -8,4 +8,4 @@ # For more detailed documentation see # https://atom.io/docs/latest/advanced/keymaps 'atom-workspace': - 'ctrl-alt-o': 'notational-velocity:toggle' + 'alt-cmd-l': 'notational-velocity:toggle' diff --git a/lib/notational-velocity-view.coffee b/lib/notational-velocity-view.coffee index d010854..ac14cd8 100644 --- a/lib/notational-velocity-view.coffee +++ b/lib/notational-velocity-view.coffee @@ -10,6 +10,9 @@ class NotationalVelocityView extends SelectListView super @addClass('notational-velocity from-top overlay') @rootDirectory = atom.config.get('notational-velocity.directory') + if !fs.existsSync(@rootDirectory) + throw new Error("The given directory #{@rootDirectory} does not exist. " + + "Set the note directory to the existing one from Settings.") @noteDirectory = new NoteDirectory(@rootDirectory, null, () => @updateNotes()) @updateNotes() @prevFilterQuery = '' diff --git a/lib/notational-velocity.coffee b/lib/notational-velocity.coffee index 320e165..301b014 100644 --- a/lib/notational-velocity.coffee +++ b/lib/notational-velocity.coffee @@ -3,8 +3,10 @@ module.exports = config: directory: + title: 'Note Directory' + description: 'The directory to archive notes' type: 'string' - default: 'testdata' + default: process.env.ATOM_HOME + '/packages/notational-velocity/notebook' notationalVelocityView: null diff --git a/notebook/How to use.md b/notebook/How to use.md new file mode 100644 index 0000000..b4e4aa4 --- /dev/null +++ b/notebook/How to use.md @@ -0,0 +1,5 @@ +Begin typing the title in the search panel. Press return to add a new note with the title. While typed, Notational Velocity searches for notes whose body or title contain your query. Note that naming a note and searching always occur simultaneously. + +When the note you want to find is in the list, you can select notes by using the arrow keys. When you press enter, the selected note will appear on the editor. If your query is the title of the note, Notational Velocity would have selected the note automatically. + +Notational Velocity constantly writes your changes to disk as you create and edit notes, so no need to "Save" anything manually. diff --git a/notebook/Welcome.md b/notebook/Welcome.md new file mode 100644 index 0000000..e001a99 --- /dev/null +++ b/notebook/Welcome.md @@ -0,0 +1,14 @@ +Welcome to Notational Velocity! + +This is the body of a note. Your notes can be as long or as short as you want. + +The notes are saved as a [Markdown][1] file, so you can freely use Markdown syntax to __embolden__ or _italicize_ them. Atom's [GFM][2] syntax highlight will automatically beautify these notes. + +These notes were included to give you a sense what Notational Velocity is. You may delete them at any time. + +For more information, please refer [Notational Velocity][3] and [nvALT][4]. + +[1]: http://daringfireball.net/projects/markdown/ +[2]: https://help.github.com/articles/github-flavored-markdown/ +[3]: http://notational.net/ +[4]: http://brettterpstra.com/projects/nvalt/ diff --git a/package.json b/package.json index 9151511..3578b99 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "notational-velocity", "main": "./lib/notational-velocity", "version": "0.0.0", - "description": "A short description of your package", + "description": "Notational Velocity for Atom", "activationCommands": { "atom-workspace": "notational-velocity:toggle" }, - "repository": "https://github.com/atom/notational-velocity", + "repository": "https://github.com/seongjaelee/notational-velocity", "license": "MIT", "engines": { "atom": ">0.50.0"