1
vote
1answer
121 views

Vim syntax highlighting lost on single file

I have a strange thing happening on a single file. When I open the file under it's original name, the highlighting is lost (":syntax on" does nothing). But if I cp that file with another name and open ...
0
votes
1answer
19 views

VIM - in colorscheme file, how to have different colours depending on what the syntax is?

I use VIM and I want I use my own customized slate colorscheme (slate-mine.vim). In slate-mine.vim, is there a way for me to do something like if syntax == django html then apply the following ...
1
vote
1answer
77 views

Vim region with keywords in syntax patterns

I need to create a custom vim region with determines classes and structs. The code, for example, syn region myCxxClass start="\(class\|struct\)\_[ \t]\+" end="}[^;]*;" transparent The patterns for ...
3
votes
2answers
1k views

Vim: What do these short names / verbs like <leader>, <C-r> mean?

I'm using Vim for a while now, starting to like it more and more. But when searching for some new features that Vim has in it's goodie bag, I'm often slapped in the face with things like ...
0
votes
1answer
621 views

How can I tell what syntax and indentation rules Vim is using on a particular line?

For better or worse, PHP code often includes both HTML and Javascript. Getting Vim to indent it all correctly can be tricky. My .vimrc specifies that a tab should always be two spaces: set ...
3
votes
3answers
505 views

Launch VIM and show, or hide, row numbers

Background Control whether row numbers are displayed after vim starts (in a non-interactive mode). Problem A shell script contains the following code: echo Converting $1 to $1.html... NUMBERS="-c ...
3
votes
1answer
885 views

Fix YAML syntax highlighting in VIM

The YAML syntax highlighting in Vim 7.3 isn't great. Putting an apostrophe in a line of text triggers quote highlighting even when there's no quote. The same thing happens in other files sometimes ...
2
votes
2answers
2k views

How to set syntax specific settings in my VIMRC?

I work with several languages and markups in vim every day (ruby, python, javascript, CSS, HTML, etc), and would like to have different settings for each buffer when I fire up my editor. How can I ...