Home Download Buy Blog Forum Support

ST2/ST3 - String Utilities (useful string functions)

ST2/ST3 - String Utilities (useful string functions)

Postby LONGMAN on Tue Jan 29, 2013 9:47 pm

StringUtilities is a Sublime Text 2 plugin, which adds to the editor useful string functions like:

Convert Tabs to Spaces
Convert Spaces to Tabs
Convert Chars to Html Entities
Convert Html Entities to Chars
Convert Camel Case <-> Underscores
Convert To Unicode Notation
Convert From Unicode Notation
Convert To Base64
Convert From Base64
Convert To Hex
Convert From Hex
Convert HTML Color From Hex To RGB
Convert HTML Color From RGB To Hex
Calculate Selection MD5
Calculate Selection SHA1
Convert Unixtime <-> Datetime
Insert Current Datetime
Insert Short Password
Insert Medium Password
Insert Long Password
Insert Internal IP Address
Insert External IP Address

ST2 - https://github.com/akalongman/sublimete ... gutilities
ST3 - https://github.com/akalongman/sublimete ... s/tree/ST3
Last edited by LONGMAN on Fri Mar 15, 2013 11:14 am, edited 1 time in total.
AutoBackups: ST2 / ST3
CodeFormatter: ST2 / ST3
StringUtilities: ST2 / ST3
LONGMAN
 
Posts: 62
Joined: Mon Nov 26, 2012 5:03 pm
Location: Tbilisi, Georgia

Re: ST2/ST3 - String Utilities (useful string functions)

Postby LONGMAN on Thu Mar 14, 2013 7:01 pm

Plugin ported on ST3
AutoBackups: ST2 / ST3
CodeFormatter: ST2 / ST3
StringUtilities: ST2 / ST3
LONGMAN
 
Posts: 62
Joined: Mon Nov 26, 2012 5:03 pm
Location: Tbilisi, Georgia

Re: ST2/ST3 - String Utilities (useful string functions)

Postby robertcollier4 on Thu Mar 14, 2013 7:41 pm

This post removed since the commands suggested were already implemented natively by Sublime.
Last edited by robertcollier4 on Fri Mar 15, 2013 9:36 am, edited 5 times in total.
robertcollier4
 
Posts: 133
Joined: Sun Feb 24, 2013 5:37 pm

Re: ST2/ST3 - String Utilities (useful string functions)

Postby LONGMAN on Thu Mar 14, 2013 10:18 pm

If you want, create pull request on github and I will merge it
AutoBackups: ST2 / ST3
CodeFormatter: ST2 / ST3
StringUtilities: ST2 / ST3
LONGMAN
 
Posts: 62
Joined: Mon Nov 26, 2012 5:03 pm
Location: Tbilisi, Georgia

Re: ST2/ST3 - String Utilities (useful string functions)

Postby robertcollier4 on Fri Mar 15, 2013 7:38 am

This post removed since the commands suggested were already implemented natively by Sublime.
Last edited by robertcollier4 on Fri Mar 15, 2013 9:36 am, edited 2 times in total.
robertcollier4
 
Posts: 133
Joined: Sun Feb 24, 2013 5:37 pm

Re: ST2/ST3 - String Utilities (useful string functions)

Postby iamntz on Fri Mar 15, 2013 8:09 am

Please don't overwrite user keys. Or, if you do, please add an option to disable default keys...
iamntz
 
Posts: 597
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: ST2/ST3 - String Utilities (useful string functions)

Postby bizoo on Fri Mar 15, 2013 8:46 am

robertcollier4 wrote:Here are two more that I just wrote that come in handy.

Code: Select all
{ "keys": ["ctrl+shift+alt+right"], "command": "select_to_endofline" },
{ "keys": ["ctrl+shift+alt+left"], "command": "select_to_begofline" },

Code: Select all
import sublime, sublime_plugin

class SelectToEndoflineCommand(sublime_plugin.TextCommand):
   def run(self, edit):
      for thisRegion in self.view.sel():
         self.view.sel().add(sublime.Region(thisRegion.begin(), self.view.line(thisRegion.begin()).end()))

class SelectToBegoflineCommand(sublime_plugin.TextCommand):
   def run(self, edit):
      for thisRegion in self.view.sel():
         self.view.sel().add(sublime.Region(thisRegion.end(), self.view.line(thisRegion.begin()).begin()))

I suppose that it's equivalent (but way more complicated) to:
Code: Select all
{ "keys": ["ctrl+shift+alt+left"], "command": "move_to", "args": {"to": "hardbol", "extend": true} },
{ "keys": ["ctrl+shift+alt+right"], "command": "move_to", "args": {"to": "hardeol", "extend": true} },
bizoo
 
Posts: 754
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: ST2/ST3 - String Utilities (useful string functions)

Postby robertcollier4 on Fri Mar 15, 2013 9:34 am

Closed the pull request. Seems those custom commands were completely unnecessary since they are already implemented natively by Sublime.
robertcollier4
 
Posts: 133
Joined: Sun Feb 24, 2013 5:37 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: codyma94 and 8 guests