ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Code​Wrapper

by erbridge ST3

A Sublime Text 3 package to wrap code at the touch of a button.

Details

  • 2016.10.02.18.19.01
  • github.​com
  • github.​com
  • 3 years ago
  • 2 hours ago
  • 6 years ago

Installs

  • Total 1K
  • Win 840
  • OS X 412
  • Linux 215
Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2
Windows 0 0 0 2 1 0 0 0 0 0 1 1 1 0 0 0 0 1 2 0 0 0 0 1 2 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1
OS X 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Linux 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

CodeWrapper

Inspired by consolewrap, CodeWrapper wraps any code with other code at the touch of a button(ish).

How?

To use, first set up some wrappings in Packages/User/CodeWrapper.sublime-settings. See the default settings for hints. It is also possible to add per-project settings to your .project-settings file. Just add the package settings to the key CodeWrapper.

Once a wrapper is set up, select some code to wrap, open the command palette and select CodeWrapper.

I don't like packages setting their own keybindings, so CodeWrapper doesn't. If you want to bind CodeWrapper to some keys (and you should), add the following to your Packages/User/Default (${OS_NAME}),sublime-keymap file:

[
    // CodeWrapper
    { "keys": ["ctrl+shift+l"], "command": "code_wrapper" }
]

Contributions

Bug reports, forks and pull requests are welcome.

Please make sure the tests all work before submitting anything, and add new ones for new features.