All Questions

1,002 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
18
votes
0answers
423 views

How does `\zs` interact with syntax matches?

Consider the text: foobarbaz First we highlight the regular expression /foobar/: :syntax match Special /foobar/ Next we highlight the regular expression /foobarbaz/: :syntax match Error /...
13
votes
0answers
193 views

Using <C-,> causes “<80>ü^D,” to flash in the showcmd area?

I've mapped <C-,> as well as some other special keys (<C-Enter>, <C-S-Space>, ...) in my vimrc like, :set <F13>=^[[44;5u :map <F13> <C-,> :map! <F13> <C-...
11
votes
0answers
1k views

Pair programming in NeoVim?

I'm a NeoVim user and would like to be able to collaborate in real time with users, preferably also across other editors. Are there any open source plugins that enable remote Neovim←→Neovim pair ...
11
votes
2answers
785 views

Neomake hanging when using eslint

I have been following the following two tutorials to try and set up eslint and Neomake: Linting code with Neomake and Neovim Linting code with Neovim and Neomake - ESLint edition So I have the ...
9
votes
0answers
485 views

Is there a setting to force a hanging indent on bulleted/numbered lists WITHOUT hard wrapping?

Basically, I'd like to have long entries for bulleted / numbered lists that automatically indent like so: 1. Congress shall make no law respecting an establishment of religion, or prohibiting the ...
8
votes
1answer
308 views

Dealing with case insensitive filenames on Windows

I'm using the latest vim/gvim (8.0.118), but have noticed this problem in the past, with other versions. I created a file named fizzbuzz.java (outside of gvim), and opened it in a new tab in gvim on ...
7
votes
1answer
129 views

Matching interval brackets

I'm using vim to edit LaTeX code, and I'm often writing intervals like (a,b] but this messes with other vim features. For instance, Jumping with %: if I have something like \phi((a,b]), the final ) ...
7
votes
0answers
247 views

vim ZZ lost output with autocommand

I want to check file before quitinq vim with custom functions, everything seems fine with QuitPre autocommand except using ZZ to exit. In this case the output is missing. Consider following function ...
7
votes
0answers
371 views

Unable to Enable Vim Conceal

I'm running ArchLinux using the xfce4 terminal with vim-latex. Using this setup, I tried to follow the instructions here to conceal latex commands with unicode. However, after much effort, I still ...
7
votes
0answers
520 views

Highlight line number of folded lines

I want to have uniform highlighting of line numbers (provided by the LineNr and CursorLineNr hl-groups) but the line numbers of folded lines don't obey a particular group (as far as I know), but obey ...
6
votes
0answers
209 views

How to change jumplist behavior

See the following example: " open a file with 20+ lines. 1gg " jump to line 1 3gg " jump to line 3 5gg " jump to line 5 7gg " jump to line 7 ctrl+O " back to line 5 ctrl+O " back to line ...
6
votes
0answers
264 views

Vi and Vim default to split left and split above. What is the history and motivation behind this?

When a window is split, given that Vi/Vim splits are not stored in a tree structure, the "direction of the split" is basically "the window in which the cursor is placed after the command". Update ...
6
votes
0answers
55 views

Why are tabs adjacent to concealed tabs displayed wider than a single tabstop?

I just wrote the following code in an answer to another question: syntax match HideTwoIndents /\v^\t(\t)?/ conceal set conceallevel=2 This works great if 'list' is set and if 'listchars' does not ...
6
votes
2answers
433 views

How to select a matched autocompletion item

I want to select the 6th item (here readImage) in the auto-completion items. The normal way i knew is pressing ctrln for 6 times until the matched word is selected and then press enter. I tried ...
6
votes
0answers
610 views

Mixed PHP and HTML indenting

Is there a way to have mixed indenting more like Sublime Text (left) than Vim does it? I would like the nested UL to follow the (line 10) to follow along the (main indentation).
6
votes
0answers
87 views

Count only words for which Spell is enabled?

I want to count the words in my buffers, but for TeX files, for instance, a lot of words (e.g., commands) shouldn't be counted. I'm aware that there are scripts that do this specifically for LaTeX, ...
6
votes
0answers
223 views

.php file makes html text same color as html attributes - how to fix?

The text inside of <p> tags is the same color as the html attributes, so it's hard to distinguish between them. The html inside this .php file is colored (line one of this image) almost ...
5
votes
0answers
169 views

How can I watch variables when debugging Vimscript?

I would like to have another pane active when debugging a Vimscript function which would show the values of chosen local variables and function arguments dynamically. Currently I have to echo or let ...
5
votes
0answers
979 views

How to share the same buffer between multiple vim instances

I work with two displays. I usually open one instance of Vim in display #1 (let's call it Vim #1), which over time ends up having an open buffer for nearly every file in a project. Now I want to ...
5
votes
0answers
74 views

Comments pane for current buffer that you can jump to such as TODO:, WARN:, and NOTE:?

A while ago I used to use eclipse as my IDE, and I remember you could add TODO: some task, NOTE: some comment, WARN: some warning to your code, and it would appear in a particular pane for the current ...
5
votes
1answer
250 views

Highlighting after a line limit

I'd like to highlight sections of a document which are too long (measured in lines) so they will all print on a physical page. Sections are separated with ===. I tried to do it with this code: ...
5
votes
1answer
247 views

Interactive syntax-highligting: highlight the current region only

Often enough a text file is structured as a collection of blocks or cells of some kind. E.g., slides in a Tex Beamer presentation, bibtex items, function definitions, etc. I wonder if vim can ...
5
votes
1answer
226 views

How to make a syntax region stop on empty lines?

I would like to adapt this syntax file so that the formatting in VIM matches more closely what this online Markdown editor (GitLab-flavor) displays (the output on the right is relevant, this is how I ...
5
votes
1answer
166 views

How to disable folding while typing?

I'm programming mostly in Python/Cython and use foldmethod=syntax (and foldclose=). Overall, this works fairly well, i.e. functions/classes/methods are folded reliably mostly. However, I have one ...
5
votes
0answers
1k views

Syntax highlighting randomly turns off

I use syntastic and split windows heavily in my vim workflow. Lately, syntax highlighting will vanish, seemingly at random, in one of my windows, usually after opening a new split. This happens with ...
5
votes
0answers
719 views

What is the best practice in vim8 for wrapping with indentation aka breakindent

To have proper paragraph wrapping with indentation in vim (after vim7.4) we could use this: " Wrap the text with identation isntead of the old way set breakindent set showbreak=\ \\_ Since vim8 ...
5
votes
0answers
789 views

Configure custom key mapping for commenting

I am using https://github.com/scrooloose/nerdcommenter/ plugin to comment the code. It's working fine, but I would like to do a modification. Currently these are the default mappings: <leader>...
5
votes
0answers
626 views

Can I give YouCompleteMe a static list of completions?

I am using the Julia programming language, and as of right now, there are no good syntax-completer for VIM. I am working on one, but haven't fully got my head around how to hook into ycmd. Til I ...
5
votes
0answers
376 views

Persistently fix the height of a split in vim

So I searched the web far and wide and I can not for the life of me figure out how to do this. I have the following key binding: nnoremap <leader>o :below 10sp term://.//$SHELL <cr> :set ...
5
votes
0answers
305 views

Is it possible to get the rule (cinoption) that govern the indentation for a specific line in vim

I have the following code: namespace { template<typename T> struct One // This is the odd line { // impl details } template<typename T> struct Two { // impl details } }...
5
votes
0answers
262 views

Properly restore terminal title after suspending vim

I'm using Vim 7.3 on OS X Terminal version 2.6.1 (OS X version 10.11.2). If it's relevant, my version is compiled without X11. When I open a file in Vim, the terminal title bar changes to show the ...
4
votes
0answers
782 views

Getting “fugitive: No Gbrowse handler found”

When I run :Gbrowse from vim-fugitive, I get fugitive: No Gbrowse handler found for 'https://github.com/dbcli/mssql-cli' Can it just spool that out to xdg-open?
4
votes
0answers
65 views

Have colors when using :make

When I'm using :make, the output doesn't have any color. The text is only white. But when I'm using :!make for a C project or :Cargo run for a rust project ( I also use rust.vim ) , there are colors ...
4
votes
0answers
53 views

Make Vim ignore first character in line while indenting

Whenever I have to edit Perl Mason files, I always have problems indenting lines due to Perl code starting with %. For example: <div> <div> % if( !$something ) { <...
4
votes
0answers
67 views

Can vim-ale emit an error when it fails to parse compiler output?

Ale does not always indicate an error when compilation fails. AFAICT, the reason is that ALE's parser can't find a reference to the current file in the compiler's error messages. This is because ...
4
votes
0answers
169 views

How do I call functions and commands from .vim files in Vader tests?

I am trying to write tests using Vader plugin but unfortunately, every time I try to invoke a command/function in Execute/Do block it doesn't see seems to work on the text provided in Given block! # ...
4
votes
0answers
69 views

How to scroll back in the output of the last Ex command after pressing `g<`?

From :h g<: The g< command can be used to see the last page of previous command output. This is especially useful if you accidentally typed <Space> at the hit-enter prompt. You are ...
4
votes
0answers
417 views

Unreadable display of Tamil characters in Vim

gVim seems to have problems displaying text in Tamil (and possibly other Indic languages), even when the font supports it. For eg., here's some text in Emacs and the same text in gVim (both under ...
4
votes
0answers
143 views

What is the default “effective” titlestring?

Is the effective default value for titlestring documented somewhere? By effective, I mean the one that displays $(basename) ($(dirname)) (m of n) - GVIM1 or ... ((m) of n), even though titlestring is ...
4
votes
0answers
588 views

vim compiled with python3 but python3 omni-completion does not work

It used to work when I used python2, but now I can't use ^X^O to complete function names. I do have vim with -python and +python3 (on Ubuntu 16.04), but here is the error I get when trying Ctrl-X ...
4
votes
0answers
234 views

use only “closest” tagfile to working directory (of buffer or of vim process)

I have the following configuration setting, blatantly stolen from vim-sensible. " use magical ; option if has('path_extra') setglobal tags-=./tags tags^=./tags; endif I suspect what it does is ...
4
votes
0answers
189 views

Disable spell check for single character words

I haven't found a way to disable spell checking for single character "words", like when you type 100k (k as in thousand) and it gets highlighted as a mistake. I already tried this: syn match ...
4
votes
0answers
202 views

Remapping home row keys hjkl when using repmo plugin

I am new to Vim and I am trying to remap the four (arrow) navigation keys hjkl one step to the right on the keyboard to get j down k up l left ; right I am following the recommendations given in ...
4
votes
0answers
297 views

Ultisnips causes problem with unmapped f-keys in nvim insert mode

With F2 unmapped, for instance, I get a load of error messages (see below). I realized I can fix this by mapping the f-keys, but I'm curious: are they mapped to something by Ultisnips, that doesn't ...
4
votes
0answers
49 views

How can I specify the movement direction for text objects?

How can I specify a direction (for going backwards) for commands working on text objects like 2caw? E.g. I like to make 2caw replace bbb ccc in aaa bbb ccc ddd while on c.
4
votes
0answers
56 views

Is there an ideal / idiomatic way to debug running plugins?

I sometimes have plugs stop working — in my case, mostly using async lookups with Unite. When this happens, I would like to see what is happening and look into how to configure around it, or make a ...
4
votes
0answers
51 views

Is it possible to look up a command that takes no arguments?

Is there a way to use :help to find commands that take arguments vs. no arguments? For example: :map (w/o arguments) can list the key mappings for various modes. However, :help :map leads me to :map ...
4
votes
0answers
52 views

vipJ unwrapping fails when using custom function

I have decided to use Vim for editing prose, as I find it to be a much more work-conducive, clutter-free environment than most so-called text processors expressly built for that purpose. To that end, ...
4
votes
0answers
109 views

How to align a Latex table that uses \multicolumn?

I want to align a Latex table the way it appears in the final document. There are various Vim plugins for aligning tables (2, 3, 4), but none of them handle the spanning cell correctly. The code ...
4
votes
0answers
151 views

Set line breaks, word wraps and word searching for Thai and other non-latin languages

I can set the text width and can manually line break imported paragraphs with the following as an example. set textwidth=72 gqq I can also navigate English text files with the standard 'w' 'b' 'e' '*...

15 30 50 per page