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
  • 8 years ago
  • 2 hours ago
  • 11 years ago

Installs

  • Total 2K
  • Win 1K
  • Mac 490
  • Linux 279
Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20
Windows 0 0 0 0 0 1 0 0 0 0 0 0 1 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 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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.