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: 68
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: 68
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: 153
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: 68
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: 153
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: 816
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: 859
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: 153
Joined: Sun Feb 24, 2013 5:37 pm

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

Postby Kcko on Wed Sep 25, 2013 8:11 pm

Excelent plugin. But i have one maybe basic question.

For example:
=======================
I have some symbol "☻" -> unicode value is -> \263B and \u263B (its important for css and js coding) and html entity is &#9787
with this plugin I was able to convert to unicode but not to the HTML entity, is it possible?

Wanted methods
=================================================
1) ☻ -> &#9787; (symbol to entity)
2) \263B -> &#9787; (unicode hex value to entity )

Both solutions bidirectionally of course :)


Btw. its best plugin for for string operation what i found, but this triffle is missing (maybe i dont know how to do it in plugin ...)
Kcko
 
Posts: 10
Joined: Sat Feb 09, 2013 10:37 am

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

Postby tito on Fri Sep 27, 2013 3:33 am

hasher is the only plugin for html entities that works. Has an option to encode just < > " ', or all which will turn your smile to &#9787;
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 706
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 8 guests