UPDATE: NEW BLOG POST AND VIDEO!
By popular demand, I have written up a more formal blog post on this workflow which you can visit here. Furthermore, I also created a companion video which you can see in the blog post or separately on my channel here. Have fun and I hope this spurs you all on to even better workflows!
NOTE: For future readers, I shall endeavor to keep this link up to date on my website and to not change the url so you will always have a reference to my most recent workflow iteration.
Background on This Workflow
I am @TheCedarPrince and am involved with the Julia community as a Twitch Streamer and am co-creator of Javis.jl and the creator of NeuriViz. I have had several people over the last couple months both in my streams and in the community ask me about my toolchain for development. Without further ado, here is a brief explanation of my workflow to manage persistent Julia sessions! There should be something in here for everyone - beginner to expert alike!
Tools of Choice
I use Alacritty as my terminal, zsh and oh-my-zsh as my shell and plugin manager respectively, tmux as my multiplexer, lsd as my list command with fun icons, Fantasque Sans Mono as my typeface font, vim for my editor, and gruvbox-dark as my general color palette.
Here are gists to the relevant config files I use to modify my interface and user experience:
- Vim: .vimrc
- Alacritty: .alacritty.yml
- tmux: .tmux.conf
- zsh: .zshrc
Here is a picture of what that looks like altogether:
Workflow in Action
Persistent Julia Sessions
Though it is a little hard to see, I close my terminal completely. The sessions are gone for everything! Oh no! But have no fear, tmux is here!
I use resurrect
and continuum
to have tmux remember all my layouts and current sessions. This includes the Julia REPL! Also, my config allows vim to remember what was its last layout as well and to instantly open you back to its properly layout out thanks to obsession
. This is great for when your computer unexpectedly dies or crashes as everything is backed up thanks to tmux!
Vim-Slime for Rapid Julia Evaluation
Here, I target the Julia REPL in a tmux panel and use the vim-slime
plugin to send code from my Julia script to the Julia REPL for rapid evaluation. Also works for code chunks such as functions or loops! (Note: this works for more than just Julia - I use it for my Python work too! )
Mouse Mode
tmux also supports mouse mode and interactivity! I can quickly jump all over the place with my mouse if I so choose or just easily resize a tmux pane.
Fuzzy Finding for Files and Citation
I use my vim editor for all my writing and research so being able to search up files and explore things is imperative! I use FZF
with ripgrep
to find files I search for and pandoc
to enable citations in pandoc-markdown or TeX files.
Conclusion
I hope you find my workflow useful and possibly helpful to any new Julian or individual finding their way around the REPL and terminal! If you have any questions, feel free to post and I will try to get back to you!
~ TCP