You are not logged in.
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
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
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
Offline
@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
/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
I had the same issue. The fix described in posts 7 and 9 fixed it for me as well. Thanks for that
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
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
@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
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.
Last edited by nsf (2009-09-15 14:42:06)
Offline
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
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
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
Offline
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
Last edited by gav616 (2009-09-21 21:47:54)
Offline
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
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
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
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