Daniel Bradbury
Software engineer based in Sacramento, CA
"Requirements for a Text Editor"
These are my minimum requirements for a competent text editor. The list is meant to serve as a quick litmus test for true understanding of tooling in the craft of writing software.
- Navigate with ease; jumping to line number, move to top/bottom of file, selection/deletion helpers (inside of quotes, block, function, etc)
Fuzzy file finder + jump to mentioned files / methods
- I use
ctrl-p
to fuzzy find in vim (one of my must have plugins)
- For part of my day
rails.vim
provides handy helpers to jump from model to controller using custom commands like:Emodel
, and:Econtroller
. When not working with Rails I can typically rely onctags
to do the trick and allow me togf
around projects at will (hard to beatCommand+Click
inspection in RubyMine)
- I use
Run spec(s) without having to Alt+Tab
- I use
vim-dispatch
to run tasks in the background and have the results returned in the vim quickfix window - When running a single test or named context I can use a custom hotkey to select the test name under the cursor and create the dispatch command to run
- I use
Find Regex pattern within file (replace, count, etc)
- I'm lucky enough that my editor has
%s
. Allows for a ton of options with the same simple DSL
- I'm lucky enough that my editor has
Search entire project (git grep or Ag inside the editor)
- Results should be returned in easy to parse format with jump-to-file capabilities
Organize code into tabs / windows / panes
- This should come with all editors now but please know how to
vsplit
if you claim to be avi
user..
- This should come with all editors now but please know how to
View git changes within file (+/- on line numbers) and basic git workflow integration (git blame, commit/push without leaving editor)
- I use
vim-gitgutter
to track changes to the file. This has become a staple of my vim config and I couldn't imagine working without it.
- For the rest of my git functionatlity I use Tim Pope's `vim-fugitive', serves as a wonderful git wrapper for the majority of git commands.
- I use
Customizability
- This is the whole reason I am a
vim
user. I love the ability to change almost all facets of the editor; from basic config options in.vimrc
to addingautocmds
to change functionality for events within the editor (file open, file save, etc). In my mind an editor should allow the user to tailor the tool exactly how they want it.
- This is the whole reason I am a
It's important for anyone writing software to respect the craft and maximize the effectiveness of the tools we use to create. Since the editor is such an important tool in our toolbelt we should always strive to optimize and improve our daily usage.