Skip to content

Commit

Permalink
#27 Ability to autosave after incrementing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaksim committed Dec 17, 2013
1 parent 35ea866 commit 285010c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#Inc-Dec-Value

**v0.1.12** - [#27](https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value/issues/27) Ability to autosave after incrementing

**v0.1.11** - [#31](https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value/issues/31) ST3: Getting TypeError in console when using the number inc/dec functions

**v0.1.10** - [#31](https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value/issues/31) ST3: Getting TypeError in console when using the number inc/dec functions
Expand Down Expand Up @@ -169,6 +171,7 @@ http://www.sublimetext.com/forum/viewtopic.php?f=5&t=2395
]

, "force_use_upper_case_for_hex_color": false
, "autosave": false
}


Expand Down
7 changes: 5 additions & 2 deletions inc_dec_value.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Inc-Dec-Value v0.1.11
Inc-Dec-Value v0.1.12
Increase / Decrease of
- numbers (integer and fractional),
Expand Down Expand Up @@ -53,6 +53,8 @@ def run(self, edit, action):
self.apply_enums() or
self.apply_string()
)
if self.settings.get("autosave"):
self.view.run_command('save')


def load_settings(self):
Expand All @@ -74,7 +76,8 @@ def load_settings(self):
"action_inc_all": 100,
"action_dec_all": -100,
"enums": [],
"force_use_upper_case_for_hex_color": False
"force_use_upper_case_for_hex_color": False,
"autosave": False
}
self.settings = {}
settings = sublime.load_settings('inc_dec_value.sublime-settings')
Expand Down
3 changes: 3 additions & 0 deletions inc_dec_value.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@
]

, "force_use_upper_case_for_hex_color": false

, "autosave": false

}

0 comments on commit 285010c

Please sign in to comment.