Sublime Forum

PowerUser package for power users

#1

Ok finally got around to release the package nick said I was intyping it too much lol.

anyways, the package features and adds a bunch of features that I think it makes sublime editing much better :smile:

Features Include:

  • Copy scope to cliboard
  • Reload Project
  • Strip Trailing spaces on save
  • DO MULTIPLE SELECTIONS WITH KEYBOARD ONLY (NO MOUSE REQUIRED!)
  • DUPLICATE CURRENT LINE OR SELECTION
  • HTML Entities and URL Escaping commands
  • Add numbers in selection
  • Firebug-like Increase/Decrease numbers
  • EXEC SELECTED TEXT & EXEC SELECTED TEXT AND REPLACE
  • Put command ā€“ put 7 times ā€œblah blah\nā€
  • SublimeRunCmd ā€“ Shortcut to view.runCommand()
  • Title Case selected text
  • Paste Column, Strip Selection
  • SELECT COLUMN (SELECT FULL COLUMNS OF TEXT QUICK! EXPERIMENTAL BUT WORKS)
  • SELECT TEXT BETWEEN QUOTES (SINGLE OR DOUBLE) ā€“ (IT RECOGNIZES ESCAPED QUOTES TOO, SO THAT WONā€™T BE A PROBLEM.)
  • RightEraseByClass (for more info read the comments inside PowerUser.py)
  • RightEraseByClassSingle (for more info read the comments inside PowerUser.py)
  • Insert Open/Close tag (textmate style, you can wrap the tag to selections too.)
  • Useful Macros,Snippets.
  • My CSS Snippets (makes css writing alot faster)
  • getOnlineHelp command for PHP/CSS/XHTML (shift+f1) ā€“ (it uses php.net, and reference.sitepoint.com/css, reference.sitepoint.com/html for its referencesā€¦)

Screencast on the way to showcase all the features :smile: *someday when I get some time :stuck_out_tongue:

Enjoy it!

EDIT NEW LINK:
sublime-text-community-packages. ā€¦ rUser.html

0 Likes

Simple Questions, Simple Answers
How do I extend selection to a particular char
Unleash Sublime Text Hidden Power - Screencasts, Tips
#2

Itā€™s christmas, isnā€™t it?

many thanks

0 Likes

#3

[quote=ā€œtgkeulā€]Itā€™s christmas, isnā€™t it?

many thanks[/quote]

yup :wink:

0 Likes

#4

[quote=ā€œsublimatorā€]Hereā€™s a cool little command you might like Eblin.

Reverse selection directions so you can control contraction/expansion of selections in both directions easily with the keyboard.

pastie.org/539554[/quote]

Awesome thank you for that one my friend :smiley:

0 Likes

#5

This is really awesome. Thank you.

Is there an easy way to find out a shortcut list for CSS and html properties?

0 Likes

#6

[quote=ā€œfirefusionā€]This is really awesome. Thank you.

Is there an easy way to find out a shortcut list for CSS and html properties?[/quote]

Am afraid I donā€™t understand your question :frowning: ?

0 Likes

#7

[quote=ā€œsublimatorā€]@EJ12N

I think he may mean some way to get a list of the tab trigger abbreviations for the snippets.[/quote]

Oh okā€¦ well most of the css/html snippets are now obsolete kind of with ZenCoding package so :stuck_out_tongue: so they might go awayā€¦

0 Likes

#8

It looks like there is a conflict between PowerUser and Zen Coding. If you start a new CSS document and try the following rules youā€™ll see that the tabbing automatically fans out.

http://dl.getdropbox.com/u/497583/zen-tabs.png

Edit: Ok the fix is for Zen Coding

http://www.sublimetext.com/forum/viewtopic.php?f=2&t=580&start=60#p3076

0 Likes

#9

Ok I have added getOnlineHelp command for PHP/CSS/XHTML

it uses php.net, and reference.sitepoint.com/css, reference.sitepoint.com/html for its referencesā€¦

default binding to shift+f1, if thereā€™s text selected it uses that if not it uses word under cursor

Enjoy it.

NOTE: eventually sometime I will edit it to use local help files (chm)ā€¦

0 Likes

#10

Iā€™m having a problem when typing open curly braces in a CSS document. I get the following error in the console and no curly brace appearsā€¦

No such snippet Packages/PowerUser/Snippets/curly_braces.sublime-snippet
0 Likes

#11

[quote=ā€œfirefusionā€]Iā€™m having a problem when typing open curly braces in a CSS document. I get the following error in the console and no curly brace appearsā€¦

No such snippet Packages/PowerUser/Snippets/curly_braces.sublime-snippet

umm ok my bad I removed that, I believe sublime does curly braces by default nowā€¦ :smile:

0 Likes

#12

Hello
Iā€™m totally newbie on sublimetext and of course on plugins. I just downloaded then installed Power Use package.
Installation did work fine.
But on sublime menus I find just two entries to use PowerUser : on Tools Macros and on Tools Snippets.
But I donā€™t find how to use the other features like all those are listed on the first message of this topic.
Please, help me to use PowerUser and why notā€¦ other plugins.

Thanks in advance

Best regards

JJK

0 Likes

#13

[quote=ā€œjjkā€]Hello
Iā€™m totally newbie on sublimetext and of course on plugins. I just downloaded then installed Power Use package.
Installation did work fine.
But on sublime menus I find just two entries to use PowerUser : on Tools Macros and on Tools Snippets.
But I donā€™t find how to use the other features like all those are listed on the first message of this topic.
Please, help me to use PowerUser and why notā€¦ other plugins.

Thanks in advance

Best regards

JJK[/quote]

Ok basically the first thing to familiarize yourself with plugins if you have no understanding of python is to look at the Default.sublime-keymap in the plugin folder
This file lists the shortcuts for the commands that the plugin itself provides to the user, from here you can play with the shortcuts in a new empty file and try the commandsā€¦

I commented most the shortcuts and what they do
ie:

<!-- Zoom In/Out -->
  <binding key="alt+equals" command="zoomIn" />
  <binding key="alt+minus" command="zoomOut" />
  <!-- Get Online Help for PHP/CSS/XHTML -->
  <binding key="shift+f1" command="getOnlineHelp" />

I promise better documentation is coming :smiley:

0 Likes

#14

It seems I only need one command from this package - The ability to duplicate lines with ctrl + D.

Is there a way to get just that feature?

0 Likes

#15

You just need to locate the command used by the key binding and place it wherever you want (Packages/User, usually).

Hereā€™s this particular one extracted directly from the repo:

code.google.com/p/sublime-text-c ā€¦ werUser.py

Now you only need to add a key binding for it and youā€™re good to go.

"""
Duplicates Current Line or Selected text
---
Duplicates current line if there's nothing selected. Else duplicates content
"""
class DuplicateLineCommand(sublimeplugin.TextCommand):
  def run(self, view, args):
    for region in view.sel():
      if region.empty():
        line = view.line(region)
        lineContents = view.substr(line) + '\n'
        view.insert(line.begin(), lineContents)
      else:
        s = view.substr(region)
        view.insert(region.end(), s)
0 Likes

#16

Got it working. Thanks :smile:

0 Likes

#17

Looks like the link is broken now. Is this up somewhere else? Thanks!

0 Likes

#18

I have updated the link.
sublime-text-community-packages. ā€¦ rUser.html

0 Likes

#19

It would seem that this package isnā€™t compatible with Sublime Text 2 ?

I downloaded the package file, dropped it into my sublimb packages folder; doubleclick it and restart sublime, and it complains about issues with the key bindings script. The macros appear in the Macros menu item, but none will successfully run.

Thereā€™s no useful documentation whatsoever for it. What gives?

0 Likes

#20

Uhmmā€¦ look at the date. Itā€™s from 3 years ago. I donā€™t even know how you managed to dig this upā€¦

0 Likes