392 questions
1
vote
1
answer
1k
views
Syntax Highlighting in VIM to match first/last letter of line
I'm trying to to setup syntax highlighting in VIM to match the whole line only if the first non-whitespace character is "-" or if the last non-whitespace character of the line is ":&...
1
vote
1
answer
43
views
Vim Syntax-File, Comment after brace not styled
I have the following three lines to style comments in my syntax file. Comments start with # and are allowed to be inline or on a seperate line.
syn keyword myTodo contained TODO FIXME
...
1
vote
1
answer
3k
views
neovim colors not "just working"
I have some simple (default) syntax highlighting, and other colors, in my regular vim. I'd like to try out neovim, so I did the
cd && ln -s .vimrc .nvimrc && ln -s .vim .nvim
I'm ...
0
votes
1
answer
105
views
vimscript syntax not pattern
I have this vimscript:
syn region fdocCommand start="^@" end="$" contained
syn region fdocComment start="^@" end="^@tangle " contains=fdocCommand keepend
" syn region ...
1
vote
1
answer
139
views
Provide visual cues for indent level in vim
I've used listchars to mark certain whitespace characters for visual identification, but I am wondering if there is a similar feature to visually mark the indentation level in vim. Something like a ...
19
votes
3
answers
10k
views
Making vim show a git diff with colors like a git diff command (red-delete, green-add)
I ran git config --global alias.ci commit --verbose
This makes it so running git ci is like running git commit --verbose
The --verbose flag shows a diff in the commit message template, which is not ...
1
vote
1
answer
365
views
How to retrieve the current mode color highlight used in the status line?
I'm working on adding an automatic highlight for my current line in Vim, that matches the current mode color used in the status line. So far I haven't had much success if finding a way to get what ...
4
votes
1
answer
443
views
Vim syntax highlighting for Fortran OpenMP comments
There was a very useful answer on how to highlight openmp directives in Fortran code (Vim syntax highlighting for multiline fortran openmp directives).
So lines like
!$omp parallel
are no longer ...
0
votes
0
answers
89
views
Red words only in css (SASS syntax) files with vim editor
I try to remove the highlighted words with :set nospell command and I can't.
Examples:
I'm working with vim 7.4 on Archlinux with gnome-shell desktop.
Thanks! Any suggestion is accepted :)
1
vote
1
answer
415
views
Installing solarized theme for Vim (OS X 10, Terminal, Tmux)
I'm installing the solarized theme for my terminal and vim. I've successfully switched to it for my Terminal (& Tmux), having imported the solarized theme for Terminal. However, I get the ...
2
votes
3
answers
216
views
Syntax highlight empty virtual columns
Is it possible to include empty virtual columns in a syn match group? I want to highlight a block of text as though it's in a terminal window by giving it a black background, but I want the "terminal" ...
2
votes
1
answer
84
views
Combining multiple syntaxes in MacVim
I'm trying to create a custom syntax highlighter for MacVim that uses a combination of CSS and PHP, where CSS is static selectors, and sometimes there will be embedded PHP code (very similar to HTML+...
0
votes
1
answer
111
views
Vim's PHP syntax highlighting ignores non-scripty PHP files
When editing PHP files that are part of a framework, there's no <?php tag in the beginning of the file. Thus, Vim doesn't recognize the PHP in that file as PHP.
Is there a way to fix that?
0
votes
1
answer
132
views
VIM How to get the definition for a syntax region
If there a syntax region definition, how to get the definition using VimL or Python?
eg, below is a definition, how can I get the data start from start
syntax region potionString start=/\v"/ skip=/\...
2
votes
1
answer
81
views
In Vimscript, is it possible to access information known by the syntax highlighter?
For example, if I am writing a Vimscript function to operate on Python syntax, it might be useful to know whether a line is regular code, a comment, or enclosed in triple-quotes. I assume that the ...
1
vote
2
answers
973
views
Limit vim syntax highlighting to diff
I am making changes to an existing C code. If I just want to check my changes, I can easily use vimdiff for that, with old & modified files.
What I want is to limit some syntax highlighting to ...
0
votes
1
answer
689
views
Custom Keyword highlighting within comments for VIM
I want to add custom keywords that should be highlighted in vim.
These keywords are for marking comments, not the code.
This is what I have in my .vimrc:
autocmd Syntax * syntax keyword Important ...
0
votes
2
answers
93
views
Boolean for #!@ keywords vim
I'm trying to do a syntax highlight regex in my _vimrc etc to highlight specific commands in comments for a visual cue.
The match should be \s followed by either a # or ! then a \s or a \S then ...
4
votes
0
answers
373
views
wrong foreground color under cursorline
I recently turned on cursorline in my .vimrc:
set cursorline
hi CursorLine ctermbg=54 cterm=NONE
However, it doesn't seem to work very well with syntax highlighting. For example,
As you can see on ...
9
votes
4
answers
3k
views
How to make vim SpellCheck *not* code aware?
By default, vim spell checker is code aware, so it doesn't spell-check code parts of the file. In effect, in markdown it considers (pandoc multiline) tables to be codes and thus doesn't spell-check ...
4
votes
1
answer
2k
views
How do I link highlighting groups in a vim colour scheme?
I'm trying to clean up a colour scheme that I'm making for vim by linking some highlighting groups but I can't get the linking to work.
Here is a sample of my vim script:
highlight Error ...
5
votes
1
answer
3k
views
Vim wrong syntax highlighting in Groovy
when I do the single slash (/) when typing some arithmetic expression (like val1 / val2), my vim treats it as a comment for multiple lines (/*). The result looks like:
I now I can escape it by typing ;...
0
votes
1
answer
82
views
'help.vim' syntax file, example string to match 'helpHeadline' element
I am playing with vim syntax files and using help.vim as a guide to create my own syntax file. Changes I make in my syntax file are correctly applied in a test file but my problem is with creating a ...
0
votes
1
answer
271
views
How to get vim to sync syntax highlighting when opening file
I've got vim setup to jump to the last known cursor position when opening a file, but sometimes that position is in the middle of some javascript or css on a html page, and the syntax highlighting ...
0
votes
0
answers
715
views
Installation of TagHighlight
I am trying to install the TagHighlight vim script.
I am using MacVim version 7.4.22 and Mac OS X 10.9.3. I unzip the zip file and then copy into ~/.vim. However, there are no changes when I start ...