add fs-plus dependency; fix edit
This commit is contained in:
parent
bf0f492740
commit
fc5a30c005
2 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
path = require 'path'
|
||||
CommandError = require './command-error'
|
||||
fs = require 'fs'
|
||||
fs = require 'fs-plus'
|
||||
|
||||
trySave = (func) ->
|
||||
deferred = Promise.defer()
|
||||
|
|
@ -102,10 +102,10 @@ class Ex
|
|||
filePath = filePath.trim()
|
||||
if filePath.indexOf(' ') isnt -1
|
||||
throw new CommandError('Only one file name allowed')
|
||||
buffer = atom.workspace.getActiveTextEditor().buffer
|
||||
filePath = buffer.getPath() if filePath is ''
|
||||
buffer.setPath(getFullPath(filePath))
|
||||
buffer.load()
|
||||
|
||||
filePath = fs.normalize filePath
|
||||
atom.workspace.open(filePath)
|
||||
|
||||
|
||||
e: (args...) => @edit(args...)
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
"underscore-plus": "1.x",
|
||||
"event-kit": "^0.7.2",
|
||||
"space-pen": "^5.1.1",
|
||||
"atom-space-pen-views": "^2.0.4"
|
||||
"atom-space-pen-views": "^2.0.4",
|
||||
"fs-plus": "^2.2.8"
|
||||
},
|
||||
"consumedServices": {
|
||||
"vim-mode": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue