"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-pto fuzzy find in vim (one of my must have plugins)
- For part of my day
rails.vimprovides handy helpers to jump from model to controller using custom commands like:Emodel, and:Econtroller. When not working with Rails I can typically rely onctagsto do the trick and allow me togfaround projects at will (hard to beatCommand+Clickinspection in RubyMine)
- I use
Run spec(s) without having to Alt+Tab
- I use
vim-dispatchto 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
vsplitif you claim to be aviuser..
- 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-gitgutterto 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
vimuser. I love the ability to change almost all facets of the editor; from basic config options in.vimrcto addingautocmdsto 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.