8 Commits
Author SHA1 Message Date
Seongjae Lee 1f005a3025 Prepare 0.11.0 release 2016-06-23 22:43:51 -07:00
Seongjae Lee 2cbf6a63d7 Update changelog 2016-06-23 22:43:25 -07:00
Seongjae Lee 3c36f51fe6 Add an option to enable/disable autosave, resolving #50
It would be more efficient if we can subscribe/unsubscribe autosave whenver this parameter is changed, but I don't think the current implementation would be that expansive.
2016-06-23 22:38:00 -07:00
Seongjae Lee 956c0017e4 Prepare 0.10.1 release 2016-06-23 19:09:31 -07:00
Seongjae Lee 0dd99d805b Fix #52 to prevent spitting an error message when whitespace package is not active 2016-06-23 19:07:40 -07:00
Seongjae Lee aa641ba695 Prepare 0.10.0 release 2016-04-25 18:47:08 -07:00
Seongjae Lee 6a7e04d177 Merge pull request #48 from jonmagic/patch-1
Update docquery to 1.1.1
2016-04-25 18:43:03 -07:00
Jonathan Hoyt 5aab86660f Update docquery to 1.1.1 2016-04-24 21:49:26 -07:00
4 changed files with 18 additions and 5 deletions
+4
View File
@@ -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
+5 -2
View File
@@ -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()
+7 -1
View File
@@ -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
View File
@@ -1,7 +1,7 @@
{ {
"name": "nvatom", "name": "nvatom",
"main": "./lib/notational-velocity", "main": "./lib/notational-velocity",
"version": "0.9.3", "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"
}, },