 
 # ex command
 # -------------------------
-w = ->
-  atom.workspace.saveActivePaneItem()
+w = ({editor}={}) ->
+  if editor?.getPath()
+    editor.save()
+  else
+    atom.workspace.saveActivePaneItem()
 
 q = ->
   atom.workspace.closeActivePaneItemOrEmptyPaneOrWindow()

  normalCommands: {
    w
    wq
    wqall
    q
    qall

vsplit = ({editor, editorElement}) ->
  dispatch(editorElement, 'pane:split-right-and-copy-active-item')

# Configuration switch
# -------------------------
# Util
toggleConfig = (param) ->
  value = atom.config.get(param)
