{"id":18363291,"url":"https://github.com/julienr/vim-cellmode","last_synced_at":"2025-07-28T23:08:39.613Z","repository":{"id":17414912,"uuid":"20187818","full_name":"julienr/vim-cellmode","owner":"julienr","description":"Vim MATLAB-like cell execution for tmux/ipython","archived":false,"fork":false,"pushed_at":"2020-10-31T13:05:22.000Z","size":35,"stargazers_count":77,"open_issues_count":6,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T15:39:37.482Z","etag":null,"topics":["python","scientific-computing","tmux","vim-cellmode","vim-ipython"],"latest_commit_sha":null,"homepage":null,"language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julienr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-26T13:59:59.000Z","updated_at":"2024-11-20T04:16:23.000Z","dependencies_parsed_at":"2022-08-27T00:22:00.492Z","dependency_job_id":null,"html_url":"https://github.com/julienr/vim-cellmode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/julienr/vim-cellmode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienr%2Fvim-cellmode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienr%2Fvim-cellmode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienr%2Fvim-cellmode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienr%2Fvim-cellmode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julienr","download_url":"https://codeload.github.com/julienr/vim-cellmode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienr%2Fvim-cellmode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267600314,"owners_count":24113760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","scientific-computing","tmux","vim-cellmode","vim-ipython"],"created_at":"2024-11-05T23:05:57.981Z","updated_at":"2025-07-28T23:08:39.595Z","avatar_url":"https://github.com/julienr.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"Vim-cellmode\n============\nThis a vim plugin that enables MATLAB-style cell mode execution for python\nscripts in vim, assuming an ipython interpreter running in screen (or tmux).\n\nDemo\n----\n[![Youtube demo video](http://img.youtube.com/vi/ju50L7Fcn7w/0.jpg)](http://www.youtube.com/watch?v=ju50L7Fcn7w)\n\nUsage\n-----\n\nBlocks are delimited by `##`, `#%%` or `# %%` (customizable through\n`cellmode_cell_delimiter`).\nFor example, say you have the following python script :\n\n    ##\n    import numpy as np\n    print 'Hello'                  # (1)\n    np.zeros(3)\n    ##\n    if True:\n      print 'Yay !'                # (2)\n      print 'Foo'                  # (3)\n    ##\n\nIf you put your cursor on the line marked with (1) and hit Ctrl-G, the 3 lines\nin the first cell will be sent to tmux. If you hit Ctrl-B, the same will happen\nbut the cursor will move to the line after the ## (so you can chain Ctrl-B).\n\nYou can also select line(s) and hit Ctrl-C to send them to tmux. The plugin\nautomatically deindent selected lines so that the first line has no\nindentation. So for example if you select the line marked (2) and (3), the\nprint statements will be de-indented and sent to tmux and ipython will\ncorrectly run them.\n\nRequirements\n------------\nOn Linux, you need xclip if you want to use screen.\n\nKeys mapping\n-----------\nBy default, the following mappings are enabled :\n\n* *C-c* sends the currently selected lines to tmux\n* *C-g* sends the current cell to tmux\n* *C-b* sends the current cell to tmux, moving to the next one\n\nYou can disable default mappings :\n\n    let g:cellmode_default_mappings='0'\n\nIn addition, there is a function to execute all cells above the current line\nwhich isn't bound by default, but you can easily bind it with :\n\n    noremap \u003csilent\u003e \u003cC-a\u003e :call RunTmuxPythonAllCellsAbove()\u003cCR\u003e\n\n\nOptions\n-------\nYou have to configure the target tmux/screen session/window/pane. By default, the\nfollowing is used :\n\n    let g:cellmode_tmux_sessionname=''  \" Will try to automatically pickup tmux session\n    let g:cellmode_tmux_windowname=''\n    let g:cellmode_tmux_panenumber='0'\n\n    let g:cellmode_screen_sessionname='ipython'\n    let g:cellmode_screen_window='0'\n\nThis scripts relies on temporary files to send text from vim to tmux. To\nallow cell execution queuing, we use a rolling buffer of temporary files.\nYou can control the size of the buffer by defining `g:cellmode_n_files` (10\nby default).\n\nTo choose between tmux and screen, set `g:cellmode_use_tmux=1` (or 0 if you want screen).\nNote that currently, CopyToScreen relies on OSX' pbcopy to set the paste buffer.\n\nYou can also configure the cell delimiter. This is done through the\n`g:cellmode_cell_delimiter_variable` (prefix it with b: to only\naffect the current buffer). This is used inside a regexp so you can use regexp\nin it. So for example\n\n    set g:cellmode_cell_delimiter='\\(##\\|#%%\\|#\\s%%\\)'\n\nwill match `##`, `#%%` and `# %%` as cell delimiters. This is the default configuration.\n\nDifference with vim-ipython\n---------------------------\nNote that if you want more advanced integration with IPython (using the new\nmulti-client architecture), there is the vim-ipython project :\nhttps://github.com/ivanov/vim-ipython/\n\nThe main difference with vim-ipython is that this plugin simply emulate a paste\nas you would do it manually from vim to ipython. This allow to see the result\nof the execution directly in the ipython split whereas vim-ipython uses a\nseparate vim buffer to show the results.\n\nLicense\n-------\nMIT (see LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienr%2Fvim-cellmode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulienr%2Fvim-cellmode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienr%2Fvim-cellmode/lists"}