Questions tagged [syntax]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
33 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 ...
0
votes
1answer
35 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
31 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
1answer
68 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
2answers
42 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
27 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
39 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
19 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:...
0
votes
1answer
24 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,...
1
vote
1answer
100 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
58 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
60 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
54 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 ...
2
votes
2answers
670 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
89 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 ...
1
vote
0answers
128 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
1answer
113 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 ...
0
votes
0answers
31 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
52 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 ...
0
votes
1answer
99 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 ...
1
vote
1answer
127 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 ...