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 2K
  • Mac 446
  • Linux 105
Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5
Windows 0 0 1 0 3 2 0 0 1 1 0 0 1 0 0 1 0 0 1 1 2 0 1 1 0 1 1 2 0 0 2 0 1 1 1 2 1 0 2 1 2 0 1 1 2
Mac 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 1
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 2 0 0 0 0 0 1 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