Start editor with shebang at top


#1

Can anyone help me I would like the editor to open with shebang already at the top.


#2

The following code throws a shebang at the beginning of any blank TextEditor that is opened:

atom.workspace.observeTextEditors (editor) ->
  return unless editor.getText() == ""

  editor.buffer.insert([0,0], "#!/bin/")

#3

I hate being so totally ignorant. Where do I place the above code. I am totally new at this. Thanks
Larry


#4

Drop it into your init.coffee file.


#5

Thanks that worked. So much to learn!!