Category: Vim-tips

Vimtip #1: start gvim from terminal and still use terminal

This tip will allow you to start gvim from the terminal and still use it after Gvim has opened.

Step 1:
Add the following to your ~/.bashrc or mac equivalent


function gvim {
/usr/bin/gvim -f $* > /dev/null 2> /dev/null & disown
}

Step 2:
Type gvim in your terminal and it will not hog it until you close gvim i.e

john@John-Tosh-Lin 10:31 ~
$ gvim
[1] 10381

john@John-Tosh-Lin 10:31 ~
$

As a bonus, if you start gvim in the directory that you are working in then NERDTree’s root will be the directory you are in. That in itself saves a lot of time 🙂
Tada!
Enjoy your newly reclaimed terminal people 🙂