From ef129f9491e303621f16c7806d716ad54ccd495b Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 7 Nov 2014 10:02:07 -0800 Subject: [PATCH] Add more relevant (but contrived) example in init.coffee. Closes #4089 --- dot-atom/init.coffee | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dot-atom/init.coffee b/dot-atom/init.coffee index cf8a5a249..09dab00dc 100644 --- a/dot-atom/init.coffee +++ b/dot-atom/init.coffee @@ -4,11 +4,8 @@ # after packages are loaded/activated and after the previous editor state # has been restored. # -# An example hack to make opened Markdown files always be soft wrapped: +# An example hack to log to the console when each text editor is saved. # -# path = require 'path' -# -# atom.workspaceView.eachEditorView (editorView) -> -# editor = editorView.getEditor() -# if path.extname(editor.getPath()) is '.md' -# editor.setSoftWrapped(true) +# atom.workspace.observeTextEditors (editor) -> +# editor.onDidSave -> +# console.log "Saved! #{editor.getPath()}"