Terminal Tools That Changed My Workflow
During this term, I’ve been learning tools that improve how I work in the terminal. This post is a summary of what I learned from using Tmux, customizing Vim for writing, and going deeper into Vim/BASH features. For my workflow, learning these tools reduce cognitive overhead and make my workflow faster and more efficient.
Tmux – Why I Use It Now
Before using Tmux, managing multiple projects and terminals was frustrating. I would have to open multiple windows, manually navigate to directories using cd, and I would have to remember exactly what I was working, which is a big deal when working on multiple projects at the same time.
Tmux solves that.
With Tmux I can:
- Create a session for each project.
- Save the exact state of that session.
- Resume exactly where I left off, even after a reboot.
This means:
- I don’t have to remember what I was doing or in what directory.
- I don’t have to navigate to directories every time.
- I can close everything without worrying about losing progress.
Tmux became part of my daily workflow after only a few days of use, because of how much cognitive overhead it reduces.
Making Vim Work for Writing
I originally learned Vim for editing code, but this term required a lot of writing. I didn’t want to use a separate word processor, for several reasons.
So I turned Vim into one.
Vim is a keyboard-based editor with different modes:
- Normal: Navigate and run commands
- Insert: Type text
- Visual: Select text
Using Vim for everything reduces mental overhead. I don’t have to learn multiple apps with different shortcuts.
I wrote a custom command WordMode
that makes Vim better for writing:
- Wraps lines and adds line breaks
- Enables spell check
- Smart indenting
- Light background
- Remaps movement keys to respect visual lines
Now I can comfortably use one editor for everything—coding, writing, presentations.
Vim and BASH – Advanced Features
I also spent time learning features in Vim and BASH that I hadn’t used much before.
Vim Capture Groups
Vim allows capturing parts of text using regex. This is useful for:
- Editing repeated patterns
- Swapping or reordering parts of a line
- Making batch edits
These features are powerful and eliminate the need for manual editing.
BASH: xargs
, ls
, tr
Xargs is a very useful command if you need to pipe multiple arguments into another program. To illustrate xargs use consider a practical example: I often search through PDFs when studying. I used to combine files like this:
pdfunite *.pdf all.pdf
But this merges files in the wrong order. A better way is:
ls -tr *.pdf | tr '\n' '\0' | xargs -0 pdfunite all.pdf
This:
- Sorts PDFs by time
- Handles filenames with spaces
- Builds a clean pipeline using UNIX principles
“Write programs to do one thing well. Write programs to work together.”
Final Thoughts
The motivation for my inquiry was to fill the knowledge caps in my workflow which is terminal-focused. I wasn’t using some basic but essential commands like xargs
or syntax like $(command)
. I also wasn’t using many powerful features in Vim like macros, capture groups, or navigation with t
and f
. I didn’t have a good solution for terminal multiplexing either, adopting Tmux fixed that and gave me a much more organized and efficient workspace. This project gave me the opportunity to dive deeper into the tools I use on a daily basis, and think about what else could be improved and expanded on as well.
Plans to further develop my setup:
- Git integration using the vim-fugitive plugin
- Deep dive into Vim’s quickfix lists
- Create custom remaps for Tmux
These changes are helping me build a focused, minimal setup.