You are not logged in.

#1 2006-10-15 17:19:18

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

vim/gvim vs. self compiled vim

I have set up a colorscheme in my vimrc and it worked in vim, but not in gvim... I also wanted to use python in vim so I build my own PKGBUILD and compiled vim by myself.

Now the colorscheme is used in vim and gvim... is there a bug in the packages or why is it working now?

my configure:

./configure --prefix=/usr --localstatedir=/var/lib/${pkgname} 
    --disable-darwin --disable-netbeans 
    --enable-gui=gtk2 --enable-gtk2-check --enable-pythoninterp 
    --disable-gpm --disable-acl --enable-multibyte 
    --with-features=big

digiKam developer - www.digikam.org

Offline

#2 2006-10-16 15:03:33

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

The gvim package replaces the vim binary with a more featureful version.  It has most of this enabled.

Offline

#3 2006-10-16 17:00:45

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

but when I install gvim, it always installs vim aswell... I don't like having two packages, so I compile it by myself... it takes only 1 minute to compile, so it isn't much slower than installing the preconfigured packages...


digiKam developer - www.digikam.org

Offline

#4 2006-10-16 17:52:17

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

The way the official packages work is as follows:
the vim package contains all the runtime files and everything that you would get with a normal vim.
The gvim package contains a single binary.  When it is installed, it moves "vim" to "vi" and symlinks "gvim" to "vim".
As such, you get the best of both worlds.

Offline

#5 2006-10-16 18:46:13

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

ok but I need python interpreter integration, so I have to compile my vim anyway. And like I said before: gvim doesn't use the colorschemes and some settings from my vimrc, but the compiled version does, so I think it just better for me that way.


digiKam developer - www.digikam.org

Offline

#6 2006-10-16 19:21:02

spick
Member
Registered: 2006-10-16
Posts: 6

Re: vim/gvim vs. self compiled vim

gvim doesn't use the colorschemes and some settings from my vimrc, but the compiled version does

The gvim pacman package includes /etc/gvimrc that appears to override settings in ~/.vimrc.  Delete it (or clear its contents and tell pacman not to update it in /etc/pacman.conf).

Offline

#7 2006-10-16 19:39:10

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

TheGrudge wrote:

ok but I need python interpreter integration, so I have to compile my vim anyway. And like I said before: gvim doesn't use the colorschemes and some settings from my vimrc, but the compiled version does, so I think it just better for me that way.

This is what I'm saying - the gvim package has the python interpreter compiled in.  "vim" is symlinked to "gvim" when installed.  Thus:

pacman -S gvim
vim
:python print 'tada'

Offline

#8 2006-10-16 20:46:51

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

but it doesn't work here, I don't know why.

For example I write:

import os
for root, dirs, files in os.w

Now I press CTRL-X CTRL-O but there is no code completion, vim says I need to implement the python interpreter...


digiKam developer - www.digikam.org

Offline

#9 2006-10-16 20:50:38

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

??? It seems to work now, but still my settings are messed up...


digiKam developer - www.digikam.org

Offline

#10 2006-10-16 20:52:21

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

spick wrote:

The gvim pacman package includes /etc/gvimrc that appears to override settings in ~/.vimrc.  Delete it (or clear its contents and tell pacman not to update it in /etc/pacman.conf).

That worked! Thank you!


digiKam developer - www.digikam.org

Offline

#11 2006-10-16 22:21:19

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

~/.vimrc always overrides global (/etc) settings.  /etc/gvimrc should not have affected this, unless you keep your settings in /etc/vimrc (which is a bad idea).

As for the python interpreter messing up, that happens when vim is installed *after* gvim.  Just install gvim again and *poof* it works.

Offline

#12 2006-10-16 22:45:20

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

auto completition only works if vim is started as vim, not vi... that is annoying.
My settings are stored in ~/.vimrc... but I will try to install gvim again... maybe it will work...


digiKam developer - www.digikam.org

Offline

#13 2006-10-16 22:49:28

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

no it doesn't work... only if /etc/gvimrc is removed... damn...  :cry:


digiKam developer - www.digikam.org

Offline

#14 2006-10-16 23:22:33

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

TheGrudge wrote:

auto completition only works if vim is started as vim, not vi... that is annoying.

Like I said, the vim binary is moved to "vi" and the "gvim" binary is symlinked to "vim".

Seriously though, "vi" is there for standards compliance.  You are not running vi, you are running vim.

TheGrudge wrote:

no it doesn't work... only if /etc/gvimrc is removed... damn...  :cry:

Which settings are you talking about? I have not touched any global vimrc/gvimrc files in years and all my settings work fine in ~/.vimrc:

http://phraktured.net/config/.vimrc

Offline

#15 2006-10-16 23:38:32

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

oh its late at night... I think I should go to bed, 'cause I don't get it...
why is gvim starting in graphical mode, but vim not?? gvim is just a symlink, right? So how does gvim know that it should be started with the gtk2 gui  :?:

I'm talking about my colorscheme settings:

set nocompatible
set history=200
set number
set ruler
set guioptions+=f
colorscheme slate
set background=dark

set shiftwidth=4
set tabstop=4
set expandtab
set textwidth=79
syntax on
filetype on
filetype indent on
filetype plugin on
au FileType python Tlist

When I start gvim, I have a white "paper" with white font, so I can't see anything. If I set background=light, I can't read anything, too...

If I start vi, I can't use a gui at all, but the reason for that is clear now.

It only works if /etc/gvimrc is deleted... I don't understand why!

And again, maybe a very stupid question (but its really late here): Why is gvim started in graphical mode, and vim in console mode (gvim is just a symlink)... is there a parameter set somewhere?


digiKam developer - www.digikam.org

Offline

#16 2006-10-16 23:50:38

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: vim/gvim vs. self compiled vim

btw why is python integrated in gvim, but not in vim? It has nothing to do with the gui... so if I set up vim on a server without X, I must install gvim to be able to program python? That's strange...


digiKam developer - www.digikam.org

Offline

#17 2006-10-17 05:56:53

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

a) vim is smart.  It knows the name it was started with and acts accordingly

$ pacman -Ql vim | grep bin
vim usr/bin/
vim usr/bin/ex
vim usr/bin/rview
vim usr/bin/rvim
vim usr/bin/vi
vim usr/bin/view
vim usr/bin/vim
vim usr/bin/vimdiff
vim usr/bin/vimtutor
vim usr/bin/xxd

$ ls -l /usr/bin/ex
lrwxrwxrwx 1 root root 3 2006-10-06 13:17 /usr/bin/ex -> vim*

$ ls -l /usr/bin/rvi*
lrwxrwxrwx 1 root root 3 2006-10-06 13:17 /usr/bin/rview -> vim*
lrwxrwxrwx 1 root root 3 2006-10-06 13:17 /usr/bin/rvim -> vim*

All of these are symlinks to vim.  It has one binary.

b) gvim has python and vim does not because vim is in current and python is not.  current is made such that it has no dependancies outside the repo itself.  It's a minor technical detail

Offline

#18 2006-10-17 09:33:53

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: vim/gvim vs. self compiled vim

i can ack this issue too. gvim ignored my colourscheme if in .vimrc, however it worked fine in .gvimrc.... thought it was just a change in implementation with 7.0

James

Offline

#19 2006-10-17 15:54:16

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim/gvim vs. self compiled vim

OH! I totally forgot.... here's the rundown:
Start vim
Read /etc/vimrc
Read ~/.vimrc
if GUI (gvim):
   Read /etc/gvimrc
   Read ~/.gvimrc

The GUI files come _after_ normal vimrc.  I forgot I had tricked this by symlinking ~/.gvimrc -> ~/.vimrc

Offline

Board footer

Powered by FluxBB