Tagged Questions
9
votes
3answers
2k views
On-the-fly Java syntax checking in vim
First and foremost please don't scream "Use an IDE" at me. I have given eclipse a chance and it is... okay but I'm much faster in vim than eclipse.
Basically the one thing that I wish vim could do ...
0
votes
0answers
12 views
Highlighting ReST in python doc strings within vim
Since I am using Sphinx with autodoc I would like to have my vim highlight python docstrings with ReST syntax. Is that possible?
Searching with google yielded only one usable result (I was surprised ...
1
vote
2answers
54 views
Add end of line comment to vim syntax
Not every command in Vim allows you to add end-of-line comments. Sometimes the " is valid as an argument, so it would be ambiguous. However, if you insert a pipe, the command is ended and you can ...
0
votes
2answers
40 views
Vim Only Highlighting ~/.vimrc
I am a new vim user and trying to turn on syntax coloring for vim on Mac OS X. I followed http://vim.wikia.com/wiki/Turn_on_syntax_coloring_in_Mac_OS_X's instructions, and my ~/.vimrc file has the ...
30
votes
5answers
2k views
Validate PHP syntax in VIM
I would like to know how if it's possible to validate if a PHP file is valid in VIM without closing VIM every time?
Thank you
1
vote
2answers
276 views
How to indent typescript files in VIM correctly
I'm quite new to VIM and been working on using bundle to format/colorize/indent my files. I currently downloaded a typescript vim syntax "bundle" from here: ...
2
votes
2answers
137 views
Changing `rubyLocalVariableOrMethod` color in VIM
I was wondering whether it's possible to change the rubyLocalVariableOrMethod color in a mytheme.vim color scheme file.
I am currently extending the ir_black theme which I really like, and want to ...
2
votes
1answer
31 views
Has “syntax case ignore” changed from vim 7.3 to vim 7.4?
I suspect that the command syntax case ignore has changed between the versions 7.3 and 7.4
Here is my rather small test file (test_1.vim):
syntax clear
syntax on
syntax case ignore
syntax match ...
0
votes
1answer
53 views
Vim isn't loading syntax
I had an unrelated problem with vim a while back, that I thought deleting all vim files would help. It did not, but now I have a new problem. Whenever I try to put syntax on, it says:
Error detected ...
0
votes
1answer
64 views
Does Vim have a certain syntax to combine commands on command mode?
I noticed some syntaxes when i use vim
for example
[<motion>]<operator><motion>
e.g.
<gg><d><G> // delete from the top of file to the bottom of file
...
10
votes
3answers
2k views
Vim Markdown highlighting (list items and code block conflicts)
I decide to learn more about vim and its syntax highlighting.
Using examples for others, I am creating my own syntax file for Markdown. I have seen mkd.vim and it has this problem too.
My issue is ...
1
vote
1answer
58 views
set rst (reStructuredText) filetype in vim
I am reading book/documentation in Vim written in rst (reStructuredText) format. Book is about PHP, so it is full of code. If I manually set filetype to PHP, code has syntax highlight.
set ft=php
...
4
votes
5answers
1k views
Vim object-select with syntax-aware text-objects
I just learned about the truly awesome object-select capabilities of vim. With the cursor within some "text object", a set of simple verbs can select or operate on the whole object. For example, ...
0
votes
1answer
45 views
vim highlight syntax issue [closed]
I really struggle to understand this.
On my MAC with vim version 7.3 I can enjoy the 256 color scheme while on my unix machine with vim version 7.0.237 I cannot.
I have checked all the steps described ...
6
votes
2answers
356 views
Vim variable syntax highlighting
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 ...
1
vote
2answers
45 views
Create new syntax in vim matching # but not #{
I want to create a new syntax for vim to highlight the comments. This syntax uses # for comments, but curly brackets after # (e.g. #{foo=5}) is used for programming, which are not to be highlighted ...
1
vote
2answers
109 views
LLVM-IR syntax folding for Vim
I am working with LLVM-IR code, generated by clang -emit-llvm and want to get code folding working.
So far I am using foldmethod=expr and foldexpr=LLVMFold().
I would like to use syntax based folding ...
3
votes
3answers
156 views
Vim - indent and syntax highlight broken after recover file
I was editing a file with vim. I started another vim to edit the same file, it said that the /tmp/file.swp exits, press "R" to recover it. I chose to recover. But after that, syntax highlight didn't ...
5
votes
1answer
144 views
VIM syntax: conditional function coloring
I'm customizing the standard "c.vim" syntax file in order to tune the visualisation of my C code.
I would like to distinguish the color of the "called functions" from the one of the "declared ...
8
votes
3answers
2k views
Making Vim auto-indent PHP/HTML using alternative syntax
I edit PHP in Vim and have enjoyed the auto-indenting, but PHP's alternative syntax doesn't auto-indent how I would like. For instance, in an HTML template, Vim doesn't recognize the open control ...
1
vote
0answers
242 views
custom vim syntax highlighting for angularjs is flaky
I am doing angularjs development and have a bevy of HTML ng-templates included inside tags in my HTML, like so:
<script type="text/ng-template" id="content_listing.html">
...
4
votes
3answers
5k views
Syntax highlighting in vim for python
How do I do I set the syntax highlighting in Vim 7 for python?
I would like to set my own colorschemes, and syntax highlighting for a type of code file.
2
votes
2answers
477 views
syntax-check a VimL script
I have a sizable vim script (a .vim file, in viml syntax). I'd like to check (but not execute!) the file for simple syntax errors.
How do I accomplish this?
I just want a very rough syntax check. ...
6
votes
3answers
6k views
Vim syntax based folding with php
I have downloaded php.vim file, which contains PHP-based syntax information. It should be able to provide syntax based folding, but I can't make it work for some reason.
I have set :let g:php_folding ...
12
votes
4answers
20k views
Linux/Ubuntu directory location ~/.vim/syntax/
Where is the default location for the folder ~/.vim/syntax/ on a Linux system? I am trying to add a Python addon.
3
votes
2answers
2k views
How Do I get a syntax check to work in/with vim?
This question has been asked, in one form or another, a dozen times here, and it blows my mind how not a single one actually addresses how to configure syntastic or jslint such that it actually does ...
5
votes
1answer
198 views
Vim syntax high-lighting for C++11 that does not mess up other highlighting. E.g., class/namespace scoping
I am aware of this script: http://www.vim.org/scripts/script.php?script_id=3797. It has been suggested a few times, and other questions regarding C++11 syntax for Vim have been shut down due to ...
0
votes
2answers
59 views
Vim syntax highlighting unwanted words
I have created a syntax file for some AnB-files for vim and while it does load the syntax highlighting and highlight everything I want it to highlight, it seems to highlight some unwanted stuff as ...
4
votes
3answers
4k views
VIM - Jump to next error / code highlighted in red
When dealing with merge conflicts it is common that the >>>>>> and ====== inserted by DCVS are syntactically incorrect for the file I'm in and show up as highlighted in red. When ...
1
vote
1answer
91 views
GVIM formatting using “=” for c++
When selecting the following code in gvim and hitting "=" it is shifting the parenthesis left on the constructor. Is this a gvim bug or is this some setting I might have to set to fix?
Output:
...
2
votes
1answer
1k views
VIM Syntax highlighting not functioning
I am fairly new to vim and trying to get syntax highlighting in place. i made and edited my vimrc file and when i look at that file it is colored. But when i go to my python files they have no ...
1
vote
1answer
133 views
Why does nextgroup not match newline without trailing whitespace?
Consider the following 3 sets of highlight groups and syntax matches:
hi Foo ctermfg=black ctermbg=red guifg=black guibg=red
hi Filler ctermfg=black ctermbg=green guifg=black ...
0
votes
1answer
174 views
How to add lua operators to vim syntax file?
I'm a Lua developer. My development environment is SSH into a central server and using VIM.
Vim comes with the following Lua syntax file.
What I noticed is the syntax file does not include ...
4
votes
1answer
160 views
How can I fix indentation in Vim for Jquery scripts?
I have this portion of the script indented by Vim like this:
$(function () {
$('#fileupload').fileupload({
url: siteurl + 'ajax/upload',
dataType: 'json',
progress: function (e, data) {
var ...
1
vote
1answer
96 views
Vim character insert slows exponentially on Centos 6 when :syntax on
We upgraded some servers from CentOS 5 to CentOS 6. On all the CentOS 6 servers, Vim (same bug on vim 7.2 and 7.3) often runs normally for a few hours, but inevitably begins inserting characters very ...
0
votes
1answer
248 views
Cursor color in xterm; change accordingly to the syntax in vim
In gnome-terminal and konsole, my cursor color changes according to the selected foreground color in vim (if I'm on red text, my cursor is red).
In xterm, my cursor is ALWAYS white. How can I set ...
4
votes
4answers
5k views
What Vim script you recommend for checking Python syntax on the fly?
I have visited Vim website , script section and found several synthax checkers for python. But which one to choose ? I would prefer something that supports python 3 as well, even though I code in ...
1
vote
2answers
433 views
Vim not automatically recognizing groff (manpage) files
I have:
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 1 2011 03:25:24)
using Debian testing.
I was playing around with an old manpage I wrote and noticed that vim (I used gedit ...
0
votes
1answer
32 views
ft-syntax-omni is not working
Looks like ft-syntax-omni has the ability to fill the omni auto completion list from syntax highlighting, but I couldn't get it to work:
In my VIMrc, I've got:
au BufRead,BufNewFile *.idc set ft=idc
...
1
vote
1answer
109 views
Only run a highlighting rule as a nextgroup in syntax file?
I have these rules in a custom syntax file.
syn match id '\w\+'
syn keyword _type void int bool string list nextgroup=id
I only want id to be matched after a _type.
1
vote
2answers
68 views
How can I join two commands together in vim?
I am trying to combine two commands for Bundle plugin in vim. Because BundleUpdate pulls all plugins and installs them and it is slow. I have the following below. The first two works fine, but the ...
0
votes
1answer
129 views
vim: php syntax highlighting in HAML with :php filter [closed]
I'm using the :php HAML filter that is supplied with haml-contrib to write blocks of php code inside a haml file.
this allows me to write:
!!! 5
%html
%body
-# HAML code ...
:php
...
2
votes
1answer
112 views
Vim custom highlighting for lines starting with ;
I want to generate a custom highlighting rule for my template files *.tmpl, namely I would like to mark the lines that start with ; - those are comment lines.
I have tried with something like this ...
1
vote
2answers
100 views
Which extension should I use for notes in vim? [closed]
I'd like to store text in a file and work on it with vim. It would be something very simple, like a .txt on Windows. But I'd like to get basic syntax highlighting. Which file extension and syntax ...
0
votes
1answer
58 views
Vim Syntax Modify
I am trying to color different levels of parentheses differently in vim -like rainbow parentheses. But I couldn't do it without breaking, for example, css highlighting.
Problem is that: syntax of ...
2
votes
3answers
130 views
What vim pattern matches a number which ends with dot?
In PDP11/40 assembling language a number ends with dot is interpreted as a decimal number.
I use the following pattern but fail to match that notation, for example, 8.:
syn match asmpdp11DecNumber ...
1
vote
1answer
77 views
What does “he=e-1” mean in vim syntax file?
I am studying asm68k.vim and find he=e-1 after some syntax definitions. As I read I guess it makes the matched word one character shorter than what the pattern actually matches but I am not sure. Take ...
2
votes
2answers
240 views
Vim Syntax: match only at the start of region - not subsequent ones
I have the following Vim syntax file:
" Vim syntax file
" Language: ScreenplayText - the textual source of ScreenplayXML
" Maintainer: Shlomi Fish <[email protected]>
" Home: ...
2
votes
1answer
1k views
Folding of text in vim with Markdown syntax plugin
I have a Markdown syntax highlighting plugin installed for Vim (MacVim). It's working well, but it automatically folds down headings, lists, etc.
Does anyone know how to disable the folding of ...
7
votes
1answer
4k views
Syntastic for Vim: What are the required lines in ~/.vimrc? (PHP error checking)
I find the documents frustrating. What are the basic lines I need to add to my config file to get it working?