Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers

up vote 4 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
add comment

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
add comment
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.