All Questions

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

Aligning variables and comments in vim

I've looked for this since a long time but I can't seem to find anything relating to this. It could be because of my poor searching skills. Whenever the code starts getting long, its obvious that we ...
  • 11
1 vote
0 answers
6 views

Is there a way to get the coordinates of the character that was clicked from a <LeftMouse> bind?

I'm trying to create a plugin that will, when the user clicks the mouse, switch focus to the window the user clicked in without changing the cursor position in that window. To do this, I intend to ...
0 votes
1 answer
8 views

QuickFix window default postion

It seems that the QuickFix window is created on the bottom of the upmost right vertical split. If I start with two splits: When I open the QuickFix window (:copen) the QuickFix windows is created as ...
2 votes
3 answers
38 views

Regex to delete all leading blank lines

Is there a Vim regex to delete all leading blank lines in the file? text more text some more text Should become: text more text some more text
0 votes
0 answers
9 views

What vim plugin is hijacking my session to give me grep information I don't want?

I'm not sure how better to phrase this question. I have not recently installed anything new—in fact I'm a bit overdue to upgrade my three-year-old Linux Mint install—but in the last couple months I ...
  • 101
0 votes
2 answers
19 views

Remap line completion to Ctrl-X

I am trying to remap the line-completion command (^X^L) to the simpler ^L (or Ctrl-L, or <C-L>). VIM's help (see :h ins-completion) suggests the following : :inoremap ^L ^X^L I tried adding ...
  • 1,665
0 votes
1 answer
16 views

Sort from current column from visual selection

I am trying to write a :sort wrapper that sorts from current column. command! -bang -range=% -nargs=* Sortc exe '<line1>,<line2>sort<bang> <args> /\%' .. virtcol('.') .. 'v/' ...
  • 161
0 votes
1 answer
17 views

How to make % motion work with quotes?

Is it possible to have % motion work with matching quote " or '? For example if we have text: "Lorem ipsum is placeholder text (commonly used in the graphic), 'print, and publishing ...
  • 1,205
1 vote
1 answer
11 views

Regex replace for equal sign in whole file

I'm trying to do a simple replace for all equal signs and subsequent characters until end of line: %s/\=.+\n/\n/. However this gives E866: (NFA regexp) Misplaced =. If I try instead to simply replace ...
  • 111
0 votes
0 answers
15 views

Vim don't recognize python310.dll in Miniconda virtual environment

If I use the following set pythonthreehome=C:\\Users\\myname\\Miniconda3 set pythonthreedll=C:\\Users\\myname\\Miniconda3\\python39.dll I have no problems, but if I set the following set ...
  • 141
1 vote
1 answer
11 views

Change the keys for accepting coc dropdown?

When I type in Vim, I get autocomplete from coc. To accept one of the items on the list I need to press Ctrly. I would like to change this button to Enter but I cannot figure out how to do so. I do ...
  • 147
0 votes
0 answers
24 views

Vim automatically inserts "* " add the start of every new line in css files

If theres a "* " at the start of the previous line Vim automatically inserts a "* " at the start of the next new line. I want Vim to not insert anything. examples: 1|* {margin: 0;} ...
  • 1
1 vote
1 answer
48 views

How can I execute a command after searching with `/`?

After a search command / (i.e., in normal mode) is done, I would like another command to be executed automatically. At the moment the other command should be :normal! zz, in order to center the found ...
0 votes
1 answer
20 views

How can I restore the behavior where h and l stopped at the beginning and end of the line?

After quite some time of using Vim I wanted to switch to NeoVim and set it up with more IDE-like features. So I googled and took the first thing I found (LunarVim/nvim-basic-ide/), thinking I could ...
  • 3
2 votes
1 answer
14 views

Disabling undodir and backupdir for specific paths

My email client creates files in /tmp and my password manager under /dev/shm when editing. The first is just unnecessary to store the undos for longer than the lifetime of the file, the latter is ...
  • 501
0 votes
1 answer
31 views

How to call a command with remapping in neovim?

Say I have a normal mode mapping on key P, for sure it can be executed in command mode: :lua normal! P Now I want to do this in lua, so I tried: vim.cmd('normal! P') and NeoVim executed it as "...
  • 781
1 vote
0 answers
31 views

How can I diff two files from different start positions?

In an editing session I have 2 buffers in 2 windows. I would like to compare a part of file 1 with a part of file 2. The plugin LineDiff would do what I want but because of problems in Kubuntu I have ...
1 vote
1 answer
32 views

Does gvimfullscreen.dll working with gVim 9.0 on Windows?

I used to use gvimfullscreen.dll to toggle a full screen window state on gvim for Windows. It made gvim full screen, not maximised, with no titlebar. I have not used gvim on Windows for some time ...
  • 139
0 votes
0 answers
14 views

Edit history in Neovim

I'd like to edit my command history at ~/.local/share/nvim/shada/main.shada to remove some incorrect commands. I open the file with nvim main.shada, remove the commands in question, and close the file....
1 vote
1 answer
23 views

How can use :grep with range in neovim with ripgrep as external grep program?

I am using ripgrep as external grep program in neovim. Which works when I call :grep 'pattern' in neovim Command Mode. I frequently have to search some strings within a blocked range in long json ...
0 votes
0 answers
32 views

Vim with termguicolors in Windows Terminal outputs wrong color

I'm running vim9 built from source (v9.0.0594) with MSys2/MinGW64 on Windows 11 with the following command. vimd --clean +"set ls=2 tgc" In the old conhost terminal, the colors are output ...
  • 3,401
0 votes
2 answers
48 views

Where is the `o:` variable prefix documented?

I'm aware of :help variable-scope, which describes the following: buffer-variable b: Local to the current buffer. window-variable w: Local to the current window. tabpage-variable t: Local ...
0 votes
0 answers
28 views

Efficiently viewing log files

I have a log file, with each line containing log level {NOT_SET/TRACE,DEBUG,INFO,WARNING,ERROR,CRITICAL}. I would like to have the following functionality: Define custom levels and their priority ...
  • 123
0 votes
0 answers
20 views

The <++> pattern: how to use it properly and why is it compiling? [closed]

Using Latex Vim, the symbol <++> appear automatically when I open and close curly brackets. I have understood that they are a kind of marker to jump from one subpart to the other in the document....
0 votes
0 answers
23 views

Is there any website for sharing vimrc? [closed]

Is there any website where we can send our .vimrc configuration and users can upload their files and we can see and download their files?
2 votes
1 answer
141 views

What do I need in my ~/.vimrc to make neovim act like vim?

I'd like to be able to use Neovim with my usual Vim configuration by running nvim -u ~/.vimrc. However, Neovim seems to introduce a few changes to the default Vim key bindings, such as Y no longer ...
  • 236
1 vote
1 answer
19 views

Snippet lookahead trigger

Using UltiSnips, I'm wondering if it's possible to do some lookahead assertion when detecting the trigger. For example, this works: snippet "dv" "derivative" ir \dv{$1}{$2}$0 ...
  • 23
2 votes
1 answer
37 views

How do the * and + registrers behave in the virtual console?

My Vim is installed with +clipboard support, and all works just fine. I know that the clipboard comes with X, so there isn't such a thing in a virtual console (or, at least, this is what I've ...
  • 1,756
0 votes
2 answers
35 views

How to enable fira code font in vim [closed]

So, I'm using vim on Ubuntu terminal on my windows laptop (I'm not sure if it's Ubuntu, here is the image), I can't find any way to use fira code font. Please help me. Thanks in advance.
  • 1
-2 votes
1 answer
56 views

Pre-Migration Risk Assessment - Vim to Neovim (5of8)

(Shared preamble) With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at Neovim, with possible adaptation as SpaceVim/LunarVim. I am comfortable with Vim, but am looking for a ...
-2 votes
1 answer
47 views

Pre-Migration Risk Assessment - Vim to Neovim (2of8) [duplicate]

(Shared preamble) With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at neovim, with possible adaptation as spacevim/lunarvim. I am very comfortable with Vim, but am looking for a ...
-1 votes
0 answers
45 views

Pre-Migration Risk Assessment - Vim to Neovim (1of8)

(Shared preamble) With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at neovim, with possible adaptation as spacevim/lunarvim. I am very comfortable with Vim, but am looking for a ...
0 votes
0 answers
20 views

How to set the scrolloff for the pop up menu?

setlocal scrolloff=1 changes the scrolloff for the buffer. I want to change the scrolloff for the popup menu when I press <C-N> or <C-P> in INSERT mode. The scrolloff variable has no ...
  • 23
0 votes
1 answer
16 views

How to remap default vim text-object keys to different keys like ' to n

I use ci', va" pretty often, I would like to map text-object keys like " ' to more accessible keys like m, n since writing cin, vam is much easier than ci' va". I tried the following ...
1 vote
2 answers
25 views

What does this output means (in vim) when I do/undo and redo?

Whenever I do undo and redo in vim, I saw this output, the #number changes.. but what is it ? Where to see the #number .. ? Also, I find it hard to know what. I have accidentally changed or undo ...
0 votes
1 answer
26 views

How can I install fzf in vim without using a plugin manager?

I have fzf installed in manjaro (/usr/bin/fzf, /usr/share/fzf), but I can't seems to figure out how to install fzf for vim. I'm having trouble following these instructions: https://github.com/junegunn/...
2 votes
1 answer
38 views

Mappings that work in nvim not working in vim

I have these key mappings that I use a lot in nvim, but they don't work in vim: " Move lines with Alt+Shift+j/k nnoremap <A-S-j> :m .+1<CR>== ...
  • 139
0 votes
1 answer
15 views

Behaviour: ${PWD} when open from Caja vs open from terminal

VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32) Included patches: 1-2269, 3612, 3625, 3669, 3741 Not sure why there is a discrepancy in behaviour. View of start folder: Sequence ...
1 vote
1 answer
30 views

How can I prevent Vim from exiting visual mode?

If I enter visual mode, select some text, then run a command or press a keybinding, it will exit visual mode afterward because it assumes I am done. But sometimes I want to do multiple things with ...
0 votes
0 answers
15 views

On linux some keys from my keyboard do not work (azerty laptop) [closed]

I just installed Ubuntu on a French azerty laptop. I do not have a numeric keypad and a lot of keys are only accessible through combos, like the @ symbol is only usable if i click on alt gr + 0. At ...
  • 1
1 vote
1 answer
43 views

Small issue when running Python code straight from VIM

I want to be able to set up the hot key \\ to be able to write and run python script from VIM without each time having to type in :w :! python3 file.py What I have done so far is pasted the following ...
  • 113
1 vote
0 answers
49 views

Vim only sometimes choosing to copy to system keyboard

I have the following situation. If I open a file in Vim, say by running vim myfile.tex, select something in visual mode, and do "+y, it is in the system clipboard as one would hope. If however I ...
  • 131
4 votes
0 answers
25 views

How are the french spl files produced? Can they be updated?

Is there any information on how the french spl files are produced? I notice there is a sug file that downloads via netrw but this does not seem to be available at: http://ftp.vim.org/vim/runtime/...
  • 187
2 votes
2 answers
102 views

Copy content inside brackets and the word in front of bracket (i.e. a text object for function calls)

Quite often I copy or remove content inside brackets d% or y%. MyAwesomeClass( ///content ) But this way I get: ( ///content ) Is there a way to copy word in front of the bracket too? So that ...
  • 139
0 votes
0 answers
20 views

How to configure Neoformat to use Prettier?

Installed Neoformat with Plug in init.vim for Neovim 0.7.2 on Linux Mint 19.3 I can't figure out how to get Neoformat to work with Prettier. I installed Prettier as a snap package in --devmode, so ...
  • 1
0 votes
0 answers
22 views

When starting neovim with tmux command in split pane, the layout is broken [closed]

I'm new to nvim and tmux. and I tried to start nvim with tmux commands, but the layout of nvim is broken after starting, and then I start nvim manually, the layout will be normal. Here is screencast: ...
7 votes
2 answers
1k views

Abandon Vim and adopt Neovim - hard reasons for not doing so? [closed]

With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at neovim, with possible adaptation as spacevim/lunarvim. I am very comfortable with Vim, but am looking for a proper ide layer ...
0 votes
1 answer
15 views

vim-airline customization: parse substring from current branch name

We're formatting our branch name like feature/HD-1234_tiny_description where "1234" refers to a Jira ticket number. I'd like to only display this number in vim-airline (along with vim-...
  • 103
0 votes
1 answer
22 views

Setting a filetype for piped input

Is it possible to set filetype when starting vim? I would like to get C highlighting when doing something like: $ echo 'int main(){return 0;}' |vi -R - from a shell. I have tried adding --cmd 'set ...
  • 251
1 vote
1 answer
37 views

Trying to get rid of buffers with :%bd fails

I have trouble with buffers in Vim (8.0 on a rhel8 server) apparently. That said ... I was not aware of the exitance of buffers before facing this problem. So as you can see, my expertise in vim is ...
  • 113

15 30 50 per page
1
2 3 4 5
255