Current time: 04-20-2014, 12:07 PM Hello There, Guest! (LoginRegister)

Post Reply 
vim syntax highlighting
07-26-2005, 11:12 AM
Post: #11
local vimrc versus system vimrc
I did some testing and, yes, sourcing the system vimrc (source /etc/vim/vimrc) at the end of the file does override the changes I've made. More testing reveals that settings in the system vimrc (I tested autoindent) apply whether I source it or not, so I think it's unnecessary.

A few things are puzzling to me, however. First, :set textwidth shows "textwidth=78" when the system vimrc sets textwidth=0. Furthermore, if I put "set textwidth=40" in my vimrc I still get textwidth=78. Second, "set showcmd" gets nuked when I source /etc/vim/vimrc at the end of the file even though it's commented out in /etc/vim/vimrc, so it shouldn't be affected one way or the other.

Vim configuration == mysteries upon mysteries. See for example http://www.vim.org/tips/tip.php?tip_id=330, a long discussion about the complexities of indentation configuration.

ps I just discovered :scriptnames and found "setlocal tw=78" in /usr/share/vim/vim61/ftplugin/vim.vim. I'll have to explore these files some more and get back to you.
Find all posts by this user
Quote this message in a reply
08-02-2005, 01:50 AM
Post: #12
local vimrc versus system vimrc
Does anyone know what would cause syntax highlighting to change?

Earlier today I was at home and used my plain old xterm.

(Typically I work from work, and use putty, for being an xterm emulator, PuTTY > *)

I was editting some php scripts, and the highlighting kept changing.
Sometimes it was just html.
Sometimes it was just php.
Sometimes is was actually both.

I really couldn't understand it, does anyone have any suggestions to how to start figuring out what vim is doing with regards to syntax highlighting?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: