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 |
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -105,8 +105,11 @@ class NotationalVelocityView extends SelectListView
|
|||||||
if filePath
|
if filePath
|
||||||
atom.workspace.open(filePath).then (editor) ->
|
atom.workspace.open(filePath).then (editor) ->
|
||||||
save = ->
|
save = ->
|
||||||
|
isWhiteSpaceActive = atom.packages.isPackageActive 'whitespace'
|
||||||
|
if isWhiteSpaceActive
|
||||||
atom.packages.deactivatePackage 'whitespace'
|
atom.packages.deactivatePackage 'whitespace'
|
||||||
editor.save()
|
editor.save()
|
||||||
|
if isWhiteSpaceActive
|
||||||
atom.packages.activatePackage 'whitespace'
|
atom.packages.activatePackage 'whitespace'
|
||||||
debouncedSave = _.debounce save, 1000
|
debouncedSave = _.debounce save, 1000
|
||||||
editor.onDidStopChanging () ->
|
editor.onDidStopChanging () ->
|
||||||
|
|||||||
@@ -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.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"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user