All Questions

1,280 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
22
votes
0answers
588 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
222 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-...
9
votes
0answers
408 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 ...
8
votes
0answers
655 views

How to avoid screen corruption?

I'd been using Linux Mint MATE for years, and recently moved to Arch Linux with MATE Desktop Environment without any change of hardware or .vimrc. (By the way, I use no plugin.) After that, when I ...
8
votes
0answers
445 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 ...
7
votes
0answers
100 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, ...
7
votes
0answers
576 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
76 views

How does NeoVim's native LSP client compare with plug-ins that implement that protocol?

NeoVim v0.5 will include a native LSP (Language Server Protocol) implementation. See Greg Hurrell (wincent)'s Screencast #87: Neovim's built-in LSP client covering it. How does it compare with ...
6
votes
0answers
640 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
898 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 ...
6
votes
0answers
249 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
34 views

Make jumplist behave like stack?

I use CTRL-O and CTRL-I heavily to move between previously visited positions. These commands rely on the jumplist. It makes sense to me to visualize the jumplist as a stack of my position history. ...
5
votes
0answers
530 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 ...
5
votes
0answers
86 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
273 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
0answers
2k views

How do I use wildmenu effectively?

I'd like to learn about using vim with multiple files without using external plugins. I read another answer that recommends putting the following in our .vimrc: set wildmenu set wildmode=longest:full,...
5
votes
1answer
283 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
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
692 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
2answers
307 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
24 views

EasyMotion without keyboard layout switches for non english text?

My text often contains two languages: english and russian. The problem appears with EasyMotion plugin. Assume I have such text: Русский текст и еще текст. and want to find те. What I do: Starting ...
4
votes
0answers
53 views

How to exit insert mode if pressing escape merely types “^[”?

I have neovim 0.4.2 running in a session of kiTTY 0.17.4 on OSX. I have pasted a long url while in insert mode. After doing this, every time I type BKSPC vim adds ^? to my document. Every time I type ...
4
votes
0answers
48 views

Vim ignoring a very long line

I have an html file that I am editing. It includes about 1MB of css and stuff from another site, which is all contained on one minified line, which I've folded: It also causes any jumps 'around' line ...
4
votes
0answers
57 views

How can I test and debug my syntax files?

I'm trying to make a syntax file for Raku. The major challenge I'm running into is that I have no automated means to test that my highlighting works as expected. I have to keep another tab open, ...
4
votes
0answers
34 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 ...
4
votes
0answers
37 views

Space Error when typing Korean

when typing Korean, I quite frequently have a space error, and it seems happening randomly. Suppose I am trying to write a sentence "I do not know" in Korean. When I hit the space key after 'not' to ...
4
votes
0answers
62 views

VIMDIFF missing small differences

I have two nearly identical very large files (890,000+ rows of exactly 899 characters each fixed length file). On rows 289141-289148 one file has a pipe character in column 38, and the other file has ...
4
votes
0answers
50 views

gvim: Make the mouse follow CTRL-W_j and CTRL-W_k

I run a Linux/GNOME laptop where the focus follows the mouse, and I have vim's mousefocus feature turned on, so the selected viewport follows the mouse, too. But when I try to switch viewports using ...
4
votes
0answers
32 views

Neovim makes spurious directories and doesn't clean them up on exit

Neovim makes directories in my home folder (presumably to store swapfiles, etc.) of the form nvimzOvQcg, nvim098eqo, nvimUyUGZ8, etc. Upon exit, the contents of these directories are cleaned up but ...
4
votes
0answers
19 views

How to copy text to X primary selection only when visual mode is started with the mouse?

At the moment, if I use Visual mode, whenever I select a block of text using the keyboard it ends up on my X primary selection (ie the clipboard that is filled using the mouse). Even if I just select ...
4
votes
0answers
68 views

switching `<Down>` and `<C-n>` in popup menu

I'd like to switch the behaviour of the <Down> and <C-n> keys when the popup menu (like from omnicompletion) is visible (and <Up>/<C-p> respectively). The following two ...
4
votes
0answers
114 views

YouCompleteMe on remote files

I use YouCompleteMe on vim and it works great for me on the files in my local machine. However, when I open files in a remote server, for example, using :e scp://user@remote//path/to/file.cpp None ...
4
votes
0answers
244 views

How to have gutentags build tags from the .git folder in a repository?

I want to have my tags file generated from gutentags/ctags to be in the .git folder, because I am working on a project with other people where I don't want to edit the .gitignore file. So, I have ...
4
votes
0answers
127 views

gVim - Use different fonts using :highlight

I want to set gVim font size for Comment highlight group. When I set it, it does not do anything (the font is still the same but color changes). My .gvimrc: se guifont=Fira\ Mono\ Regular\ 10 hi ...
4
votes
0answers
109 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
337 views

Why are Vim 8 :term colours with gvim different from those in plain vim :term or bash?

Vim 8 :term colours in gvim happen to be different from those seen in plain vim :term or bash. How come? How does one obtain the same bash colours in gvim? EDIT: I have been reading a bit more about ...
4
votes
0answers
58 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
524 views

How to create an Edit-with-Vim context menu entry for Vim 8.1 on Windows 10

The Explorer context menu entry does not get created by the installer. Windows 10 Pro v1803 (64-bit). What I have already tried: Installed Vim 8.1 using the stock Windows installer https://ftp.nluug....
4
votes
0answers
152 views

How to stop vim from reformatting lines inside a codeblock in a markdown file?

I keep the a formatoption in vim when I'm modifying markdown files, so my lines are automatically kept to textwidth characters long, with automatic reformatting when I modify text. How can I make ...
4
votes
0answers
75 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
210 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
92 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
57 views

How can I make syntax highlighting files more readable and maintainable?

Vim uses regular expressions for syntax highlighting. Often maintaining these can become rather unwieldy. For example: syn match goVarAssign /\v[_.[:alnum:]]+(,\s*[_.[:alnum:]]+)*\ze(\s*([-^+|^\/%&...
4
votes
0answers
172 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
668 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
1k views

Vim error: Unable to open swap file when using backslash as path separator in Windows shell

I'm using cmder as my Win7 shell. I see the following behaviour: Works fine (file in current directory): vim test Works fine (absolute path): vim ~/test Works fine (relative path with forward ...
4
votes
0answers
2k views

Collapse all directories in NerdTree by default

I recently restored my computer to a clean install and copied over my dot files. MacVim behaves quite a bit differently than my previous install. One main thing is that NerdTree no longer collapses ...
4
votes
0answers
317 views

Nested syntax folding

Assume I have a syntax as exemplified below and that I want to create a syntax folding definition for the nested begin..end pairs. begin : label a = 0; begin b = 1; end c = 2; begin ...
4
votes
0answers
874 views

Why does `set t_ve=' hide cursor in terminal

Vim's documentation lists t_vi as "cursor invisible" and t_ve as "cursor visible", but provides no hints on usage. Naively, I would have guessed that Vim would send the t_vi sequence when you somehow ...
4
votes
0answers
201 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 ...

15 30 50 per page
1
2 3 4 5
26