sublime-DefaultFileType icon indicating copy to clipboard operation
sublime-DefaultFileType copied to clipboard

Use on_new

Open spadgos opened this issue 13 years ago • 3 comments

Instead of rebinding ctrl+N, using the on_new event should work a bit better.

spadgos avatar Feb 18 '12 16:02 spadgos

Will this fix the issue where the plugin doesn't take effect if you just start typing in an empty Sublime window? Hope so! :)

Viper007Bond avatar Mar 01 '12 23:03 Viper007Bond

@Viper007Bond, you can use this one instead and activate it by adding "on_new": "new_file_syntax" on user settings.

geovedi avatar Apr 06 '12 14:04 geovedi

This all seems like overkill. Surely all you need is a simple macro?

import sublime, sublime_plugin
class EverythingIsLanguage(sublime_plugin.EventListener):
   def on_new(self, view):
         view.set_syntax_file('PutYourLanguageHere')

Jaykul avatar Feb 27 '14 22:02 Jaykul