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

Code​Cells

by jesseengel ALL

A SublimeText 2/3 Plugin for easily copying chunks of code to paste into a REPL

Details

Installs

  • Total 3K
  • Win 3K
  • Mac 504
  • Linux 118
Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 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
Windows 0 0 1 3 0 3 0 0 1 1 4 0 0 2 0 5 0 1 2 0 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 2 2 1 2 2 1
Mac 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0
Linux 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

CodeCells is a simple package for Sublime Text 2/3 that facilitates copying and pasting chunks of python code from a script into a REPL like IPython. This allows you the easy of working with cells of code that you might get from an IPython Notebook, but with the work flow of having separate panels for your code and it's output.

The use of cells is taken from the Spyder IDE #%%, which in turn took it from Matlab %%. It could be extended to other languages by changing the cell marker, but I thought it might be useful to others in it's current form.

Code cells can be copied to the clipboard (for pasting into your favorite REPL) and traversed up and down quickly. There is also a command for quickly creating cell markers which is helpful for code as well.

Usage

I find it easy to add the following quick bindings lines to my user keymap.

{ "keys": ["shift+enter"], "command": "execute_cell" }, # Copy cell and move to bottom of cell
{ "keys": ["alt+down"], "command": "move_down_cell" }, # Incrementally adds cells to clipboard
{ "keys": ["alt+up"], "command": "move_up_cell" }, # Clear Clipboard
{ "keys": ["super+shift+/"], "command": "insert_cell_divider" } # Also works with text selected