Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Microscopic Sublime Text 2 plugin created as an answer for http://stackoverflow.com/questions/13702405/
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
NewFileFromScope.py
NewFileFromScope.sublime-commands
README.md

README.md

NewFileFromScope

Microscopic Sublime Text 2 plugin created as an answer to http://stackoverflow.com/questions/13702405/

This plugin adds a "New File From Scope" command to your Command Palette which will, upon invocation, 1) extract the scope of the current selection and 2) create a new file named after the scope's content (this will also work with multiple selections).

For instance, while editing the following line:

<link href="app.css" rel="stylesheet">

place the cursor anywhere in the app.css text, open the Command Palette (Command + Shift + P under OS X) and invoke New File From Scope. This will get you a new, empty file pre-named app.css.

How to install

I didn't want to pollute the list of packages available through the amazing Package Control. Because of this, installation of this plugin requires a bit more handling than usual:

  1. Open the Command Palette and invoke the Package Control: Add Repository command
  2. Paste "https://github.com/gregsadetsky/NewFileFromScope.git" (without the quotes) into the input panel, then press enter
  3. Open the Command Palette and invoke the Package Control: Install Package command
  4. Type New File From Scope -- the list of proposed plugins should filter down to this sole one
  5. Select the plugin in the list, and press enter

You should now be able to invoke New File From Scope from the Command Palette.

Something went wrong with that request. Please try again.