All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
6 views

Help understanding this :global command

I have this command to prune :verb map down to only my plugin mappings: g!^\~/vimfiles/plugin/^-1d _ It also needs :$d to remove last line that has verbose comment "Last set [...]". Can ...
1 vote
2 answers
33 views

How do I stop Vim from pasting my code as a comment?

Suppose I copy some code from a place and try to paste it into Vim, it comes as a comment. Is there any way to fix this? Example: --Return the smaller thing p ::forall a. (Eq a)=> [a]-> a->...
0 votes
1 answer
16 views

Using Alt instead of Ctrl for vim-tmux-navigator

I recently configured vim-tmux-navigator and I'm enjoying it. However, the binding of ctrl-K overrides the kill to end of line command in the terminal and I use this a lot. As such, I want to bind ...
1 vote
2 answers
45 views

In gVim 9.1 how to have different backgrounds for text and the empty area to the right of <EOL>, with hlsearch ans syntax highlight still working?

I would like to use two different backgrounds colors bg1 and bg2 with: bg1 for all text on a line (possibly nothing if line is empty) up to the end-of-line, bg2 for the empty area after the end-of-...
1 vote
1 answer
44 views

Highlight link description in vimwiki

I'm trying to customize the colorscheme One for Markdown under Vimwiki. I'd like to change the color of the Description in [Description](URL). In my .vimrc I have the following relevant lines: call ...
34 votes
4 answers
79k views

Remap Esc key in Vim

Is it possible to remap the Esc key to another key in Vim? When I'm using Vim in a full screen VMware vSphere web client console window and I press the Esc key to exit edit mode, it also takes me out ...
5 votes
1 answer
282 views

How can I decide whether a file can be opened in Vim or not?

I want to make a script with FZF (Fuzzy Finder) and I want to show only those file which can be opened with Vim. So, I don't want to list mp4, jpg, pdf etc files in FZF. So, is there any way to decide ...
0 votes
1 answer
837 views

VimWiki - How to create a link to a code file, and open that file with vim

I am new to VimWiki. I am currently taking my class notes with VimWiki, and love the organization it provides.However I want to link my SQL & c code from class to one of my classes index's, but ...
0 votes
1 answer
688 views

Error when configuring lspconfig with mason

I'm trying to set up autocompletion, fixing, etc. for lua files in Neovim. I started by trying to follow the instructions from this video: https://www.youtube.com/watch?v=lpQMeFph1RE&t=188s ...
0 votes
1 answer
62 views

How to edit WebAssembly Text Format (`.wast`/`.wat`) files using NeoVim?

The latest version of VIM includes some basic support for .wat files (although it doesn't highlight the global directives directly), but the latest version of NeoVim doesn't. In NeoVim, I can set the ...
1 vote
2 answers
52 views

How to display line number for visually wrapped lines?

I need to find a method to manage long lines in Vim that span multiple display lines as separate entities for navigation purposes. To elaborate, I use Vim with the 'relative numbers' feature, which ...
2 votes
2 answers
726 views

vim-fugitive: Netrw not found. Define your own :Browse to use :GBrowse

:GBrowse is giving Netrw not found. Define your own :Browse to use :GBrowse since netrw is disabled by telescope.nvim. I tried to define :Browse like this: :command! -nargs=1 Browse !open <args>...
0 votes
2 answers
43 views

Can I copy options (everything shown when I run `:set` with no arguments) between active windows

I have two windows opened in the same terminal. These are actual vim windows within the same vim instance. The first window is a .py file which has many options set by default, plus additional options ...
3 votes
1 answer
700 views

VSCode Vim -- don't want escape to enter normal mode if I'm exiting tooltip or Intellisense [closed]

I'm new to VIM and I'm loving it. I'm learning slowly but surely. I've passed the point where there's enough benefit and not too much hassle. I'm using the VS code integration. I'm learning VIM (...
0 votes
1 answer
48 views

MacVim: <Delete> key does not work in a terminal window

I happened to find that we may open 'Terminal windows' in Vim and am happy to stop using terminal app. (It's available in v8 and v9) However, when I have a typing mistake, pressing Delete key does not ...
3 votes
4 answers
435 views

Convenient way to surround block with markdown codeblock backticks

Is there a convenient way to surround a code block or a range of lines with markdown backticks? That amounts to doing a surround op to insert multiple chars. Ie. turn: line 1 line 2 Into: ``` line 1 ...
0 votes
1 answer
19 views

Proper way to execute "g<Tab>" to switch to a previous tabpage from neovim

This works, but it's pretty ugly, just wondering if there's a better way: vim.cmd[[exec "g\<Tab>"]] None of these work: vim.cmd.normal("g<Tab>") vim.cmd.normal("g\...
1 vote
6 answers
2k views

How to copy multiple lines and paste multiple times under each line separately?

original below. I want to copy each line and paste multiple n times under their own lines separately. USD XYZ ABC YUT LMO . . . upto so on want them to become like this. Any way how can I achieve ...
2 votes
1 answer
475 views

Cannot open terminal ini nvim

I installed Plugin terminal using the vim-terminal plugin and try to execute :TerminalSplit bash but before the terminal open I got a warning message. Python 2 interface is not installed, using Python ...
0 votes
1 answer
932 views

How to make a http (https) request with a lua plugin?

does anyone know if it is possible to install a Lua HTTPS library that I can access from a Lua plugin in Neovim to make HTTPS requests (POST)? And how would I install such a library? For example, to ...
0 votes
2 answers
486 views

LaTex-vim cannot compile files with spaces in name

I followed the same procedure as in the answer to this question to download and install latex-vim. But when I compile a tex file, I get the following error message: || I can't find file `Rapport'. ...
6 votes
1 answer
1k views

Why can't I type certain non-ASCII letters?

I recently had a need to type the letters æ, ø, and å. For context, these are available on my physical keyboard, and work fine in other programs. It's also a Norwegian keyboard (+ layout), if that's ...
10 votes
2 answers
2k views

What is fileencoding of .vimrc?

I've upgraded vim and now it's unhappy about some UTF-8 values in my .vimrc. This lead me to the question -- when vim reads .vimrc, what encoding does it assume the file has? I.e. what's fileencoding ...
0 votes
1 answer
25 views

Is there a plugin that provides a new text element that works on single AND double quotes?

I have a common task which is refactoring typescript import statements. However sometimes the quotes used for the dependency path are single quotes and sometimes double quotes. this means when i go ...
0 votes
0 answers
13 views

Pyright LSP, leading spaces appears as "&nbsp;" in hover

I am using pyright LSP with the neovim (0.10.0-dev), and am seeing any leading spaces in docstrings replaced by &nbsp;. For example, see the attached image: As far as I can tell it seems very ...
2 votes
3 answers
72 views

Remove blank lines at end of file

How can I augment/modify my trailing whitespace logic to also remove any empty or all whitespace lines at the end of a file? My current whitespace stripping logic in my .vimrc is: "remove ...
2 votes
2 answers
117 views

Do we need to escape backslash in character in Vimscript?

As title, specifically, is it correct that one of the backslashes in the following regex is redundant in vimscript: syntax match MyGroup "[a-zA-Z0-9_:\\]" I tried to ask Copilot but while ...
1 vote
1 answer
48 views

Colorizing log buffer with ANSI color codes

I have an issue with a log output in a buffer, that i get from Flutter / Dart via akinsho/flutter-tools.nvim. The log contains some ANSI color codes, see below. I believe the actual color code is the [...
0 votes
0 answers
10 views

Is there a Neovim plugin that can parse a .vscode directory and set up the LSP client accordingly?

I cloned a project off GitHub recently which comes with a VSCode configuration for telling clangd where all the headers are, providing run configurations etc. Is there an existing plugin I can ...
41 votes
5 answers
54k views

Fully disable mouse in console Vim

I saw completely disable mouse in console Vim on Stack Overflow. It sounded like exactly what I wanted, but there the problem was related to Cygwin, so the title was a misnomer. I want to know how to ...
0 votes
0 answers
27 views

How do I make use of LSP Code Action extensions?

I've been using neovim and lspconfig for quite some time. Today I noticed that some LSP servers have some sort of extensions, like extract variables and add constructor to the class, which lspconfig ...
5 votes
1 answer
141 views

How to disable mouse scroll wheel when in normal mode?

I want to completely disable the mouse but mouse scrolling in normal mode is not disabled. I have disabled other mouse function but scrolling in normal mode is still on. To disable the mouse I have ...
2 votes
1 answer
552 views

Neovim lsp configuration

I'm a beginner in Vim/Neovim world. I understand that LSP is for autocompletion, auto import, signature info, etc... So I have installed coc.nvim. But I have some question about the concept : if I ...
10 votes
3 answers
1k views

Syntax highlighting for shell scripts broken

Since recently my syntax highlighting for ft=sh (also syn=sh is set) is broken: Why is that? How can I fix it? Edit: I'm using Vim 9.0 with patches 1-1302. I add here the code from the screenshot. ...
0 votes
1 answer
213 views

In Lua, how can I check if a buffer exists on disk?

I use Neotree on Neovim, and have mapped a key to open the file browser which is supposed to: open the file browser pointing to the current file if there is no filename, open the file browser at the ...
0 votes
0 answers
36 views

E919: Directory not found in 'packpath': "pack/*/opt/Termdebug" on WSL (Ubuntu) [closed]

I have packadd Termdebug in my .vimrc, but when I open Vim I get: E919: Directory not found in 'packpath': "pack/*/opt/Termdebug" The output of set packpath? is the following: packpath=~/....
1 vote
1 answer
25 views

Android Vim (DroidVim?) keyboard with swipe functionality

I am wondering what it would take to build an Android keyboard that mimicked Vim, with swipe (swype?) functionality (such as the one Google's Gboard uses to allow users to write on Android). This ...
3 votes
1 answer
182 views

Is it possible to read a shell command's output from nvi's command line?

I was trying see if I can integrate fzf with nvi, but couldn't find a way to do something like :Edit <shell command's output> which would solve my problem. I tried :source nvi.ex -- it works ...
1 vote
1 answer
461 views

How to autocomplete from dictionary while typing?

I've set a dictionary with the command: set dictionary+=~/Dictionary.txt And add the following command to make more quickly to access it: set complete+=k But I still have to press <CTRL-N> to ...
1 vote
4 answers
2k views

How can I view a list of all of the features that can be checked for using `has()` in Vim?

How can I view a list of all of the features that can be checked for using has() in Vim? I recently came to know the has() function for testing the presence of "features" (see below). :h ...
1 vote
1 answer
770 views

<Tab> out of insert mode - lua keymap

I'm a relatively new neovim user. I use nvim-autopairs to always induce matching (, [, {, ', " character pairs, and automatically placing my cursor inside them. As an example, in insert mode, if ...
0 votes
0 answers
18 views

Error E5113 while installing dashboard with vim Plug

I'm new to vim and nvim and right now I'm trying to set everything up. I'm using vimplug to install Plugins. While installing Dashboard I got the following error message: Error detected while ...
1 vote
1 answer
83 views

Disable colorcolumn on BufLeave

I would like to disable the colorcolumn in a buffer when switching to a different buffer. I try to perform this with a autocommand using the BufLeave Event. In Neovim I use the following local ...
1 vote
3 answers
260 views

Order of sourcing scripts

I've recently been organizing my vimrc and putting mappings into vimfiles/plugin and vimfiles/ftplugin files (not to mention abbs, functions and commands). However, these scripts are sourced before ...
1 vote
1 answer
181 views

Can't figure out where this mapping comes from

For more than a year, I have unmap <C-X> in my .vimrc because I can't figure out where this mapping comes from. I used verbose map <C-X> as suggested in another topic, it returns v &...
0 votes
1 answer
906 views

Neovim fail to open file via scp - Undefined variable: b:netrw_method

I am opening a remote file with this command: [n]vim scp://user@host/relative_file Vim (8.2) opens the file correctly, but Neovim (v0.5.0-dev+1186-g8665a96b9) just shows a blank file and a blank ...
0 votes
1 answer
605 views

Gbrowse not opening the browser

I've been using Vim Fugitive plugin for some time now. Recently, I tried the Vim rhubarb plugin. So for a github-repo it should work out of the box but `:GBrowse doesn't open the browser at all. ...
1 vote
3 answers
180 views

Exclude empty lines when copying

I'm writing Python programs using Vim/NeoVim. One thing I often do is copying text to the system clipboard using "+y command. This lets me copy parts of the program to the clipboard, and run it ...
4 votes
1 answer
342 views

How to set the background color for colored items in the statusline to the background color of the statusline?

I am experimenting with creating a statusline and have opted for coloring different parts of it. The problem is that while the item's foreground color is changed, the background is black and doensn't ...
0 votes
0 answers
25 views

Keymaps get reset upon switching focused window back to Neovim instance

Lately I've been running into a strange issue where, upon switching focus in and out of Neovim to other windows, some of my keymaps will not be set properly upon re-focusing and instead use the ...

15 30 50 per page
1
2 3 4 5
288