For reasons discussed previously, I left the world of Macintosh operating systems and started my new binary life in the land of Linux. Specifically, Ubuntu. I love my new environment, and will never go back. However, this transition left me running Ubuntu on hardware that is relatively hostile to non-OSX operating sytems—a MacBook Pro.
Overall, I am very impressed at how smoothly Ubuntu runs on the laptop, however, there was one annoying graphical quirk: The GUI version of vim
would frequently freeze up when launched. Not a huge problem, because there is, of course, the good ol’ dependable vanilla vim
. However, one feature I did miss from using the GUI version was launching a separate window, which preserved my current bash
window. I found myself often opening a separate terminal window just to launch the command-line vim
, which was a bit cumbersome.
The Solution
To create the GUI-vim-like behavior of launching a separate window and preserving my place in bash
terminal, I added the following alias to my bashrc
:
This allows me to call up vim
as usual, for example
and everything pops up in a new terminal window, just like if I had used gvim
or vim -g
, but without the freezing problems. This, of course, will only work if you use gnome-terminal
. There is the added bonus that mvim
is still in my muscle memory from using MacVim. Also, there are a few reasons I actually prefer working in the CLI version of vim
over the GUI version, so I suspect I will continue to use the alias even after I get a non-Mac machine.