114980Vim - plugins, ftplugins, buffers and syntax coloring
- Jun 7, 2010Hello everyone.
I'm still pretty new to Vim, and some things are just not clear to me. I
Googled, I RTFMed but did not find solution to my problems. So I post here.
1. I want to use Vim for coding purposes. I mainly program in Python, but
recently I started learning haXe. That's where I got into troubles. I
downloaded the haxe.vim syntax file and put it in my ~/.vim/plugin/
directory. Since global plugins load at startup (I made sure it was the case
by adding echo "Hello from ~/.vim/plugin/haxe.vim" at the end of haxe.vim
:)), everything looks great when I edit a .hx file with Vim (:set syntax
returns syntax=haxe). But when I switch buffers (either by :next or by using
MinuBufExplorer), syntax coloring is lost (:set syntax returns syntax=).
Then what I do is I type :source ~/.vim/plugin/haxe.vim and everything is
So my first question is: WHY this happens and HOW do I prevent it from
2. Since there are different tab spacing conventions for different
languages, I want to set it according to my preferences. With Python, I put
a bunch of setlocal directives for tabstop, smarttab, number etc. and it
works fine. Still, sometimes when I switch buffers, I lose syntax coloring
but I'm able to bring it back by typing :syntax on.
So I wanted to do the same with haXe. I didn't know I couldn't just write a
haxe.vim file, put it in ~/.vim/ftplugin/ and start coding, only later I
learned that I had to put an autocmd for *.hx to set filetype=haxe on
BufRead and BufNewFile. But when I did that, haxe.vim from ftplugin loaded,
but I lost syntax coloring (altthough both haxe.vim loaded.) My second
question: how to make settings from ftplugin/haxe.vim not overwrite
plugin/haxe.vim (I guess that's what this is all doing.)
Thanks in advance.
View this message in context: http://old.nabble.com/Vim---plugins%2C-ftplugins%2C-buffers-and-syntax-coloring-tp28812114p28812114.html
Sent from the Vim - General mailing list archive at Nabble.com.
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
- Next post in topic >>