Jupyter notebooks in Neovim. Edit cells, run code, and view plots in your terminal.
Requires Neovim 0.12 or newer. Add this plugin spec to your lazy.nvim configuration:
return {
"WhiteHades/ipynb.nvim",
lazy = false,
opts = {},
}Run :Lazy sync, then :IpynbInstall and restart Neovim.
See installation details for system requirements and image setup.
Open nvim example.ipynb. Keys use Normal mode unless noted; <localleader> defaults to \.
| Keys | Action |
|---|---|
<localleader>n or :Ipynb |
Open notebook actions. |
<localleader>r or Ctrl+Enter |
Run cell. |
<localleader>r in Visual mode |
Run selection. |
Shift+Enter |
Run cell and move to the next code cell. |
<localleader>R |
Run all cells. |
<localleader>a |
Run cell and cells above. |
<localleader>b |
Add code cell below. |
<localleader>m |
Add Markdown cell below. |
<localleader>s |
Interrupt execution. |
<localleader>o |
Open full output. |
<localleader>O |
Close output or image viewer. |
<localleader>x |
Open image or HTML output. |
<localleader>i |
Restart kernel and clear variables. |
q or Esc in output or image viewer |
Close the view. |
zo / zc |
Open / close metadata. |
i |
Edit cell and fences. |
:w |
Save with configured formatting and linting. |
Existing mappings take precedence. Modified Enter keys depend on your terminal.
See configuration and saving for settings and standalone environments.
PyTorch can use CUDA in your project kernel; notebook code selects GPU or CPU.
Run :checkhealth ipynb to check setup or :IpynbInstall to repair it.
See Jupytext, format help, testing, credits, or report an issue.
