Questions tagged [syntax]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Syntax profile close to dosini but with extra highlighting between quotes

Unfortunately I've to work with a custom and weird file format every day. To make my life in Vim easier, I've tried several syntax settings and 'dosini' comes very close. However, the text in between ...
0
votes
1answer
134 views

Vim syntax line matching mechanism

Can someone explain or link to valid explanation information on the syntax highlighting mechanism. In particular I am having having a hard time understanding how rules are applied. Imagine the ...
2
votes
2answers
46 views

Highlight Multiple Lines of Comments

I'm on Ubuntu 18.04, vim-gtk3 8.0. I'm trying to get gvim to highlight multiple lines of comment that starts with a particular word. For example, consider the word 'NOTE': // NOTE(Ryan): This would be ...
1
vote
1answer
20 views

Unwanted highlights on page scroll

I have a pretty similar problem as in this issue with some exceptions. Basically, after I scroll page down or up Ctrl+d / Ctrl+u all non-empty lines get highlight from the end of the line to the ...
2
votes
1answer
139 views

How to match this syntax group?

I'm trying to improve on the MySQL syntax highlighting, for my particular code base. I have a lot of this sort of thing FROM TBL_ENTITIES E JOIN TBL_RELATED_ENTITIES RE ON RE.entityFK = E....
2
votes
2answers
288 views

Is it possible to make “???” a keyword that can be highlighted?

Is it possible to make ??? (3 question marks) a keyword, and highlight it? I have tried the following in a syntax file. Other strings on the line are highlighted, but not ???. \?\?\? does not work ...
1
vote
2answers
41 views

common /after/syntax for different file types

I want some common syntax highlighting for various filetypes. Currently I have runtimepath/after/syntax/base.vim which has syntax rules I want and then I created mklink (this is windows) to base.vim ...
0
votes
1answer
129 views

folding in matlab

I'm using vim for my matlab editor. And It works nicely, except I cannot get folding to work. I found my syntax file on github: matlab.vim And I wanted to add folding. I changed the line syn ...
0
votes
0answers
42 views

Can YCM use gcc instead of clang for syntax checking

I'm using YCM to help me work with c++11 and it works well. However, it seems that YCM used clang to to the syntax checking. Here is an output of :YcmDebugInfo of one of my project: -- C-family ...
2
votes
0answers
23 views
1
vote
1answer
171 views

How to fold nested “if then else end if” statements

I try to write a vim syntax file for folding if-else statements with the syntax: if <condition> then <block to fold> [else <block to fold>] end if Current approach syn region Then ...
3
votes
1answer
40 views

How to match paragraphs of text ending with a character?

This problem that seems trivial is beating me real hard. I'm trying to create a couple of syntax highlighting directives for a custom language that is structured in paragraphs separated by at least ...
2
votes
1answer
77 views

How to toggle syntax with a single key

To turn on syntax we normally use: :syntax on and to turn it off we do: :syntax off. I would like to define a single key, maybe using <expr> to toggle syntax. My problem is how to get the ...
0
votes
0answers
313 views

ALE for golang-syntax checking is not working

I'm trying to build an environment for my vim to code golang. I've installed the Golang with the version 1.14 in the path of /usr/local/go. Also, I installed the vim-plugin ALE and vim-go. Here is ...
1
vote
0answers
80 views

ale can't update the status line for golang

I've succeeded in configuring a vim-c++ environment based on the plugin YCM and the plugin ale. I use YCM to do the auto-completion and ALE to hint me errors and warnings. I added the config as ...
3
votes
1answer
14 views

Syntax clarification on a global sort command

I was looking at a global command that I saved from long time ago. I did not understand how it was a valid syntax, but apparently the syntax was valid because the command worked. The command: :g/\v\{/...
4
votes
0answers
29 views

Is it possible to use syn match dynamically

I know that syn match can work with the regular expression to do some custom highlight settings. I'm thinking if it can work dynamically. For example, I'm doing a c++ project and I want to highlight ...
0
votes
1answer
506 views

Vimtex conceal not working properly

Hi I am seeing the following on my .tex files. My .vimrc file looks like this let mapleader =" " call plug#begin('~/.vim/plugged') Plug 'lervag/vimtex' let g:tex_flavor='latex' let g:...
0
votes
1answer
48 views

what is the purpose of the view folder in the .vim folder?

I got an error when opening my .vimrc with vim saying ".vimrc" 138L, 3781C Error detected while processing /home/fbence/.vim/view/~=+.vimrc=: line 117: E518: Unknown option: termkey= line 118: ...
2
votes
0answers
211 views

How to fix this `Omni completion (^O^N^P) Pattern not found` error?

I am trying to set up syntax keyword based omnicompletion in vim. I have defined a few syntax keyword Constants in ~/.config/nvim/syntax/spl.vim They are correctly detected and highlighted. They are ...
0
votes
2answers
142 views

How to remap Autocomplete on Control+N, to Control+Space?

I am trying to remap this functionality: to Ctrl+Space, by using this line in .vimrc inoremap <C-Space> <C-n> However, I can not seem to get it to work. If I press Ctrl+Space after ...
2
votes
0answers
50 views

How to set syntax keywords dynamically

I'm trying to highlight the keywords for my c++ project. So what I've done is to create a file here: ~/.vim/after/syntax/cpp.vim and put some custom configuration into it. For example, putting the ...
1
vote
0answers
61 views

vim syntax highlight [closed]

Syntax highlighting just stopped working on my mac (v 10.14.6). I've been trying to get it back over the past 2 days with no success. I have neovim (v 0.3.8) and when I use :syntax, the command line ...
0
votes
1answer
22 views

“map”pings in syntax files shows on startup

in my project I have different kinds of files. For every filetype I created a ~/.vim/syntax/[type].vim file for e.g. highlighting and key mappings. In every filetype I have a footer line with # vim:...
1
vote
1answer
257 views

Python semantic linting [closed]

I'm currently using ALE (recently upgraded to this from syntastic) and YCM for code completion, highlighting syntax errors on-the-fly (rather than just at save time, like with syntastic), and it's ...
0
votes
1answer
34 views

Disabling syntax and maintaining colorscheme [flickering problem]

I have noticed that with set syntax=off option set, the gvim screen doesn't flicker when I scroll the page using <PageUp> and <PageDown>. What are the possible solutions, if some exist,...
0
votes
1answer
339 views

How to access any given vim plugin documentation?

I am new to vim and I've been asking a bunch of questions on here, most of which has to do with plugins. What is the correct way to access the documentation for plugin? As an example, I am using the ...
1
vote
0answers
67 views

Syntax highlighting - help me find the bug

I have a bug and I can't figure out the solution. Perhaps you esteemed folk can be of aid. I want to extend a syntax file (julia syntax in polyglot package). I want to include the following patterns ...
1
vote
1answer
93 views

Is there a conflict between `syntax enable` and custom keywords?

I have the following minimal .vimrc file: " syntax enable syntax case match syntax keyword MyTodo TODO PENDING syntax keyword MyTodoIP IN PROGRESS syntax keyword MyTodoClosed CLOSED COMPLETE DONE ...
4
votes
2answers
2k views

Add keywords to a highlight group

Todo highlight group currently highlights TODO and FIXME keywords. What do I do to add NOTE, and possibley more keywords, to this existing highlight group, for all file types?
0
votes
1answer
142 views

Matching 'Capitalized' words in Vim

I'm trying to use the following regex to match 'Capitalized' words: "\l\@<!\<\u\w\+" Which matches 'Main' and 'Canvas' in: public class Main extends Canvas Or another example, matches all ...
1
vote
0answers
177 views

vim syntax for python call and keyword arguments: issues with built-in keyword

I am trying to come up with a vim syntax for python function call, e.g. foo(notarg==0, arg2, kwarg='a', kwarg2='b') dict(a=1, b=2, c=3) where we want to highlight (i) function name foo, dict (ii) ...
0
votes
0answers
36 views

Automatically uncompress section of buffer

I'm using a simple text file in Vim as a task manager and am keeping completed tasks in an archive section of the same file. I'd like to compress that section of the buffer when saving changes to a ...
0
votes
1answer
69 views

How to use a regexp to search/match specific pattern only for the custom statusline and/or tabline?

I got this regexp from google which is for matching specific glyphs in vim-nerdtree. autocmd FileType nerdtree syntax match {hl-group} /\v{glyph}/ containedin=ALL But obviously it won't work on ...
1
vote
1answer
179 views

What are the allowable characters in identifiers?

In Vim, what characters are allowed in identifiers, such as variable names and function names? I looked up the help for both variables and functions and neither one defines the allowable character ...