Home Download Buy Blog Forum Support

Sublime Extras – for when 10 changes isn't enough

Sublime Extras – for when 10 changes isn't enough

Postby Veedrac on Sun Aug 18, 2013 5:19 pm

https://github.com/Veedrac/Sublime-Extras

Most plugins have a defined goal. They provide a function or two to serve a specific purpose, fill a particular niche.

Sublime Extras, colloquially referred to as Extras, is not that kind of plugin. It's a kind of dressing for the whole editor, giving numerous but small changes that stack up to make it a better editor to serve me. Hopefully there are some similarities between us, because if there are it'll be a better editor for you, too.

As such Extras does not try to be unique. There are plugins shamelessly copied and there is code ruthlessly reused. I have tried to credit all I can for the wonderful works that this derives from, but if any of this upsets or short-changes you just raise a complaint and I'll see what I can do. You might also wonder why some of my sub-plugins are just other people's with fewer features. Simply put, those features aren't useful to me and it's easier to maintain clean code when the cruft is gone.

Here's a quick list that doesn't really do it justice:

  • Create a new cursor at next character, word or the end of the line
  • Sane `add_next_line` command — don't "lose" cursors in the gutter on empty lines!
  • A `find_all_under` that really works with multiple cursors
  • Align your cursors across lines
  • "Esc" that lets you choose which cursor to escape to
  • Inline eval (Python) with format-able auto-numbering and multi-line input and output
  • Repeat a macro a specified number of times
  • Combine multiple commands in a shortcut with `run_multiple_commands`
  • Keep workspace quasi-centered with "spacing borders" on above and below
  • Split selections into characters and words
  • Split selections by lines and remove blank lines from selections
  • Keep or dump every nth selection
  • Intelligently combine selections
  • Store and retrieve selections
  • Easily write any named Unicode character using Sublime Text's autocomplete
  • Get loads of commands missing from the command palette into the command palette

See https://github.com/Veedrac/Sublime-Extras. The AnimatedPortableNetworkGraphics really show it off. Please do watch them before judging, for good or bad.

Some uses are obscure yet natural – the text "AnimatedPortableNetworkGraphics" was bolded using "split_selections_into_chars", the "–" from earlier in this sentence used the Unicode extension. It really does feel like a slightly-larger Sublime Text, and that's why it's Extras.


Thanks for your time; I hope you like it.
Veedrac
 
Posts: 19
Joined: Sun Aug 18, 2013 4:16 pm

Re: Sublime Extras – for when 10 changes isn't enough

Postby adzenith on Sun Aug 18, 2013 9:34 pm

Pretty neat! I really like the approach you took with inline evaluation - way easier to just use python's formatting than to learn a new plugin's proprietary syntax, and also way more flexible.
Instead of "Aligning cursors" and "Combine selections", have you ever tried out SelectUntil? I find it to be very useful!
Also I think no discussion of odds and ends would be complete without CopyEdit, but I may be biased :)
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Sublime Extras – for when 10 changes isn't enough

Postby Veedrac on Mon Aug 19, 2013 3:23 pm

adzenith wrote:Instead of "Aligning cursors" and "Combine selections", have you ever tried out SelectUntil? I find it to be very useful!

I have and it's awesome.

"align_cursors" was initially meant to be my solution to the same problem because I have a(n irrational) hatred of regex and dialog boxes. Unfortunately there are tradeoffs in both speed and power when removing those.

"align_cursors" works in almost all wanted cases for me so I'm determined to keep going along this path 'till I find something that truly "clicks" but I can't say I've never missed having the same level of power of SelectUntil.

adzenith wrote:Also I think no discussion of odds and ends would be complete without CopyEdit, but I may be biased :)


I actually found out about that the day I posted, yes. I haven't used it yet but it does look awfully tempting...
Veedrac
 
Posts: 19
Joined: Sun Aug 18, 2013 4:16 pm

Re: Sublime Extras – for when 10 changes isn't enough

Postby adzenith on Mon Aug 19, 2013 5:26 pm

Veedrac wrote:...a(n irrational) hatred of regex and dialog boxes. ...

Hm, you're starting to win me over to the align cursors way of life... Maybe I'll give it a shot!

The times when SelectUntil really shines, though, are when you want to select multiple blocks and each one has a different number of lines. Then you can use CopyEdit to correctly copy and paste those blocks! :)
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 4 guests