The tools I’m using

At this point it life, I just want to use small tools that I could learn/master. I’m mostly tired and burned out and have no patience. Also for the same reason I want to keep my tools as simple as possible. I still use a manual drill, so I want to keep using tools that I can bent to my will and not the opposite.

These days I’m using vis, ripgrep and fzf and that seems to be enough for my daily work, which mostly consists on reading code.

Here I’m thinking on terms of documenting and realize sometime in the future which things I keep doing that should be automated. Or to have a retrospective on bad/slow was my workflow in the past.

When trying to get acquainted with a project is just run tree. If the project has a test folder, then I start looking at the tests, to see which functions were thought worthy of adding unit tests.

If there are no unit tests, then the integration tests. If there are no tests at all then I go to the readme and start reading how according to the documen- tation this software operates, but documentation and reality are not the same, but at least having a README could point me to some direction.

Sometimes I don’t want to read the documentation (based on the size of the project) and just start exploring how functions are named. (rg regex should be adjusted to the language the repo is using)

rg --line-number 'fn ' . | fzf | awk -F: '{print "+"$2, $1 }' | xargs -o vis

Maybe I want to just want to explore looking at the file names, just to see some naming convention or some hints based on naming on how it works.

fzf --multi | xargs -o vise

Now, if I want to see all the references for the symbol JobBuilder

 rg --line-number  "JobBuilder" . | fzf | awk -F: '{print "+"$2,$1}' | xargs -o vise

One mental switch that I’m getting used to, is not to do everything on the editor, just pipe with some filters what you want to read/edit to the editor, emacs tries to be all the tools in one, here I’m striving for simplicity and composability of the tools.

Piping shell commands is different in vis vs vi, the operators |, < and > are used, the mutation of a range of lines with a shell command is not a problem. To read the output of a shell command like git diff main..somebranch – % , in vis the % does not have a meaning, so I need to create a new file, and push the diff in that with :| git diff main..somebranch – and I can see and navigate in the output.