This commit is contained in:
Caio Cutrim 2015-11-23 00:37:18 +00:00
commit 5af5222ac1

View file

@ -74,8 +74,13 @@ class Ex
quit: ->
atom.workspace.getActivePane().destroyActiveItem()
quitAll: ->
atom.workspace.getPanes()[0].destroy()
q: => @quit()
qa: => @quitAll()
tabedit: (range, args) =>
if args.trim() isnt ''
@edit(range, args)
@ -177,10 +182,15 @@ class Ex
@write(args...).then => @quit()
xit: (args...) => @wq(args...)
wa: ->
saveAll: ->
atom.workspace.saveAll()
wa: =>
@saveAll()
waq: =>
@saveAll()
@quit()
split: (range, args) ->
args = args.trim()
filePaths = args.split(' ')
@ -199,9 +209,9 @@ class Ex
substitute: (range, args) ->
args = args.trimLeft()
delim = args[0]
if /[a-z1-9\\"|]/i.test(delim)
if /[a-z]/i.test(delim)
throw new CommandError(
"Regular expressions can't be delimited by alphanumeric characters, '\\', '\"' or '|'")
"Regular expressions can't be delimited by letters")
delimRE = new RegExp("[^\\\\]#{delim}")
spl = []
args_ = args[1..]