Why I use vim for bioinformatics
Вставка
- Опубліковано 2 лип 2024
- In bioinformatics, we often find ourselves editing scripts while ssh-ing into a remote server, which means using command-line editors instead of our favorite GUI editor like VSCode.
- Наука та технологія
As a early career software engineer, I thank you for filling a skill gap that I've had for years, but was always to lazy to bother with.
Me too! Making this video was good motivation to fill my own skill gaps :)
Nice video!
Tip on forward slash (/) vs backslash (\): Think of forward slash as the "normal" slash that you'd use while writing (either/or) and the backslash as being "backwards" of the normal writing slash. The only place I've seen backslash used is programming like for newline "
" (oh, and Windows file paths).
Nice video!
This isn't strictly relevant to using vim but I think it's worth noting that the text editor you pulled out at 3:00 doesn't seem to be nano, but pico instead. My experience is that newer macs tend to have a symlink where entering "nano" actually pulls up pico, which can be seen at the top left of the terminal at that time mark. I don't know if this depends on the Mac generation, or OS or what exactly. Weirdly, it seems like some older Macs (e.g. my 2020 one) have a symlink the reverse direction, where "pico" links to nano. My understanding is nano is based on pico and that the differences between the two are usually subtle. But I'm TAing a class right now where we teach nano and it seems like students with the nano -> pico symlink have sometimes had issues in using advanced nano options.
Ever tried the SSH Remote feature in VS Code? It's literally heaven.
This exists also for Emacs, it feels like magic 🤩
Yea it’s great. Though I haven’t always been able to get that working across every ssh connection, or it’s slow to set up for each temporary VM I’m using on the cloud, so I still end up needing vim often.
Damn this guy is using a chainsaw to peel an apple ahahah
Did you ever write a bash script to make modifications in a text file using Vim?
Great video, but how do I leave vim? I had to unplug my pc
press esc to enter command mode, then type:
:q
There are a few weird states in vim that are hard to get out of.
One happens when you type "q:" instead of ":q". In that case, you simply need to type ":q" (and hit Enter/Return) twice.
Another one, I don't know how to get into it, but to get out of it, you need to type "visual".
But if it's just a normal exiting, as Daniel mentioned, press the Escape key first, then
:wq to "write" and "quite" (an alternative that some people like is ZZ)
:q to quit (if nothing has been changed)
:q! to quit without saving
Because you don’t know about M-x evil ?
vim, yyds