You are not logged in.

#26 2009-09-14 22:39:11

gav616
Member
Registered: 2008-01-16
Posts: 182

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

Boris Bolgradov wrote:

Except the syntax highlighting, also the search highlighting and some other things don't work. Looks like /etc/vimrc is the issue, because reverting it to the previous one fixes everything. I suggest you replace the new one with the old one and it will be fine.
http://pastebin.com/f25d72a1f

correct, no mouse support either

Last edited by gav616 (2009-09-14 22:44:50)

Offline

#27 2009-09-14 23:01:49

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

Not quite the same cause, but one think I had to do was make sure to set $EDITOR and $VISUAL so various apps would use vim instead of vi. I then added these two variables to env_keep in sudoers so things I run in sudo that call an editor but don't use a shell as a launcher would use it too - these are cases like "sudo git commit" and "sudo visudo".

Offline

#28 2009-09-14 23:17:03

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

From memory, there were complaints about shipping a non-standard vimrc file (did we ship Debian's...?).  So the solution was to ship the default one now, which either is nothing or does nothing.  Or something like that. 

Search the bug tracker for actual info rather than my vague recollections tongue

Offline

#29 2009-09-15 00:56:50

Isengrin
Member
Registered: 2008-08-07
Posts: 166

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

shining wrote:

@Isengrin
your issue has indeed nothing to do with this thread, which was about losing syntax highlighting, not the whole /etc/vimrc
so please open a new thread :)

Actually it had, for the loss of the rcs caused the loss of syntaxis. Just wanted to point a possible cause of it for others.
But yes, I'll try to find if it was my fault or not and report in another thread. Thanks. =)


The Wheel weaves as the Wheel wills, and we are only the thread of the Pattern."
—Moiraine Damodred

Offline

#30 2009-09-15 01:06:21

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

/etc/vimrc now does almost nothing, It simply kind of sources an arch special definition file:

runtime! archlinux.vim

This is located at /us/share/vim/vimfiles/archlinux.vim. And it does not much besides setting up some very basic definitions as:

set nocompatible                " Use Vim defaults instead of 100% vi compatibility
set backspace=indent,eol,start  " more powerful backspacing

" Now we set some defaults for the editor
set history=50                  " keep 50 lines of command line history
set ruler                       " show the cursor position all the time

" Suffixes that get lower priority when doing tab completion for filenames.
" These are files we are not likely to want to edit or read.
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc


if has('gui_running')
  " Make shift-insert work like in Xterm
  map <S-Insert> <MiddleMouse>
  map! <S-Insert> <MiddleMouse>
endif

That's all. Everything else must be done elsewhere.

I had taken some precautions, i.e always kept a backup of my global /etc/vimrc (as /etc/vimrc.old) because /etc/vimrc was prone to be changed in updates. All really mattering definitions are kept in my local .vimrc/.gvimrc files, which are guaranteed to remain untouched. Thus this major upgrade did not much harm here.

I am critical about the "suffixes" definition in archlinux.vim. Some of these are files I do want to at least read every now and then. Even if it is only about tab completion, I don't want to be "pre determined" that way.

Last edited by bernarcher (2009-09-15 01:11:49)


To know or not to know ...
... the questions remain forever.

Offline

#31 2009-09-15 01:38:32

thefatprecious
Member
From: Austin, TX
Registered: 2009-02-13
Posts: 98

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

I had the same issue. The fix described in posts 7 and 9 fixed it for me as well. Thanks for that wink

Also, I don't know if someone else saw this but in the new /etc/vimrc file provided with the package, it says " For more option refer to /usr/share/vim/vimcurrent/vimrc_example.vim or the vim manual".  That path is incorrect. The correct path would be /usr/share/vim/vim72/vimrc_example.vim


ILoveCandy

Offline

#32 2009-09-15 13:33:26

LiteHacker
Member
Registered: 2008-11-27
Posts: 38
Website

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

I didn't have a "/etc/vimrc" or "~/.vimrc"
I used "~/.exrc" with the old vi, and it seemed to work. Now with this new vi, I renamed .exrc to .vimrc and it started reading it.
From what I understand, vi is running in it's compatible mode... or something.
If you type ":set nocompatible" or ":set backspace=indent,eol,start", it gives back an error noting that it does not know what is "compatible" or "backspace"

Some notable problems with this new vi:
1. The color highlighting.
2. Vi now "flashes" when you make an error. This gets annoying after a while. You can remove it with ":set noflash" but my main question is why was it suddenly enabled in the first place?
3. Backspace moves back a space, but doesn't remove the character from the screen.
4. You can't scroll though previous commands with the up and down arrow keys.

Offline

#33 2009-09-15 13:55:14

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

@LiteHacker
There is no more a compatible mode because this vi is not vim any  more. You should keep your .exrc file because this is what the new vi looks for.

If you want real vim-like editing you have to install the vim package(s) as well and set it up accordingly.

@all
Have a look at "man vi". Several things are simply not possible any more.


To know or not to know ...
... the questions remain forever.

Offline

#34 2009-09-15 14:24:12

nsf
Member
From: Yekaterinburg, Russia
Registered: 2007-09-15
Posts: 160
Website

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

Also for some reason omnifunc doesn't work with python anymore O_o. Does someone have the same problem or it's just me?
/usr/share/vim/vim72/autoload/pythoncomplete.vim is in its place, but after opening a python file 'omnifunc' var is empty. sad

Last edited by nsf (2009-09-15 14:42:06)


Bmpanel2 and obkey developer.

Offline

#35 2009-09-15 14:33:37

Boris Bolgradov
Member
From: Bulgaria
Registered: 2008-07-27
Posts: 185

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

I have some more problems... Anyway, what was the old version? 7.2.65 ? I will try to downgrade to it when I get back home tonight. I don't need the newest vim I need the working one.

Offline

#36 2009-09-15 23:19:20

Proofrific
Member
Registered: 2008-01-05
Posts: 215

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

I had similar problems to other people (no syntax highlighting, no mouse) after the upgrade.  As people suggested, I needed vimrc (either /etc/vimrc or ~/.vimrc).  So, I copied the example that comes with vim:

sudo cp /usr/share/vim/vim72/vimrc_example.vim /etc/vimrc

Now, everything works again.

Since I like typing vi instead of vim (out of habit), and because I never use the minimal ex/vi, I removed it and created a symlink:

sudo pacman -R vi
sudo ln -s /usr/bin/vim /usr/bin/vi

Offline

#37 2009-09-16 07:14:14

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

Proofrific wrote:

I had similar problems to other people (no syntax highlighting, no mouse) after the upgrade.  As people suggested, I needed vimrc (either /etc/vimrc or ~/.vimrc).  So, I copied the example that comes with vim:

sudo cp /usr/share/vim/vim72/vimrc_example.vim /etc/vimrc

Looks like a good way to do it for the time being until it gets fixed.  I looked at /etc/vimrc and in the comments mistakenly says that the configuration is at /usr/share/vim/vimcurrent/archlinux.vim.  'archlinux.vim' is located in /usr/share/vim/vimfiles, and it's pretty bare:

"...

" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible                " Use Vim defaults instead of 100% vi compatibility
set backspace=indent,eol,start  " more powerful backspacing

" Now we set some defaults for the editor
set history=50                  " keep 50 lines of command line history
set ruler                       " show the cursor position all the time

" Suffixes that get lower priority when doing tab completion for filenames.
" These are files we are not likely to want to edit or read.
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc


if has('gui_running')
  " Make shift-insert work like in Xterm
  map <S-Insert> <MiddleMouse>
  map! <S-Insert> <MiddleMouse>
endif

Probably will get broke on next update but hopefully will be fixed by then.

Last edited by Gen2ly (2009-09-16 07:14:52)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#38 2009-09-16 11:05:33

nsf
Member
From: Yekaterinburg, Russia
Registered: 2007-09-15
Posts: 160
Website

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

Mine problem with python completion and indent issues is solved.

filetype plugin indent on

They were in vimrc_example, so... Now you should enable them manually.


Bmpanel2 and obkey developer.

Offline

#39 2009-09-21 13:23:19

gav616
Member
Registered: 2008-01-16
Posts: 182

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

Proofrific wrote:

I had similar problems to other people (no syntax highlighting, no mouse) after the upgrade.  As people suggested, I needed vimrc (either /etc/vimrc or ~/.vimrc).  So, I copied the example that comes with vim:

sudo cp /usr/share/vim/vim72/vimrc_example.vim /etc/vimrc

Now, everything works again.

That works, thank you.

EDIT

still can't cross paste from different vim's sad

Last edited by gav616 (2009-09-21 21:47:54)

Offline

#40 2009-09-24 21:48:45

goodgrue
Member
From: CA, USA
Registered: 2008-11-19
Posts: 41

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

I am by no means an expert on this -- I found this thread trying to solve the same issue myself.  That said, I think the suggestion to run

sudo cp /usr/share/vim/vim72/vimrc_example.vim /etc/vimrc

may NOT the best solution. 

The package installs a very barebones /etc/vimrc -- the only line in it that actually does anything is the bottom one here:

"This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! archlinux.vim

So, if you overwrite this file completely, you may be setting yourself up for problems down the road if something important goes into archlinux.vim.  Instead, I recommend appending the vimrc_example.vim contents to the existing /etc/vimrc file, or perhaps merging it with your ~/.vimrc .

Thanks to everyone who helped clear this up!

Offline

#41 2009-09-24 22:04:13

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

goodgrue wrote:

I am by no means an expert on this -- I found this thread trying to solve the same issue myself.  That said, I think the suggestion to run

sudo cp /usr/share/vim/vim72/vimrc_example.vim /etc/vimrc

may NOT the best solution. 

The package installs a very barebones /etc/vimrc -- the only line in it that actually does anything is the bottom one here:

"This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! archlinux.vim

So, if you overwrite this file completely, you may be setting yourself up for problems down the road if something important goes into archlinux.vim.  Instead, I recommend appending the vimrc_example.vim contents to the existing /etc/vimrc file, or perhaps merging it with your ~/.vimrc .

Thanks to everyone who helped clear this up!

Yeah, I wanted to point that out, but have been too lazy, so thanks smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#42 2010-04-11 22:11:34

MinerX
Member
From: Ontario, Canada
Registered: 2010-04-11
Posts: 1

Re: After the vim upgrade I lost syntax color highlighting (7.2.245-1)

I just got started with Arch, so this vi being vim thing was pretty confusing to a newbie.

I'm happy to report that I've got my colour back.

Thanks to all for this informative post.

Offline

Board footer

Powered by FluxBB