Saari Development

Vim: Inserting output of unix/linux command

Posted in editor, vim by imsaar on December 24th, 2007

I had seen other vim experts do this but couldn’t remember how they did. Today I finally search and found how to insert the output of a unix/linux command directly in a vim buffer(without copy-pasting).

  :r!ls /home/

or in the visual mode (by pressing V) simply !ls /home/

Simple isn’t it and quite useful at times.

Vim: Turn off gVim toolbar

Posted in editor, vim by imsaar on July 2nd, 2007

I don’t know about you but I don’t like my gVim real estate to be polluted by toolbar under the menus so in my early days of using gVim I researched and discovered a way to turn them off.

Here is what you need to put in your .gvimrc (or _gvimrc on windows):

" To set the toolbars off (icons on top of the screen)set guioptions-=T

Vim: Setting height and width of gVim window

Posted in editor, vim by imsaar on July 2nd, 2007

I always struggled with this on my windows Vim and today I saw the fix on a vim users mailing list addressing this exact question.

Here is the way to set height (lines) of gVim (graphical Vim) window:

:set lines=40

and here is how to set width (columns) of gVim windows:

:set columns=80