Skip to content

Commit a866eb5

Browse files
committed
📝 Update readme and docs
1 parent cbb7bcf commit a866eb5

File tree

4 files changed

+37
-19
lines changed

4 files changed

+37
-19
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
# Textual Velocity for Atom [![Travis Build Status](http://travis-ci.org/viddo/atom-textual-velocity.png?branch=master)](http://travis-ci.org/viddo/atom-textual-velocity) [![CircleCI Build status](https://circleci.com/gh/viddo/atom-textual-velocity/tree/clean.png?style=shield&circle-token=:circle-token)](https://circleci.com/gh/viddo/atom-textual-velocity)
2-
_Note that this package is still WIP, see [v1 roadmap milestone](https://github.com/viddo/atom-textual-velocity/milestones) for details. See the [change log](CHANGELOG.md) for what's new._
1+
# Textual Velocity [![Travis Build Status](http://travis-ci.org/viddo/atom-textual-velocity.png?branch=master)](http://travis-ci.org/viddo/atom-textual-velocity) [![CircleCI Build status](https://circleci.com/gh/viddo/atom-textual-velocity/tree/master.png?style=shield&circle-token=:circle-token)](https://circleci.com/gh/viddo/atom-textual-velocity) [![David dependency management](https://david-dm.org/viddo/atom-textual-velocity.svg)](https://david-dm.org/viddo/atom-textual-velocity)
32

43
Your mental notes at your fingertips!
54

6-
For those of you who used [Notational Velocity](http://notational.net/) or [nvalt](http://brettterpstra.com/projects/nvAlt/) before should feel right at home.
5+
For those of you who used [Notational Velocity](http://notational.net/) or [nvAlt](http://brettterpstra.com/projects/nvAlt/) should feel right at home: it's intended to be an alternative to those applications but with the benefits of the [Atom](https://atom.io/) ecosystem.
76

87
<img width="748" alt="screen shot 2016-02-04 at 20 05 58" src="https://cloud.githubusercontent.com/assets/978461/12831123/f48a5964-cb92-11e5-9752-859edd2ed3a9.png">
98

10-
## Usage
11-
The package is lazy-loaded, use the `Textual Velocity: Start Session` [command](https://atom.io/docs/v1.4.3/getting-started-atom-basics#command-palette) to get started.
12-
13-
By default notes are saved in `~/.atom/notes`, you can change it through the `textual-velocity:path` [config](https://atom.io/docs/api/v1.5.0/Config) setting.
9+
Caveats:
10+
- Still WIP, see the [change log](CHANGELOG.md) for what's been done so far, and [v1 roadmap milestone](https://github.com/viddo/atom-textual-velocity/milestones) for planned/upcoming features.
11+
- Developed and tested on MacOSX, it _should_ work fine on Linux and Windows too but there's not guarantees right now. Help is appreciated!
12+
- Due to Atom's purpose of being a _text_-editor only text files are intended to be supported, compared to the single-database option NV offers.
1413

15-
You may also want to set a global shortcut to toggle the Atom window, see my [init config](docs/init.coffee) for an example of how this can be setup when the package is activated.
14+
## Usage
15+
Use the `Textual Velocity: Start Session` [command](https://atom.io/docs/v1.4.3/getting-started-atom-basics#command-palette) to get started, the package is lazy loaded.
1616

17-
The `core.ignoredNames` and `core.excludeVcsIgnoredPaths` are respected, but you need to restart a session for the changes to apply.
17+
By default notes are saved in `~/.atom/notes`, you can change it in the package settings.
1818

19-
See [keymaps](keymaps/textual-velocity.cson) for available shortcuts.
19+
While the plugin can be run in any Atom window it's recommended to run it in a [separate instance for easier usage and access to your notes](docs/recommended-usage/README.md)
2020

2121
Also, I recommend the following packages, that works great in combination with textual-velocity:
2222
- [quick-file-actions](https://atom.io/packages/quick-file-actions) - Quickly copy, delete, move, and create new files
2323
- [file-icons](https://atom.io/packages/file-icons) - Assign file extension icons and colours for improved visual grepping
2424
- [preview](https://atom.io/packages/preview) - Ultimate previewer of source code in Atom.
2525
- [recent-files-fuzzy-finder](https://atom.io/packages/recent-files-fuzzy-finder) - Find recently opened files easier
2626
- [block-travel](https://atom.io/packages/block-travel) - Quickly travel up/down between blocks of code
27-
28-
## Installation
29-
`apm install textual-velocity`, or search & install it through the settings.
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# ~/.atom/init.coffee
21
# Init script to register global shortcut and hide tree-view when session is started
3-
42
atom.packages.onDidActivatePackage (pkg) ->
53
return if pkg.name isnt 'textual-velocity'
64

@@ -13,20 +11,29 @@ atom.packages.onDidActivatePackage (pkg) ->
1311
ret = globalShortcut.register keyCombo, ->
1412
target = document.body.querySelector('atom-workspace')
1513
atom.commands.dispatch(target, 'textual-velocity:toggle-atom-window')
16-
unless ret
14+
if ret
15+
atom.notifications.addSuccess "Registered #{keyCombo} to toggle this Atom window", {
16+
description: ''
17+
dismissable: true
18+
}
19+
else
1720
atom.notifications.addWarning "Could not register #{keyCombo} as shortcut", {
18-
detail: 'Probably already registered by another app or window, try restarted atom completely'
21+
description: 'Probably already registered by another app or window, try restarted atom completely'
1922
dismissable: true
2023
}
2124

22-
# Hide tree-view
25+
# Hide tree-view when package is activated
2326
try
2427
treeView = atom.packages.getActivePackage('tree-view').mainModule.createView()
2528
if treeView.isVisible()
2629
treeView.toggle() # i.e. hide it
2730
catch err
2831
console.error(err)
2932
atom.notifications.addWarning 'Could not hide tree view', {
30-
detail: 'See the console for the error'
33+
description: 'See the console for the error'
3134
dismissable: true
3235
}
36+
37+
# Activate package right away
38+
target = document.body.querySelector('atom-workspace')
39+
atom.commands.dispatch(target, 'textual-velocity:start-session')

docs/recommended-usage/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Recommended usage
2+
3+
While the plugin can be run in any Atom window it's recommended to run it in a separate instance for easier usage and access to your notes.
4+
5+
The custom init script [.atom/init.coffee](.atom/init.coffee#L10) contains some code to activate this package on startup, and to register a global keyboard shortcut to easily toggle/access the Atom window and this package's search field.
6+
7+
You may of course copy-paste this to your global Atom init config (typically located at `~/.atom/init.coffee`), but otherwise you can check the the shell script [mac-atom-beta.sh](mac-atom-beta.sh) for an example how to run a separate [Atom beta](https://atom.io/beta) instance (assumed to be installed in the default location), which use a custom atom-home dir to run the custom init script only for this instance.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -x
3+
THIS_DIR="$(dirname "$0")"
4+
cd "$THIS_DIR"
5+
# custom ATOM_HOME to run the init script located there
6+
# override user-data-dir due to https://github.com/atom/atom/issues/11806#issuecomment-249862337
7+
ATOM_HOME="$THIS_DIR/.atom" open "/Applications/Atom Beta.app" --args --user-data-dir ~/Library/Application\ Support/AtomBeta

0 commit comments

Comments
 (0)