Vim setup as a Python IDE with REPL similar to Spyder/VSCode

This page summarizes the projects mentioned and recommended in the original post on /r/Python

WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • vim-rapidrepl

  • Been using this setup for a year so I thought I'd share it. Using plugins it features: * Integrated IPython REPL. Starts automatically when Vim is launched (can also use jupyter console instead). * Text editing is mostly done using modern editing shortcuts (Ctrl-PgUp/Down for cycling between buffers, selected text is replaced) with some combination of VIM normal mode commands (save using :w and quit using :qa). See vim tutorial for basic introduction. ESC enters normal mode. Ins or i enters insert (edit) mode. * Code cell navigation similar to Matlab/Spyder/Jupyter notebook (Ctrl-up/down) * Code execution in REPL (using Vim-Slime plugin): Whole file (F5), Cell execution (C-Enter or space-Enter), Single statment/selection execution (Space-1, Space-3), Current symbol under cursor execution (Space-2). All in normal mode. * LSP integration (using Vim-LSP plugin and PYLSP): show/goto symbol (Space-p), goto definition (gd in normal mode), show references (gr) * Using popup menus for usefull commands (using LeaderF plugin): show buffers (C-p), open file (C-l), open last edited files (Space-l), show LeaderF commands (C-x). Use Ctrl-j/k to cycle up and down in the list. * Copy-paste to/from system clipboard works in Editor, REPL and also normal mode. * Debug using (Space-d) which inserts debug statements. Then run the code as usual (F5 or run cell) to drop into ipdb. Alternatively as always you can use IPython %debug when an error occurs. For more advanced usage there is the vim Spector plugin. * Toggle comments using C-/ (normal mode) * Switching between the REPL and editor (Alt-1 or C-W,C-W). Also easily 'inspect' a variable even in ipdb by sending the variable to ipython using the keyboard * Using IPython already have many builtin features, sometimes missing from IDEs: symbol completion in the REPL, REPL search history, kernel interrupting (Ctrl-c), text is auto scrolled at the bottom when output is appended (long for loops) * You can access the REPL output and copy it by using the keyboard (Escape and then the usual editing commands)

  • pylsp-rope

    Extended refactoring capabilities for python-lsp-server using Rope

  • pylsp-rope for refactoring capabilities

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • vim-jumpsuite

    Jump to "interesting" line of code from your test suite.

  • vim-jumpsuite for creating a quickfix/loclist jumps out of unittest tracebacks

  • pudb

    Full-screen console debugger for Python

  • pudb for visual Python debugger, usually running in :terminal window, can be integrated to Vim in very similar way to IPython

  • vim-test

    Run your tests at the speed of thought

  • vim-test for easily running test suites

  • vim-textobj-python

    Text objects for Python.

  • vim-textobj-python and having language aware text-objects are also very useful, especially when Slime-ing code to the REPL.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Tracing Python

    2 projects | news.ycombinator.com | 24 May 2023
  • Make your Debugging easier with these 8 tips in Python

    1 project | /r/Python | 3 Mar 2023
  • What do you use for an IDE and for debugging?

    5 projects | /r/vim | 30 Jan 2023
  • Full-screen console debugger for Python

    1 project | news.ycombinator.com | 22 Aug 2022
  • Beginner suggestion: Test your code manually

    1 project | /r/Python | 16 Jul 2022