Developer productivity with the keyboard

As a developer I am often looking ways for improving the way I write code, and also, texts in general, like this post for example. Throughout the years I tried different editors and IDE’s. In this journey, I found that each tool focus on one side of the equation.

For example, IDE’s tend to focus on the integration as a way to improve developer’s workflow, one single place to do everything: accessing terminal, writing code, runnings test, accessing the database and so on. On the other hand, text editors are focused on a specific task, editing texts. Which doesn’t mean that it can be used for other things. Usually text editors have a plugin system to power them up.

I have tried both approaches and I couldn’t keep with one or the other. I wrote my journey on vim, registering it as I went through the challenge, starting from with the idea of using vim for 30 days, then one week after and finally the last part after 30 days when the challenge has finished.

The goal of this post is to share the most used features that I kept from vim and other features that I use in IDE’s. In the end I use a mix of IDE’s and text editors.

NOTE: Keybindings used inthis post have been tested in jetbrains based IDE’s and with ideavim installed as well as vim and neovim.

NOTE 2: I wrote about the setup I am using for the time of this writing.

Moving around

One of the first things to get familiar with is how to move around, list files, split windows (vertically and horizontally), close window, move a window and so son.

Moving based on vim

command Description
:vs Split vertically
:sp Split horizontally
ctrl + w + w Navigate between splits

Editing code

In this section I try to list the most used keys that I use for editing code (and sometimes text as well).

command Description
d + w  
c + w  
c + s + ‘ + “ Replaces the surrounding ‘ with “, both can be replaced by any character

Searching for files

Search depends on what you are searching for and which program you are using, searching for files across jetbrains based IDE’s if as simple as hitting shift twice. On the other hand I use fzf with vim.

Searching based on vim

command Description
+ , Enables duzzy search based on the current directory

Searching based in jetbrains

command Description
shift + shift Enables duzzy search based on the current project, itis possible to filter by directory or file extensions