selection-to-file
A short description of your package
mvalipour 130 1 0.6.0 MIT GitHub

selection-to-file package

Select some text then turn it into a new file or match your file name.

apm install selection-to-file

Commands:

  • selection-to-file:new-file (ctrl-r n): creates a new file (in the same directory as active editor) and name it based on the text selection and current file extension.
  • selection-to-file:new-file-prompt (ctrl-r ctrl-n): same as this 👆 - prompt mode.
  • selection-to-file:match (ctrl-r m): same as this 👆 but instead of a new file, it renames current file.
  • selection-to-file:match-prompt (ctrl-r ctrl-m): same as this 👆 - prompt mode.
  • selection-to-file:pluck (ctrl-r p): Plucks the selected text into a new file, prompting for the new path.

Currently supports

  • .rb files -- snake_case
  • .js files -- kebab-case
  • .cs files -- PascalCase

Contribute

Contribution are welcome!