# All Questions

7,982 questions
Filter by
Sorted by
Tagged with
8 views

### How to search & replace the word under cursor without changing position

This question is related to Do a forward slash search but don't have vim immediately jump to the string? but is not a dup. I recently updated my Linux box (clicked on the "install updates" button ...
6 views

### Scrolling with trackpad not working Macvim

I have just installed MacVim on my new Macbook. But I encounter a problem, on Linux I was able to scroll through my code - vertically moving my cursor - by using my trackpad. But on Macvim this doesn'...
9 views

### Why does my line indent?

Please see line 20 and 21: My question is about how vim decides to auto-indent line 21, and how to adjust that behaviour. When I took this screenshot I had formatoptions=qrn1a set, however I believe ...
171 views

378 views

### Grabbing values between quotation marks

I want to create a regex that matches strings within single or double quotes in vim and that considers the fact that some strings might have escaped single quotes or double quotes. So far, I've found ...
19 views

### Autocomplete hidden files

This same question has already been posted by a user who asked why this happened with the autocompletion of the :e[dit] command here. However, the accepted answer doesn't fully answer the question ...
16 views

### Showing external command output only if not empty

Is it possible to silently run an external command, but show the output on the prompt only if there was any?
17 views

### How to close file/buffer/tab after cerain time of inactivity?

Is there a way to close file after certain amount of time of user inactivity? Lets say I have a encrypted file and I want to close it after 10 min. Is it possible in Vim?
35 views

I'm aware of vim menu and plugins such as vim-venu and quickmenu, but they need to be manually configured. Is there a way to populate vim menus with all commands available organized in a ...
59 views

### Python Language Server Protocol with virtual environment

Can anyone help me get things like "Go to definition" working with Neovim and Python virtual environments? My setup currently uses a specific virtual environment for Neovim (as recommended by :...
41 views

### How to navigate long lines like separate lines?

When I have a very long line in vim it will be shown on the screen as multiple lines, like this: line no. | content | 100 | this is a very ...
33 views

### After undoing changes, Neovim still requires saving file or ! before exit [closed]

If I open a file, add a line (o), and then delete that line (dd) making the file exactly the same as when it was opened, upon exiting (:q), Neovim states: E37: No write since last change (add ! to ...
54 views

### (coc.nvim) error: Warning: The 'x' rule requires type information

I'm using coc.nvim for react (typescript) development. I have installed following coc plugins. coc-tslint-plugin coc-tsserver coc-prettier tslint integration is enabled for prettier in coc-settings....
26 views

### Repeat/copy a character sequence using commands

I tried the following in my .vimrc using the hints I found here: map <Tab> i4<Space><Esc> map <F2> /79*<CR>79*/<CR>PROGRAM<Space>NAME<Space><Space&...
16k views

### What is the difference between the vim snippets plugins?

There is a great number of snippets plugins for vim: ultisnips, snipmate, xptemplate, neosnippet and a lot more. They all have pros and cons and more or less dependencies. So far I've been using ...
1k views

### How to have forward search using Zathura PDF viewer and LaTeX-Box plugin?

I just started using Zathura to view pdfs while editing tex files. I am trying to have forward searching capability in Zathura. Using the LaTeX-Box plugin in Vim, I have added the following in my ...
28 views

### How to map Ctrl-(? [duplicate]

I am trying to map Ctrl( in insert mode. However, Vim does not recognize the key binding. This is what I currently have: " Insert a pair of brackets using Ctrl-( inoremap <C-(> ()<left> ...
163 views

### Which keys are free / unmapped by default?

Is there a list of keys which aren't mapped by default in vim?
16 views

27 views

### Toggle a setting using shortcut

I have set up Vim to trigger reformatting on save using ALE, but sometimes that doesn't fly very well, and would like to disable it manually. But remembering what the right incantations are is always ...
23 views

### Vim showing a python2 error when writing in python3

Vim shows an error on line 4 of the picture below, which in python 2 is actually an error but not in python 3 which I have check by running it. How do I tell vim I am writing in python 3 to avoid it ...
269 views

### How to display in the statusline the number of matches from a search?

I've seen this question: Is there a way to count the number of occurrences of a word in a file? but most of the time I search using * or just /. It is possible to display automatically in the ...
177 views

### Is it possible to use the :put Ex command using column numbers?

The documentation for :put says that the command accepts a line. That is, it puts the content after the line specified. Is it possible to put the content at a particular mark? For example, say I am ...