mirror of
https://github.com/wassname/nvatom.git
synced 2026-09-10 12:21:11 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f005a3025 | ||
|
|
2cbf6a63d7 | ||
|
|
3c36f51fe6 | ||
|
|
956c0017e4 | ||
|
|
0dd99d805b | ||
|
|
aa641ba695 | ||
|
|
6a7e04d177 | ||
|
|
5aab86660f | ||
|
|
6ec1c4c2e8 | ||
|
|
f582f741ad | ||
|
|
452c34ba36 |
@@ -1,3 +1,7 @@
|
|||||||
|
## 0.11.0
|
||||||
|
- Make autosave a selectable feature
|
||||||
|
- Fix the bug that shows an error message on save when whitespace package is disabled
|
||||||
|
|
||||||
## 0.9.0
|
## 0.9.0
|
||||||
- Add an interlink feature
|
- Add an interlink feature
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,15 @@ You can also override `cmd-l` if you want to keep your muscle memory from Notati
|
|||||||
'cmd-l': 'nvatom:toggle'
|
'cmd-l': 'nvatom:toggle'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To set Windows and Linux key binds you can add the following lines to your keymap:
|
||||||
|
|
||||||
|
```cson
|
||||||
|
'atom-workspace':
|
||||||
|
'alt-ctrl-l': 'nvatom:toggle'
|
||||||
|
'atom-workspace atom-text-editor':
|
||||||
|
'alt-ctrl-o': 'nvatom:openInterlink'
|
||||||
|
```
|
||||||
|
|
||||||
## Migration
|
## Migration
|
||||||
|
|
||||||
v0.1.0 under published package name `notational-velocity` had a fatal bug that sets the default value of its note directory under package directory. In that case, all notes are deleted once the user updates the package, since package directory is overwritten when the user. For more information, refer [#25][6].
|
v0.1.0 under published package name `notational-velocity` had a fatal bug that sets the default value of its note directory under package directory. In that case, all notes are deleted once the user updates the package, since package directory is overwritten when the user. For more information, refer [#25][6].
|
||||||
|
|||||||
@@ -105,9 +105,12 @@ class NotationalVelocityView extends SelectListView
|
|||||||
if filePath
|
if filePath
|
||||||
atom.workspace.open(filePath).then (editor) ->
|
atom.workspace.open(filePath).then (editor) ->
|
||||||
save = ->
|
save = ->
|
||||||
atom.packages.deactivatePackage 'whitespace'
|
isWhiteSpaceActive = atom.packages.isPackageActive 'whitespace'
|
||||||
|
if isWhiteSpaceActive
|
||||||
|
atom.packages.deactivatePackage 'whitespace'
|
||||||
editor.save()
|
editor.save()
|
||||||
atom.packages.activatePackage 'whitespace'
|
if isWhiteSpaceActive
|
||||||
|
atom.packages.activatePackage 'whitespace'
|
||||||
debouncedSave = _.debounce save, 1000
|
debouncedSave = _.debounce save, 1000
|
||||||
editor.onDidStopChanging () ->
|
editor.onDidStopChanging () ->
|
||||||
debouncedSave() if editor.isModified()
|
debouncedSave() if editor.isModified()
|
||||||
|
|||||||
@@ -23,7 +23,11 @@ module.exports =
|
|||||||
description: 'Lunr pipeline preprocesses query to make search faster. However, it will skip searching some of stop words such as "an" or "be".'
|
description: 'Lunr pipeline preprocesses query to make search faster. However, it will skip searching some of stop words such as "an" or "be".'
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
default: true
|
default: true
|
||||||
|
enableAutosave:
|
||||||
|
title: 'Enable Autosave'
|
||||||
|
description: 'Enable saving the document automatically whenever the user leaves the window or change the tab.'
|
||||||
|
type: 'boolean'
|
||||||
|
default: true
|
||||||
|
|
||||||
activate: (state) ->
|
activate: (state) ->
|
||||||
@rootDirectory = @ensureNoteDirectory()
|
@rootDirectory = @ensureNoteDirectory()
|
||||||
@@ -64,6 +68,7 @@ module.exports =
|
|||||||
@notationalVelocityView
|
@notationalVelocityView
|
||||||
|
|
||||||
autosave: (paneItem) ->
|
autosave: (paneItem) ->
|
||||||
|
return unless atom.config.get('nvatom.enableAutosave')
|
||||||
return unless paneItem?.getURI?()?
|
return unless paneItem?.getURI?()?
|
||||||
return unless paneItem?.isModified?()
|
return unless paneItem?.isModified?()
|
||||||
uri = paneItem.getURI()
|
uri = paneItem.getURI()
|
||||||
@@ -81,6 +86,7 @@ module.exports =
|
|||||||
return true
|
return true
|
||||||
|
|
||||||
autosaveAll: ->
|
autosaveAll: ->
|
||||||
|
return unless atom.config.get('nvatom.enableAutosave')
|
||||||
@autosave(paneItem) for paneItem in atom.workspace.getPaneItems()
|
@autosave(paneItem) for paneItem in atom.workspace.getPaneItems()
|
||||||
|
|
||||||
ensureNoteDirectory: ->
|
ensureNoteDirectory: ->
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nvatom",
|
"name": "nvatom",
|
||||||
"main": "./lib/notational-velocity",
|
"main": "./lib/notational-velocity",
|
||||||
"version": "0.9.2",
|
"version": "0.11.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Seongjae Lee <seongjae@gmail.com>",
|
"Seongjae Lee <seongjae@gmail.com>",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"atom-space-pen-views": "^2.0.3",
|
"atom-space-pen-views": "^2.0.3",
|
||||||
"chokidar": "^1.0.5",
|
"chokidar": "^1.0.5",
|
||||||
"docquery": "^1.1.0",
|
"docquery": "^1.1.1",
|
||||||
"fs-plus": "2.x",
|
"fs-plus": "2.x",
|
||||||
"underscore-plus": "^1.6.6"
|
"underscore-plus": "^1.6.6"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user