Skip to main content
Filter by
Sorted by
Tagged with
77 votes
11 answers
68k views

I just recently set up my Vim environment from Textmate, after becoming addicted to its modal input. However, syntax highlighting seems to be not so beautiful in Vim. I code in C++ and since the ...
ivanTheTerrible's user avatar
20 votes
2 answers
5k views

I have a custom XML file format which can contain blocks of code within certain tags. For example: <Root> <Sql> select * from foo </Sql> <MoreJunk> ... </MoreJunk>...
HS.'s user avatar
  • 15.8k
6 votes
1 answer
4k views

I don't know if this is possible/sensible, but I was curious to know if I can have my strings in javascript files have html highlighting. I discovered that strings in php could have SQL syntax ...
sharat87's user avatar
  • 7,556
13 votes
5 answers
11k views

In VIM, I need to perform a simple task - highlight "(" and ")". I can do this easily by issuing two commands: :syn match really_unique_name display "[()]" :hi really_unique_name guifg=#FF0000 But if ...
grigoryvp's user avatar
  • 43k
32 votes
4 answers
13k views

When I open some bash script files with vim it sometimes identifies them as conf files, that's okay, I can just correct that by setting the filetype to sh with :setf sh. That great, except I've ...
Peter Coulton's user avatar
12 votes
4 answers
9k views

I'd like to change my vim config file to allow highlighting of only my declared variables, not keywords. This article shows and explains what I mean: Alternate syntax highlighting I'm a beginner to ...
CS Student's user avatar
  • 1,653
9 votes
6 answers
4k views

I'm getting annoyed with the default python syntax highlighting in Vim. It does not highlight the else: statement correctly. Vim only highlights the else statement if I have some white space between ...
Stephan's user avatar
  • 3,829
8 votes
3 answers
12k views

I want to change the filetype based on file extension in vim. I have the following code in the my .vimrc autocmd BufNew,BufNewFile,BufRead *.txt,*.text,*.md,*.markdown setlocal ft=markdown But when ...
Sudar's user avatar
  • 20.1k
5 votes
1 answer
953 views

I am trying to create a syntax file for my logfiles. They take the format: [time] LEVEL filepath:line - message My syntax file looks like this: :syn region logTime start=+^\[+ end=+\] +me=e-1 :syn ...
ewok's user avatar
  • 21.7k
4 votes
2 answers
4k views

I'm using a syntax file in vim that defines a number of filetype-specific syntax keywords. To color files of this type I've also created a colorscheme file for the share directory that attempts to ...
bwerks's user avatar
  • 9,101
94 votes
13 answers
91k views

My Vim editor auto highlights PHP files (vim file.php), HTML files (vim file.html) and so on. But when I type: vim file and inside it write a Bash script, it doesn't highlight it. How can I tell Vim ...
never_had_a_name's user avatar
52 votes
5 answers
49k views

Has anyone else found VIM's syntax highlighting of Javascript sub-optimal? I'm finding that sometimes I need to scroll around in order to get the syntax highlighting adjusted, as sometimes it ...
Steve M's user avatar
  • 10.6k
31 votes
2 answers
10k views

In vim, I am editing a file of filetype "markdown", but which contains latex math expressions such as $x_i$. Vim's syntax highlighting for markdown thinks the pattern *_* (letter-underscore-letter) is ...
sieste's user avatar
  • 9,177
13 votes
3 answers
25k views

I have installed vim in Debian 6. I am trying to change color scheme and enable syntax highlighting. But it's not working. I added set background=dark in .vimrc file. But white background is ...
blakcaps's user avatar
  • 2,657
10 votes
6 answers
3k views

I'm having trouble reading dark blue on black when I turn on syntax colours in vim. How do I change some of the default colours or the colours of schemas like: http://www.vim.org/scripts/script.php?...
Rimian's user avatar
  • 38.7k
8 votes
4 answers
4k views

I'm using vim to edit some python files and recently it occurs sporadically that the syntax highlighting disappears after I save the buffer inside vim. I tried to reset syntax on and set filetype=...
nye17's user avatar
  • 13.5k
6 votes
2 answers
968 views

As for {,} and [,] and (, ), I really would like to be able to define syntax region for <, > to be used for C++ template usage like the following: a<b> But, is there any way to create ...
oblitum's user avatar
  • 12.1k
5 votes
4 answers
13k views

I'm trying to find a plugin that will highlight the matching begin/end statements with Verilog. VIM has it working with curly braces /brackets but it does not work with its begin/end. I want VIM to ...
GoChanGo's user avatar
4 votes
1 answer
3k views

I just downloaded a Vim plugin for Sass syntax highlight. The instructions say: install details put it into syntax directory and add sass filetype au! BufRead,BufNewFile *.sass ...
wyc's user avatar
  • 55.7k
3 votes
2 answers
1k views

I have some Python files in which I want to highlight the SQL queries in string literals. Assume that all string literals in those files contain SQL queries. I saved the following syntax file as ...
Chungmin Lee's user avatar
  • 2,484
3 votes
1 answer
1k views

Consider a simple text markup language where _underscores denote italics_ and *astrisks denote bold*. In an imaginary vim syntax file you might have syntax region italic start='_' end='_' keepend ...
So8res's user avatar
  • 10.5k
2 votes
2 answers
1k views

Alright, this is probably a stupid question, but.... I've got a file of source code in a proprietary language. I want to edit said file with VIM, instead of their crummy editor. I'd like basic syntax ...
Spencer Rathbun's user avatar
2 votes
1 answer
360 views

I'm defining the following syntax rules in a vimscript: hi MyBold term=bold gui=bold hi MyRed ctermfg=red guifg=#ff0000 And later on, I want to apply both highlights to the same character. So ...
zmo's user avatar
  • 24.9k
1 vote
1 answer
1k views

I'm trying to highlight trailing whitespace in vim, regardless of filetype. I'm able to do it on a per-filetype basis. For example, for HTML: ~/.vim/ftplugin/html.vim color html ~/.vim/syntax/html....
user513951's user avatar
0 votes
1 answer
721 views

I am using dracula theme for vim and am not able to get the number pane, that is, the side panel which contains the line numbers, to be displayed in a sort of translucent manner. The preview image ...
Utkarsh Verma's user avatar