Pulsar, the best code editor

The key to being productive as a programmer is to have a great code editor. I have been an avid user of Atom since 2014, and its successor Pulsar since now in 2023.

The best code editor came from GitHub

Atom the code editor was created by Nathan Sobo, who joined GitHub in 2011 specifically to build the best possible code editor in the world. He also co-led development of Teletype for Atom, which pioneered collaborative code editing, i.e. multiple developers writing the same code files at the same time. The team also created the Electron Framework, which lives on as the user interface framework for e.g. Microsoft VS Code (created a couple years after Atom).

VS Code is actually the reason why Atom eventually died. In 2018 Microsoft aqured GitHub, the world’s largest open source hosting platform, to get premier mind share of developers, and as part of that plan Microsoft also wanted as many developers as possible to do all their coding using an editor controlled by Microsoft. To achieve this goal Microsoft invested hugely in VS Code, and naturally discontinued Atom after getting control of it through the GitHub acquisition.

However, being open source software, Atom can’t fully be killed. Yes, Microsoft controls the name, trademark and website - which are all now shutdown - but the source code is MIT licensed and has resurrected as Pulsar the editor.

Why does Pulsar have the “hyper-hackable text editor” as its tagline?

The key innovation in Atom (and now Pulsar) was to build the whole editor as a web application that runs locally (offline) inside a dedicated browser window (Electron). This radically lowers the barrier of entry for all the millions of web developers out there to participate in the development of the editor. It also has a very flexible plugin system (called packages) with over 10 000 community developed easily installable packages one can use to extend the features of the editor.

Pulsar is feature rich and very powerful already out-of-the-box, but thanks to the vast number of additional packages a developer can easily optimize ones workflow to be as productive as possible. If a package does not already exist for you use case, creating one yourself is moderately easy to most developers as you only need to know web development tech (JavaScript/CSS/HTML) to do it.

Consider the screenshot below showing a simple C source code file being edited.

Editing a simple C file in Pulsar

In this picture you can see that there is:

  • a linter that automatically highlights with yellow a specific code word the user should improve
  • a yellow vertical line shows what lines in the file has been changed and are not yet committed in git
  • a file browser showing the files in the project, with modified files being yellow, new files being green and files ignored by git being greyed out
  • a rich status bar showing the git status, cursor location, file encoding and type, git branch name and even the GitLab CI status for the latest git commit

This is perfect for my coding workflow - it does not feel bloated but has all the features I need without excess. Check out the post about How to code 10x faster than an average programmer to see the Pulsar autosave feature being used to create the optimal code-test-repeat workflow.

Powerful keyboard shortcuts - without the need to memorize too much

For maximum productivity most developers prefer to be able to do everything using the keyboard, without the need to lift your hand to fiddle with the mouse. Pulsar has a keyboard shortcut for almost everything. If something is missing, you can also configure more yourself, and you can change the default keyboard bindings if you have existing preferences. However, the best part is that you don’t really need to spend any time learning keyboard shortcuts - you just need to remember Ctrl+Shift+P. This opens the command palette, where you can write in a keyword, select the action and press enter, or see on screen the keyboard shortcut and use it until it has gone effortlessly into your muscle memory.

Open the command paletter in Pulsar by pressing Ctrl+Shift+P

The two other keyboard shortcut worth remembering is (same but without the shift) Ctrl+P that allows you to type a partial filename and press enter to quickly open any file in the project, and Ctrl+Shift+F to search a string anywhere in the project. The search feature is amazig, and also comes with a powerful search-and-replace feature with interactive previews on what string it would replace in which file.

Why not use Vim like all real programmers do?

I know several world class programmers in interestingly the common thing with them is that they all seem to use Vim as their code editor. Many people I know who think of themselves as world class programmers use Emacs.

While both of these can probably compete with Pulsar in number of extensions available and the amount of customizations and keyboard shortcuts, neither of them have a graphical user interface and they are complately incapable of doing things like showing images or for example a Markdown preview (which by the way you can open in Pulsar by pressing Ctrl+Shift+M).

Markdown preview in Pulsar by pressing Ctrl+Shift+M

Also, Vim and Emacs use modes to allow users to either write the text in the file itself or to enter commands for the editor. Modes are terrible to use, and thanks to people like Larry Tesler, we don’t haven’t had modes in any new software since the 1980’s. Instead we have keyboard shortcuts like Ctrl+C and Ctrl+V which are easy to use.

Are Electron apps slow?

Admittedly, Pulsar is a bit slow to start up. It takes maybe 6-8 seconds for it to fully load from scratch, but once it is open, using it feels pretty snappy. The slowness is due to being an Electron app, which is basically a web browser. Indeed the original author of Atom/Pulsar, Nathan Sobo, started a new code editor project after Atom was shut down. The new editor Zed is extremely fast as it is written in Rust and also because it utilizes the GPU for rendering. Zed is however not open source, and it is not available for Linux, so I have not even tried it. Instead I tested another promising Rust-based blazingly fast editor Lapce. It is truly fast and pleasant to use. However it lacks a lot of features, so I end up having to do extra manual work.

Thus, Pulsar is holds as my favorite editor and for me Pulsar is the fastest one for me when measuring how quickly I am able to deliver code changes and write complete and correct text.

My Pulsar config and packages

If you want to replicate the Pulsar setup I have going, this is my .pulsar/config.cson:

    confirmCompletion: "tab always, enter when suggestion explicitly selected"
    enabled: true
    showChangeLog: false
    showOnStartup: false

These are some of my favorite packages:

comments powered by Disqus