Sublime Forum

PowerUser package for power users

#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

#21

I’ve got it that the original discussion is aged, but the package is still posted at googlecode. Seems like either the package or sublime lack version checking for API support, so it just fumbles instead of reporting something useful such as the package uses an outdated API or somesuch.

In any event, it didn’t make for a particularly impressive first go at installing a third party extension into sublime.

0 Likes

#22

Install Package Control wbond.net/sublime_packages/package_control. This installs packages that work with ST2. This should make things go smooth for you.

0 Likes

#23

Thanks, I’ll take a look into that.

0 Likes