Find Your Feature Fit: How to Pick a Text Editor for Python Programming

30-minute Talk - date TBD at time TBD in room TBD

What is important to you when it comes to text editors? To find out, join us in comparing VS Code and Vim. From version control integration to source code highlighting, with auto-completion, testing, virtual environments, snippets, code navigation and linting in between, learn how VS Code and Vim handle each feature and decide for yourself what fits your programming preferences when using Python.

This presentation will explore the different features of text editors for Python programming. By comparing the capabilities of VS Code and Vim, audiences of all skill levels will receive the necessary information to make an informed decision about which text editor fits their programming preferences. Using a day in the life of a Python programmer as a guide, the talk will introduce and compare features including fuzzy file finding and code navigation, auto-completion, source code highlighting, linting, testing, virtual environments, and snippets. For VS Code and Vim, these selected features showcase what is most important to a Python programmer, highlighting the trade-offs and benefits of both text editors.

Fuzzy file finding—the ability to open a file automatically through searching one or more words associated with a specific name—is an essential feature for programmers. Microsoft has an extension which makes fuzzy file searching accessible for Visual Studio Code users. The most popular Vim plugins for this feature are ctrlp.vim and FZF, which are both widely accessible. For both VScode and Vim, fuzzy file finding is comparable in usage, making both text editors effective in enhancing a Python programmer’s workflow. Another feature related to fuzzy file finding is code navigation. Both Visual Studio Code and Vim have features for code navigation. With that said, code navigation in VS Code is easier to use and configure. than the feature for Vim through valuable how-to guides and a simple user interface.

In contrast to fuzzy file searching, auto-completion is a feature for which VS Code is emerges as the current winner over Vim. With Microsoft’s implementation of IntelliSense—their own Language Server Protocol or LSP—in addition to an easy-to-install extension for Python, auto-completion with Visual Studio Code makes the code-writing process much smoother. IntelliSense provides code completions that are based on an analysis of source code, along with the language semantics of a programmer’s code. This feature is almost incomparable to the plugins required for Vim auto-completion features, or it’s LSP, which is still in its infancy.

A feature of Vim that is far past its infancy—and has transcended well into a necessity—is source code highlighting. Often overlooked when considering the essentials of Python programming, source code highlighting can assist tremendously when a programmer reviews code. In Visual Studio Code and Vim, source code highlighting is available through simple extensions, though Vim provides a much more configurable version. With that said, VSCode furnishes a more user-friendly interface for setting exact requirements for highlighting. Even with a slightly higher learning curve, Vim’s extensive highlighting configurations are worth it.

Linting and automated code formatting are features used by many programmers in the Python community. The ability of a plugin to access code and format it by parameters set by the programmer is essential in maintaining readability. Python linters must be enabled. Yet, after this is done, a simple command can run through the code and find and present the problems associated with that specific code. Though Visual Studio Code linter cannot directly change the problem areas of code, it is a useful feature. Linting with Vim has to be run using a plugin like the asynchronous linting engine (ALE). This fact alone could lead to the determination that VS Code is simpler in terms of linting, though certain plugins for Vim are much more helpful than VS Code Python linting. In most cases of Vim linting plugins, not only is the erroneous code pointed out, but it is also automatically fixed. With that said, both VS Code and Vim support integration with the Black tool for automated code formatting. In comparison to VS Code, Vim arguably provides a more effective approach to linting and automated code formatting.

A feature where there is no clear indication of a forerunner when comparing VSCode and Vim is testing. Testing, an integral part of Python programming, can range from running one test case to one test suite to multiple test suites. Both VS Code and Vim are excellent at enabling programmers to do each of these tests, and also provide a mechanism to record and present which tests pass and which tests fail. With Visual Studio Code, the testing extension provides full access to the VS Code API, which can run without a VS Code instance. Vim testing is enabled through various plugins, all which run quickly and efficiently. Test.vim is a well-used plugin that provides an abstraction of many different tests over the command line, including, for instance, Nose, Pytest, and PyUnit for the Python programming language.

Since Virtual environments are an integral part of Python programming, it is nice to see that both VS Code and Vim provide support to, for instance, create and destroy virtual environments and install and managing package dependencies. This presentation will highlight how tools like pip and pipenv integrate with both text editors, ultimately revealing that the feature sets for the two text editors are comparable.

Snippets are a feature that is highly configurable by both Visual Studio Code and Vim. As a mechanism that associates keywords with programmable blocks that are then “filled in” to code segments, snippets must have the ability to be developed by the programmer. This can be done as another feature of Microsoft IntelliSense in VS Code and several Vim plugins. Snippets help to save time when writing code, along with assisting in avoidance of mistakes. Snippets make Python programming more efficient and more effective, whether VS Code or Vim is used.

VS Code and Vim are outstanding text editors for Python, with features that can assist in everyday programming tasks. In different ways, and possibly with different disadvantages or benefits, these text editors improve efficiency, effectiveness, readability, workflow, and code review. With this knowledge of features that VS Code and Vim offer, the audience will be able to choose which editor is best for them, emerging with the know-how to configure it to their Python preferences. Both beginners and experts alike will be capable of finding their feature fit for a text editor to support Python programming!

Presented by: