Home Download Buy Blog Forum Support

Prevent save file for custom behavior

Prevent save file for custom behavior

Postby kutu on Fri Apr 27, 2012 2:29 pm

hello plugin developers,

i want write plugin for some hosting service, where i can edit my file in browser, but i want to do it in ST2. I write first preparations to load this file from server, open new window and insert the source code.

is it possible to do:
  1. prevent save file (ctrl+s) and handle this event to do custom save operations (send file to server). How can i do it without saving file on disk?
  2. i also need something like view.set_dirty(false) after send file to server
  3. have the ST2 some function to identify and set syntax by filename, something like:
    Code: Select all
    view.set_syntax_by_file_name("path/to/file.py")

thx
kutu
 
Posts: 4
Joined: Sun Dec 11, 2011 9:04 pm

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 8 guests