Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .gvimrc file that works fine on OS X 10.6, but won't work on Ubuntu. It contains a line that reads set transparency=15, and when i run gVim it reports:

Error detected while processing /home/user/.gvimrc: 
line   25: 
E518: Unknown option: transparency=15

Any ideas to make gVim transparent by default?

Chers!

The whole .gvimrc file for completion:

" Turn on line numbers
set number

" Change colorscheme
colorscheme ir_black

" Turns on the tab bar always
set showtabline=2

" Number of horizontal lines on the screen
set lines=60

" GUI Option to remove the Toolbar (T)
set guioptions-=T

" Sets the percent transparency
set transparency=15
share|improve this question
up vote 5 down vote accepted

I'm afraid the transparency feature is only in MacVim. I just grepped the source code for Vim 7.3 (the latest stable version) and I couldn't find any trace of a transparency option.

One possible solution is to do it via Compiz; look for the module that enables transparent windows: from there you should be able to set up a special rule for Gvim windows.

share|improve this answer

Another option would be to skip gvim and just run regular vim inside, e.g., gnome-terminal or some other terminal emulator that supports transparency. (I use guake.) Gvim doesn't offer much over regular vim.

share|improve this answer
sudo apt-get install  xcompmgr devilspie transset-df
mkdir -p ~/.devilspie
cd ~/.devilspie
touch opacity.ds
vim opacitiy.ds

Change the file contents to:

( if ( contains ( window_class ) "Gvim" ) ( begin ( spawn_async (str
"transset-df -i " (window_xid) " 0.85" )) ) )

You may add devilspie /home/username/.devilspie/opacity in startup apps.

share|improve this answer
    
On later versions of ubuntu, replace transset-df with x11-apps. Then in the opacity.ds file, change it to: transset (remove the -df) – matiu Apr 24 '13 at 5:13

Inside your .gvimrc
autocmd GuiEnter * silent exec "!transset -a 0.80"

Possible variants: transset might be transset-df, 0.80 is the opacity (from 0 - 1).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .