# All Questions

6,656 questions
6 views

### Why doesn't undercurl use underline in my terminal?

:help undercurl states: "undercurl" is a curly underline. When "undercurl" is not possible then "underline" is used. In general "undercurl" and "strikethrough" is only available in the GUI. But if ...
15 views

### Can vim mark (highlight) page breaks?

I'd like to see where page breaks are going to occur when I print (either using :hardcopy or a2ps). Is there something analogous to :set colorcolumn=78 ? Except that the line count should get reset ...
24 views

### How to set a colorscheme that still shows spelling errors?

How to set a colorscheme that still shows spelling errors? I am looking for two combined effects that I can acquire separately but not yet together. Set Colorscheme alone: OK. If I want highlights ...
9 views

### Autocompletion for flask does not work with Neovim

I am using neovim v0.3.2-953 for python development with the following plugins. Plug 'Shougo/deoplete.nvim', Plug 'zchee/deoplete-jedi', Plug 'davidhalter/jedi-vim' The deoplete auto completion ...
9 views

### How to save modifiable and readonly states in session file?

I can’t find how to save modifiable and readonly states with :mksession. Is it even possible?
32 views

### matchstr() acts differently when used in script?

I have these lines in a script: " go to start of file and search until the end call cursor([1,1]) let moreLinesToGo = v:true let b:qtags = [] while (moreLinesToGo) " search for lines like ":344f:",...
15 views

### How to get writefile() to pay attention to &nofixeol?

I want to write the contents of a buffer with writefile(). However I do not want to use binary mode because I suspect it has (undocumented) side effects. My question concerns noeol files, i.e. files ...
27 views

### i<c-e> and i<c-y> copy to end of line

In insert mode <c-e> and <c-y> copy a character at a time from the above line. I generally use these when working with aligned bits of text inside a program and want to copy to the end of ...
22 views

### How to parse a string to a list?

Is there a way in Vim to do the following: let S = '[''123'', ''456'', ''789'']' let L = parseStringToList(S) " L is a list containing the string '123', '456', and '789'
45 views

### what is the installation size of vim?

How much space does vim take up in for example Ubuntu 18.04.1? I'm not sure how to check, I don't want to apt purge and then install again
20 views

### Match everything except some characters and some strings?

I want to non-greedily match a string that don't contain ,, :, 。and #c, and I have tried this: ((,|。|,|:|#c)@!){-} which doesn't work. How can I make it work?
22 views

### Make abbreviations trigger only with ^]

Is it possible to define a set of abbreviations that trigger only on ^]. For example, in LaTeX I would like to define the abbreviation iabbrev <buffer> (( \left( without giving up on the ...
28 views

### Why does autoload/myplugin.vim get sourced?

I noticed that when functions in plugin/myplugin.vim are named using the autoload convention, function! myplugin#myfunction(), the file autoload/myplugin.vim gets sourced on vim startup, even though ...
12 views

### Requesting aliased :guifont rendering on Windows

Non-AA font rendering seems available everywhere except for Windows. In MacVim, this is possivle via noantialias. When using GTK2 front-end, the same can be achieved by adding antialias=false to the ...
26 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?
15 views

### Swapping two vim mappings

I have added the following the mappings to my vimrc. I want K to take me to the top line of the window and H to take me to the first non-empty character of the line. nmap K H nmap H ^ nmap J L nmap L ...
30 views

### How to change one syntax behaviour in vim

The shebang line has an annoying background color, how to change it to have the same color of comments. This is a Haskell file.
15 views

### Syntax highlighting (contains, contained) of only the first match

I think it is possible but can not figure how one can highlight only the first match of contained syntax? syn clear syntax cluster TitleParts contains=TitleNum,TitleType,TitleRest syntax match ...
33 views

### How to get all remapped keys

Is there a way to get all remappings (.vimrc, plugins, etc) that were made by user relative to bare bone vim?
23 views

### Search multi-line records separated by multi-char sequence

I have been looking online for an answer for weeks now, but I am still at a loss... (I didn't learn much from syntax highlighting, and can't find any way to make \._ exclude a match) I have a file ...
90 views

### How do you navigate large source files with VIM?

First, I'm not asking about performance. I'm looking for something that will help me, mentally, get into large C source code files that I'm not yes accustomed to. Take for example readelf.c. This file ...
17 views

### Why does <C-k> {char1} {char2} work for digraphs but {char1} <BS> {char2}?

Based on the documentation of digraphs-use (:help digraphs-use) it should be possible to do both <C-k> {char1} {char2} and {char1} <BS> {char2}, but the second one does nothing and <BS&...
31 views

### Why does :call f(…) do nothing while mapping it to a binding works?

I'm not really sure how to describe this behavior better than with the example I'm dealing with. I'm trying to write a custom completion using fzf-vim ... and as I'm looking through the documentation,...
27 views

### Copy and paste with breakindent set

I'm using breakindent to make long lines wraparound to the same indentation level as the start of the line. Unfortunately, with this setting on system copy and paste (in this case, out of the macOS ...
14 views

### vim how to page down/up in another window

Context: There are 2 and only windows in vim. I want when I press F2, cursor remain in the same window, the other window behave like PgDnpressed. How to achieve that behavior? P.S. motivation: ...
27 views

### How to show [noeol] flag in custom statusline?

If I create a file without an EOL, for example: $echo -n "1" > test ...and then open it in vim:$ vim --clean test ...the left hand side of the statusline looks like: "test" [noeol] 1L, 1C ...
23 views

### How to yank a specified amount of lines in vim -E mode?

This is my first-post and question here so please be gentle (but also tell me if, it I wasn't specific enough etc...) So my questions seems rather simple to me, but still blocks me and I can't find ...
11 views

### Open a second file and quit the previously opened one without saving

If I do something like this: vim i # Write some tmp text # This tmp file served it's purpose, want to quit this one and open a new one :e newfile # E37: No write since last change (add ! to override) ...
37 views

### What is the difference of using au BufNewFile,BufRead *.py and au Filetype python in .vimrc?

As I am setting .vimrc, I found these two code blocks have the same functionality. au Filetype python set \ tabstop=4 \ softtabstop=4 \ shiftwidth=4 \ textwidth=79 and au ...
67 views

### How can I quickly replace multiple selections one after another?

To format text in LaTeX you need to surround it with curly brackets, e.g. \emph{} to render it emphasized. I often need to add commands like that to selected text fragments, nothing that could be ...
23 views

### Pressing CTRL-U combination gives invalid arguments for function timer_stop?

I am not precisely able to reproduce the exact conditions under which this occurs, but sometimes, when I press CTRL+u, I get the errors below. I cannot even exit vim with CTRL+c or suspend. I haven't ...
26 views

It seems like running the Goyo command (a distraction free editing plugin) on loading a pandoc document should be really simple, but execute "Goyo" in .config/nvim/ftplugin/pandoc.vim leads the ...
49 views

### Matching 'Capitalized' words in Vim

Hello fellow mouse haters. 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 ...
17 views

### Compiling Vim with python3 showing E370: Could not load library libpython3.7m.a

I have been trying to compile Vim with python3 on my Mac for many hours, as a result, it looks fine now, as the following: VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 9 2018 00:37:54) macOS ...
24 views

### No color in Vim while using Google Cloud Shell

I am using the Google Cloud Shell and wanted to install a theme for Vim. Adding the following to my .vimrc (using vim-plug as a plugin manager): Plug 'mhartington/oceanic-next' syntax enable if (...
24 views

### What does this code snippet mean for Syntastic

I am using a .vimrc file cribbed from Github. I am trying to understand what each line is doing. I have installed Syntastic using Vundle. I have typed :PluginInstall and it has loaded. But it ...
44 views

### Unmapping filetype mappings

I'm trying to unmap some key sequences mapped by python filetype plugin. While I know a better way, I'm still curious if it can be done with autocommands. Here's what I've got so far: augroup ...
30 views

### Prevent colorscheme from changing background color

I've got a sick terminal colorscheme, and i'm using vim-one colorscheme for neovim, what i'd like to do is stop it from changing the background color (since i like my terminals background color more) ...
17 views

### configure VIM with Python support for Debian 9.4 VM Instance

I'm trying to configure VIM with Python support in order to use the You Complete Me pluggin. This question has been asked before. Unfortunately none of the answers have worked for me. Any suggestions ...
14 views

### Vim: a weird background problem in gnome-terminal

I get weird border form gnome-terminal when i run Vim fullscreen. It never happened before. I'm confused. How to repair it without changing my terminal background colour?
35 views

### Get the column that the cursor is on in vimscript

In vimscript, how can I get the column that the cursor is currently on? I would like to save this value in a variable.
30 views

### How to have the echo command process newline characters?

I find that when running :echo message with a message variable that contains newlines, it displays the newline character as ^@. Often I'd prefer it to actually be split on a new line though. Do I ...
12 views

### Modify iskeyword for keyword-local completion only

Context Some time ago, I added the following line to ~/.vim/after/ftplugin/sh.vim to make working with parameter expansions easier: setlocal iskeyword+=\$ This is nice to be able to e.g. yssiw" via ...
36 views

### Share configuration across ftplugin` files without duplicating code

A lot of languages use curly braces {} to enclose code blocks, so it's nice to have a mapping something like: inoremap <buffer> {<CR> {<CR>}<Esc>O I have this mapping in ...
29 views

### How to get w word and b back to treat hyphens and underscores like spaces?

I currently have this in my vimrc set iskeyword+=- But when I press w or b my cursor skips over hyphens. Am I misunderstanding iskeyword? How do I get word and back commands to treat hyphens (and ...
31 views

### Need to run PlugInstall on each open

I have a .gvimrc file created to configure MacVim. I'm using Plug for package management. My .gvimrc looks as follows: call plug#begin() Plug 'tpope/vim-sensible' " sensible defaults Plug 'joshdick/...
18 views

### On the length of tabs after an initial character

Length of tabs after initial char Start gvim with the --clean option, to get a clean slate, and then do: :set noet ts=5 sts=3 sw=2 Then enter the following 1234567890 and on the next line, press ...
32 views

### How to install Vim 8.1 Silently on Windows?

I am trying to install gvim81.exe on multiple computers. The /s switch isn't working and /? doesn't give any results. Does anyone know how to silently install this version?