diff --git a/lib/ex.coffee b/lib/ex.coffee index 684b2f6..e4bfc6d 100644 --- a/lib/ex.coffee +++ b/lib/ex.coffee @@ -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..]