parent
cdf65d6e27
commit
8fd1fe14c8
2 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
path = require 'path'
|
||||
CommandError = require './command-error'
|
||||
fs = require 'fs'
|
||||
fs = require 'fs-plus'
|
||||
VimOption = require './vim-option'
|
||||
|
||||
trySave = (func) ->
|
||||
|
|
@ -108,7 +108,7 @@ class Ex
|
|||
tabp: => @tabprevious()
|
||||
|
||||
edit: (range, filePath) ->
|
||||
filePath = path.normalize(filePath.trim())
|
||||
filePath = fs.normalize(filePath.trim())
|
||||
if filePath.indexOf(' ') isnt -1
|
||||
throw new CommandError('Only one file name allowed')
|
||||
buffer = atom.workspace.getActiveTextEditor().buffer
|
||||
|
|
@ -124,7 +124,7 @@ class Ex
|
|||
buffer.load()
|
||||
|
||||
write: (range, filePath) ->
|
||||
filePath = path.normalize(filePath.trim())
|
||||
filePath = fs.normalize(filePath.trim())
|
||||
deferred = Promise.defer()
|
||||
|
||||
editor = atom.workspace.getActiveTextEditor()
|
||||
|
|
|
|||
|
|
@ -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