# All Questions

11,901 questions
Filter by
Sorted by
Tagged with
392 views

### Vimwiki: Setting up mathjax

I'm trying to set up MathJax to work with vimwiki. According to the manual: using the MathJax server for rendering (needs an internet connection). Add to your HTML template the following line: ...
666 views

### How can I still see underscores with cursorline?

Background and problem I've just discovered how to make the cursor a vertical line in insert mode. This works well with cursorline; even with the thinner cursor, I can still easily find my position. ...
41 views

### How to configure options in :terminal (NeoVim)

I've read the help section for term, terminal, termopen, buftype, and I've read several stack questions, but I haven't been able to find a solution for settings options in terminal mode. I know about ...
41 views

### Change 'lastline' display character (@@@)

You can set display to lastline to see "@@@" at the end of the last line when it doesn't fit the screen. I'd prefer to use a different character for that purpose, such as ... or ---. Is ...
70 views

### Show path of file from where the code autocompletion is coming from

When doing auto completion with CTRL+n, I see autocompletion suggestions from the current file as well as from different other files all mixed together as seen below: I would like to get a behavior ...
50 views

### How do I yank the next 4000 chars, ignoring linebreaks?

I can for example, copy three lines to the clipboard with "+y3j. But I nothing happens when I attempt to yank chars to the clipboard with, say,"+y100l. Ultimately, I want to copy chunks of ...
11 views

### How to get the parent path of a given path?

As title. For example if I have this: foo/bar/baz/bee which is stored in a variable, then which function should I call to get: foo/bar/baz Notice that I will need to store this result back to the ...
17 views

### Vim hiding lines in the script

I facing a strange issue, it might be common but I could not find any solution so asking here. When I'm opening a python file using vim editor, it is auto-hiding many lines in the script. I found that ...
9k views

### Use Vim with virtualenv

I do a lot of Python and I use almost all the time a virtualenv along with virtualenvwrapper to keep my modules organised. But when I want to use those plugin from inside vim, through an external ...
26 views

### Making an autocmd conditional

I have the official black plugin installed in vim. I have in my vimrc: au FileType python autocmd BufWritePre <buffer> Black This works fine, but I would like to be able to disable the ...
11 views

### View diff in patchfile after patch was applied

I have a diff file generated by 'git diff HEAD~2 > alldiff' Is it possible to view diff for any one file using alldiff? Eg somecmd alldiff file1withchanges will use alldiff to show changes in ...
44 views

### How to make cursor move to the top line inserted with 2O?

Using a simple example: h[]ello If I type 2o<esc>, the cursor will be moved to the last inserted line like this: hello [] But if I type 2O<esc>, the cursor will be moved to the last ...
31 views

### Vim execute script on write

Ok i used " :term perl" in vim and it opened a horizontal split window (embedded terminal) with my perl code in the other split window. I like now to execute the perl code by simply saving ...
34 views

### Toggle Vim Terminal with Mapping like VS Code

I am trying to implement toggling of the Vim terminal like VS Code by doing <C-~>. But am not sure how to go about it. I find executing :term to open and to close tedious. I figured having a ...
68 views

### how to autocmd BufWritePost stdout to tidy upon :w?

tldr; How do pass stdout of BufWritePost to an external command? On command line I can run cat index.html | tidy -indent -modify I'm trying to call tidy automatically when I :w This is what I have so ...
2k views

### VIM - How to select multiple lines that are not adjacent?

If you have the following text: line 1 line 2 line 3 You can hit CTRL+v on line 1 and hit j to select line 2. However, I want to select both line 1 and line 3, but not line 2. Or, select multiple ...
3 views

### Neovim qt showing it has crashed after extracting and adding folder location to path

Recently after extracting nvim-win64.zip when I try to run nvim-qt.exe, it shows that it has crashed, when I repeated the process, I get the same error message every time. It would extremely help me ...
120 views

### vim and enhancedcommentify weird behavior for C

I am trying to use EnhancedCommentify plugin for vim and mostly using C. However I can't figure out the issue but when I comment/uncomment it uses (* ---- *) instead of /* ----- */. I tried to change ...
11 views

### how to map <C-,> and <C-.> in neovim

I want to use <C-,> and <C-.> to switch between multiple tables, how to do it? I found that setting it like this doesn't have any effect
344 views

### Write buffer list to file

I would like to have a file that contains all files that I opened with vim in the past. I know that there is the viminfo file but I want to have just a file with the filenames. For this I would like ...
11 views

### Create highlight group that modifies an existing one

I would like to create a new highlighting group that is exactly like an existing one except for one (or more) properties. For example, the new group could be an underlined version of the existing one. ...
13 views

### Help in troubleshooting strange behavior when resuming Vim from background

Latest update I start to think that the problem is not due to Vim in the first place. See this. Previous update I think I've almost tracked it down. The issue seems to be due to either command-t or ...
914 views

### Is there a way to list recent buffer history?

I just started using buffers in Vim and I couldn't figure out how to list recent closed buffers. Is there a simple way (like :ls) to list those? Are they actually stored by Vim? Maybe I'm misusing ...
95 views

### How to get range value of a ex-mode command in Lua?

I want to get the range of ex-mode command in Lua(eg 1 and 3 in 1;3d). The range value should be stored as a:firstline and a:lastline in vim, but based on the doc, a is not implemented in the vim ...
27 views

### Use tilde ~ in substitution inside neovim?

In vim 8.1 (tiny), I can use ~ in a substitution, but it won't work when using neovim 0.6.0. For example, if I have a file with the text: one two three And I enter vim with "vim -u NONE -N",...
11 views

### Live preview with Vim-LaTeX not updating live

I have been using Vim-LaTeX for quite some time now. However, each time I want to see a change, I have to save the document, compile it with \ll, and then preview it with \lv. Today, I decided to ...
32 views

### Go to end of last pasted region

Sometimes ] works, but not after inserting some new text somewhere. How can I jump to the end (and/or start) of the last region of text I pasted with some variant of p? ] does not work here: vim --...
26 views

### Unable to resume backgrounded Neovim-terminal-emulator-process using kill -CONT

So, I'm trying to find an actual solution to another question on here that doesn't really have one. However, I'm running into a problem with backgrounding/foregrounding behaviour. I need to background ...
32 views

### Strange code sequence <80>ýa <80>ý recorded with -w

I was noticing when I exit Insert Mode using ctrl+[, and very quickly press ctrl+w q wanting to quit, every time I will end with ctrl+w dropped for unknown reason and a pending q. I tried starting vim ...
11k views

### How do I navigate to topics in Vim's documentation?

In Vim's built-in help system, how do I… search for topics that I want help on? follow hyperlinks? browse around for related material?
35k views

### How to delete all white spaces until first character?

Is there a simple way to delete all white spaces on a line until the first character on that line is met? An example: #a list of comments # item 1 # item 2 ...
190 views

### Vimtex+YouComplteMe How to disable autocompletion on plain text

I have recently setup vimtex and ycm as the associated autocompleter. These work great in their intended scenario, however I believe the autocompleter is giving suggestions when I am typing plain text ...
17 views

### How to open an existing file in a floating window

For a plugin, I want to open an existing file situated in lua/myPlugin/ in a floating window, so whatever the actual pwd is, this file is always the one to be opened. It sounded easy, but I'm ...
7k views

### What is the order of WinEnter, BufEnter, BufRead, Syntax, FileType events?

I've gone through the autocmd.txt help, but the information about this is scattered and not always present (eg. with BufRead). Could someone who understands this well list the order of these events -...
8 views

### How to include local as highlight group?

I thought thats super duper easy to customize. But it seems it aint. Or at least i dont find the correct file, command or what so ever to archieve this. To put it simply i just want to have the ...
47 views

### If I change the name of my plugin, will it cause issues for existing users?

I've recently released vim-surround-funk, which was inspired by tpope's vim-surround. Originally, I was calling it surround-funk.vim, but I changed the name to be more consistent with vim-surround's ...
22 views

### Temporarily enclose visual mode selection in parenthesis before executing command

I'm using neovim for working with Elixir, with the neoterm plugin which gives me REPL functionality. A well known challenge is that the fact that the terminal evaluates and executes code line by line, ...
1k views

### How to remove entries from v:oldfiles list in neovim

I renamed a big folder that contains a lot of files I recently edited. After changing the name, my neovim's v:oldfiles list contains the old names that is no longer accessible. How can I clean the ...
307 views

### Is it necessary to always add ! to function and command

I can't remember start from when and why, i always add ! to function and command: function! .. ... endfunction command! ... But :h E122 says: When a function by this name already ...
51 views

### Is it possible to use vimdiff's side by side view with a regular diff file?

Given a patch (without having both files, e.g.) git show -c > some_patch.c, is it possible to view this patch in vimdiff with a side-by-side view? Or does this require having both source and ...
29 views

I'm working on a server that has various different python installations set up. At any one time, only one will be accessable and working, depending on what I am working on. Some are python2, some ...
26 views

### How do I paste with newlines on a terminal tab?

I can open a terminal by typing :terminal, however it doesn't paste newlines, so it concantenates everything as a single string. Why does this happen? I am using neovim on windows 10, could this be an ...
1k views

### How to make an autocommand run for closing a window?

There is a (moderately complicated) way to make an autocommand that only runs when windows are created, but I want to have one for when they are removed as well. The reason is that whenever a window ...
30 views

### How to delete everything after the cursor

Say the cursor is []: A very intelligent turtle Found programming [U]NIX a hurdle I want to achieve the same thing as l D in one go: A very intelligent turtle Found programming [U] Is there any ...
23 views

### Delete repeating string in gvim

I have following text file lbist_init_SAfull_pll_updt lbist_init_SAfull_pll_updt lbist_init_SAfull_pll_updt lbist_init_FTMfull_pll_updt lbist_init_FTMfull_pll_updt lbist_init_FTMfull_pll_updt ...
1k views

### Neovim lua config: how to append to listchars?

In a neovim init.lua config, I know that I can append to a string like so: vim.opt.wildignore:append("*/node_modules/*,*/vendor/*,*/venv/*,*/.venv/*,*/target/*") However, I'm getting errors ...
13 views

### Remapping Keys in Insert Mode Completion ( Autocomplete / ^X )

Using: NeoVim I would like to remap j/k in Insert completion mode: tab starts autocompletion (done, used :help ins-complete example) j/k navigate results like <C-n>/<C-p> If I understand ...
12 views

### Automatic removal of indent in markdown (fenced) codeblock comments starting with #

When writing indented fenced codeblocks (the only ones I use) like sh some shell code ` in markdown the indentation of comments is automatically removed when I type the comment ...