All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
653 views

Prevent neovim from overwriting system clipboard while cutting, copying or deleting text

As the title says, I want to disable neovim from overwriting existing content of my clipboard. I am using elementary os 7 horus and nvim v0.10.0-dev-115+g240c41e1a downloaded from github release page. ...
Abid Hasan's user avatar
0 votes
0 answers
303 views

Neovim - Run an external command in nvterm, reload the current file once completed

What I am trying to do in Neovim is to open an Nvterm window, send a command (sleep in the example below) to it, wait until it finishes and the window is closed. Then reload the current buffer. Where ...
user134068's user avatar
0 votes
0 answers
126 views

Why does nvimtree keep changing to the wrong directory?

I have a project with the following structure. It's a monorepo based react project. It opens fine in the beginning. But as soon as I open any file e.g. apps/editor/pages/index.js. The NVIMTree ...
Vipul Rajan's user avatar
0 votes
1 answer
53 views

How to properly create keymaps for portuguese abnt2?

We have many language keyboard input here /usr/share/vim/vim90/keymap/ I use a Portuguese-br abnt2 keyboard layout on my KDE system, it works fine on Konsole, I can change the system input method. But ...
Wesley Pimentel's user avatar
0 votes
2 answers
309 views

How can I write a custom formatexpr to specify the point at which 'gq' wraps?

I don't want VIM to automatically wrap text, so setting textwidth is not a solution to this problem. This comment gives a useful outline, but I'm not really sure how to go about doing this. My first ...
AmagicalFishy's user avatar
0 votes
1 answer
550 views

How can I make NeoVim's clipboard work on my linux servers (like nano)?

I cannot get NeoVim to work like nano does out of the box with regards to clipboard copy/paste. Here is exactly what I am trying to do: I use either a linux laptop (Linux Mint) or a Chromebook ...
Andre Normandin's user avatar
0 votes
0 answers
15 views

Help me remove feature in NVim [duplicate]

I've just used NVim lately and install some plugins Plugin List And every function have some params name behind it . Anyone know where this comes from and how to remove it ? Thanks!
Max's user avatar
  • 1
0 votes
2 answers
84 views

How to re-open the same window with the same buffer therein?

Consider the following snippet: vim9script # Set stuff in the newly created window var my_win_nr = winnr('$') var my_win_id = win_getid(my_win_nr) win_execute(my_win_id, 'wincmd L') win_execute(...
Barzi2001's user avatar
  • 550
0 votes
0 answers
342 views

Error detected while processing function <SNR>68_NetrwOpenFile when creating a new file with %

I get this error when I try to create a new file in netrw. It looks like its coming from netrw but I also get a similar error when I go up the directory tree with vim-vinegar Error detected while ...
Vinn's user avatar
  • 771
0 votes
0 answers
96 views

How to find all the lines that match a literal string?

How to find all the lines that match exactly a given string, literally? For literally, I mean that if the string has special characters used in regex, like *, ?, etc., then they shall be consider as-...
Barzi2001's user avatar
  • 550
0 votes
1 answer
553 views

When I use nvim, blank display only red. How to solve this problem?

Nvim breaks the color of white space. I did it with vim.opt.termguicolors = true in nvim init.lua. But the colors don't look right in my old oh-my-zsh. The weird thing is that if I run nvim in a shell ...
주경진's user avatar
0 votes
1 answer
105 views

Vimwiki bullet point wrapping creates a new line

When I use vimwiki and I write past the text width, the bullet point will wrap. This is what I expect. However, the wrap will be a new line: 1. something to say ..... a second line wrapped after ...
Vinn's user avatar
  • 771
0 votes
1 answer
76 views

Navigate between (form feed) sections

Background: Vim :help states that a section begins after a form-feed (^L) in the first column [*]. In normal mode ]] or [[ can be used to navigate to the next or previous section (respectively). ...
NaiveQuestion's user avatar
0 votes
1 answer
2k views

LazyVim: require('which-key') inside custom configuration files gives error

I use Neovim with LazyVim configuration setup. I want to set the mappings in which-key. So I put the following code inside ~/.config/nvim/lua/config/which-key.lua: local wk = require("which-key&...
Mert Nuhoglu's user avatar
0 votes
0 answers
568 views

NeoVim0.9 installation cannot execute binary file: Exec format error

I was upgrading my very old NeoVim version 0.4 to 0.8 by following the docs on Github. After downloading the nvim appimage, making it executable, and extracting it using ./nvim.appimage, I try to run ....
Squiggles's user avatar
0 votes
1 answer
43 views

Vim doesn't display my echo if it's 2 characters

On Vim 9 linux running this code: inoremap <C-n> <C-o>:echo "aa"<CR> doesn't display anything whereas: inoremap <C-n> <C-o>:echo "aaaa"<CR> ...
Hamster's user avatar
0 votes
0 answers
46 views

What's controlling Vim paste behaviour?

What's controlling Vim paste behaviour via Vim over ssh using putty with right-click paste set to Linux host? To start we have: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Mar 27 2023 00:00:00) ...
chipfall's user avatar
  • 103
0 votes
0 answers
543 views

I get several deprecation warnings printed, how to disable them?

I see this when I open first file in nvim. I have not much to do with these (those are plugins that I didn't write). How can I disable them being printed to console? sumneko_lua is deprecated, use ...
eyal karni's user avatar
  • 1,106
0 votes
2 answers
256 views

Vim to Neovim switch Airline Nerd Font not recognised

I am using Vim with airline for many years. Today I decided to test NeoVim. While in Vim the airline with my Nerd Font works great, in NeoVim it seems to ignore the Nerd Font. NeoVim doesn't display ...
baxbear's user avatar
  • 314
0 votes
0 answers
20 views

Shortcut keys sometimes type commands into the buffer for the file I am editing

I'm using gvim with the included mswin.vim keybindings, so Ctrl+S AKA C-S will save the buffer. It provides these mappings. " Use CTRL-S for saving, also in Insert mode (<C-O> doesn't work ...
interfect's user avatar
  • 163
0 votes
1 answer
28 views

Manually indenting lines with tabs

Lines can be indented with tab characters. And it is quite obvious the there are better ways to do that than manually adding a tab character to the beginning of each line. But how to discover these ...
Volker Siegel's user avatar
0 votes
1 answer
46 views

Why doesn't my cmdwin remapping work?

I'm trying to unmap the normal mode open cmdline-window bindings: nnoremap q: <NOP> nnoremap q? <NOP> nnoremap q/ <NOP> Do not have any effect, even though :verbose map q: shows it'...
minseong's user avatar
  • 2,323
0 votes
1 answer
2k views

How to run current python file in floating terminal? Using neovim and NvChad

FYI noob here. I want to run current file in floating terminal. I'm using NvChad and when I execute ALT+i I get the following: I already played with some key binds, but I haven't achieved what I need....
indochina's user avatar
0 votes
1 answer
682 views

Why does :!python3 differ from g:python3_host_prog?

I am using Ubuntu 22 and the default (OS) Python version is 3.10.6. I don't need this python version; rather I need 3.8.16. I've installed it and set the g:python3_host_prog to its path to use it when ...
TOK's user avatar
  • 1
0 votes
2 answers
133 views

How to open files from terminal in desired pattern (tabs, vertical and horizontal splits on desired files)

So, I wrote next bash script: #!/bin/bash if [ "$#" -gt 1 ]; then path=$1 else path=$(cat subject.txt | tr -d '\n') fi nvim -p 1 "setup/$path/body.tex" -p 1 preamble/...
Vladyslav Rehan's user avatar
0 votes
0 answers
46 views

How to highlight all the columns of a window?

Consider the following snippet: vim9script var winid = win_getid() var winwidth = winwidth(winid) var range = [] for lnum in range(10, 20) add(range, [lnum, 0, winwidth(winid)]) endfor var m = ...
Barzi2001's user avatar
  • 550
0 votes
0 answers
69 views

Plugin function scope issue

I have recently discovered this guide that was very eye opener under many aspects. So I decided to do things "by the book" by moving my plugins in ~/.vim/pack/bundle/start/myplugin/plugin/...
Barzi2001's user avatar
  • 550
0 votes
0 answers
51 views

Neovim does not self-report minor/patch version when built on Linux

I use two different methods to install and update neovim to the latest version (something that I do regularly these days): it depends on the operating system macOS: brew upgrade neovim --fetch-HEAD. ...
Steven Lu's user avatar
  • 2,251
0 votes
2 answers
88 views

How can I define a buffer-local variable in a FileType autocommand using vim9script?

I am trying to define a buffer variable based on the FileType as it follows: vim9script def g:MyComment(comment_symbol: string) # Do something enddef augroup commenting_blocks_of_code ...
Barzi2001's user avatar
  • 550
0 votes
1 answer
164 views

How to set the mode from a vimscript?

If I save the result of :call mode() in a variable, how can I restore that mode later?
minseong's user avatar
  • 2,323
0 votes
1 answer
83 views

coc-pyright is using buffers irresponsibly

I've been noticing that my buffer number increases really fast without me even using them. I rely on buffers quite a lot to switch between files, and it's really annoying when I open a second file and ...
jmbeck's user avatar
  • 101
0 votes
1 answer
30 views

Toggle NERDTree in seperate window

I want to toggle vim in a whole new window and as I searched, I can open vim in new window using: :NERDTree | only So I set this in my vimrc: nnoremap <C-n> :NERDTreeToggle <bar> only<...
Reyomi's user avatar
  • 3
0 votes
3 answers
256 views

How to replace hex encoded string with chars?

I have UTF-8 encoded HTML with id(s) and href(s) encoded as hex values like %D0%B0%D0%B1 or .D0.B0.D0.B1. Can I convert such strings into readable form using Vim?
hobo-mts's user avatar
  • 123
0 votes
1 answer
41 views

Vim custom command to execute 'c""<Esc>P'

I am trying to write a custom command that executes the following: 'c""<Esc>P', namely cut visually selected text, insert ""and paste the cut text into the quotes. I have ...
hilbor's user avatar
  • 15
0 votes
1 answer
328 views

Focus-follows-mouse in Neovim?

Is it possible to get focus-follows-mouse behavior in terminal Neovim? Please note this is different from this question about how to focus a window by clicking the mouse. This question is about how to ...
Alex Burka's user avatar
0 votes
0 answers
25 views

":bufdo cd ~/Some/Folder/Path" doesn't affect all files

I have about 15 files in my buffer list [1]. In my one and only tab, I have three modifiable subwindows, none of which have unsaved changes. I issue :bufdo cd ~/Some/Folder/Path, and Vim lists each ...
user2153235's user avatar
0 votes
1 answer
662 views

How to get list of highlight groups for a region under cursor? (problem with synIDtrans function)

My purpose is to get information which would explain why the region under cursor has that particular color. Yes, there are several very similar questions, but still my question is different. I can get ...
lesnik's user avatar
  • 471
0 votes
0 answers
51 views

Creating a local vimrc for a large LaTeX project with selective plugins, settings, and mappings

This is related to my previous question that you can find here: I am currently working on a large project (a PhD thesis with multiple chapters, each consisting of around 30 pages) and have found that ...
Mafsi's user avatar
  • 225
0 votes
0 answers
111 views

Link cwd of vim with parent shell

Is it possible to link the cwd of vim to the cwd of the shell running it, or change the cwd of the parent shell within vim? I run neovim+tmux with the tmux-resurrect plugin, and it would be nice if I ...
Jaeshi's user avatar
  • 1
0 votes
0 answers
205 views

Vim vertical split window not rendered correctly

Not sure if it's related to vim configuration, tmux settings or ssh config, I opened a file with vim on a remote server, and every time when I use :vsp command to split a vertical window, the right ...
kuixiong's user avatar
  • 101
0 votes
0 answers
1k views

How do I organize imports with `tsserver` using Neovim LSP?

I'm using Neovim 0.9 and lsp-zero to edit Typescript files. tsserver has an organize imports feature. How do I map that back through LSP to a user-defined key? Basically, I'd like to add a new ...
Sasgorilla's user avatar
0 votes
2 answers
502 views

How to remove the default colorschemes from Vim/Neovim?

The only other answer I found is from 2012, it is not accurate anymore and it is on Stack Overflow. I would like to see them gone. I don't like any of them and they are clutter. So, how does one ...
cassepipe's user avatar
  • 385
0 votes
0 answers
94 views

Dynamic load plugin when using Neovim?

I want to dynamically load the local plugins when using Neovim. For example, there are some directories ~/plugin1 and ~/plugin2 (they're colorscheme plugins). When using Neovim, I try to add ~/plugin1 ...
linrongbin's user avatar
0 votes
1 answer
20 views

How can add the comment lines when call function?

I want to add shebang when creating anew python file. .vimrc: autocmd BufNewFile *.py exec ":call SetTitle_py(0)" func SetTitle_py(line_num) let boilerplate = [ \"#!/usr/bin/...
showkey's user avatar
  • 1,130
0 votes
1 answer
124 views

How to make the 81st column stand out in Lua?

Like this for Vim, I'm trying to convert (with no success): matchadd('ColorColumn', '\%81v\s*\zs\S', 100) from vimscript to a Lua autocmd: autocmd({'BufRead'}, { pattern = "*", ...
Joannes's user avatar
  • 237
0 votes
0 answers
127 views

How do I pass multiple optional arguments from custom command to function?

Given a function with two optional arguments fun s:foo(one = v:false, two = v:false) echom '<' . a:one . ',' . a:two . '>' endf and a custom command calling it command! -nargs=* Foo call s:...
Enlico's user avatar
  • 2,194
0 votes
0 answers
323 views

How come `pip install cmake` is not enough to build neovim?

I just built neovim from source for the first time on linux (Pop!_OS 22.04 LTS x86_64), and I got stuck for a while on something silly. In the Build prerequisites I saw that CMake was (of course) ...
bluthej's user avatar
0 votes
0 answers
618 views

nvim-treesitter not working; throws error E5113

I just installed nvim-treesitter and it throws me this error message when starting nvim: Error detected while processing /home/MYUSERNAME/.local/share/nvim/plugged/nvim-treesitter/plugin/nvim-...
user avatar
0 votes
0 answers
22 views

How to tell Vim buffers to correctly follow the size of the terminal window?

It didn't behave like that in the past, but since a few months when a terminal window is resized, buffers are resized in a pretty weird manner. The cursor can even locate itself outside of the ...
AVALFINN's user avatar
0 votes
3 answers
55 views

Strange result for grouping replace in a line

The file contains only one line: four_blank_space + "TE:" + one blank space + "trailers" + one blank space I write a grouping replace: :1s/\(\s\+\)\(.\+\):\s\+\(.\{-}\)\(\s\{0,}\)...
showkey's user avatar
  • 1,130

15 30 50 per page
1
267 268
269
270 271
290