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

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