# All Questions

7,385 questions
Filter by
Sorted by
Tagged with
44 views

48 views

### Repeat last normal command

Well, there is ; to repeat the last move in some cases. There is the . to repeat last change. But if I just did za or @a, is there a way to repeat it? I guess such a mechanism should ignore plain ...
26 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 ...
53 views

### CVE-2019-12735 question

Does anyone know if the Windows versions (pre 8.1.1365) of VIM (https://www.vim.org/download.php#pc) are vulnerable, per CVE-2019-12735? Everything I have read always mentions LINUX, and many LINUX ...
41 views

### Next tab completion item

I was seeing how the different default colorschemes look like in vim. To do that I typed :colo, then space and tab. But then when I want to set the next one, I have to press tab a lot of times to get ...
31 views

### Lexplore and split windows

Like many, I like to browse using :Lexplore. However, as indicated by the manual, By default, :Lexplore will change an uninitialized |g:netrw_chgwin| ...
16 views

### Remap delete key on mac osx to 'insert then backspace'

I'm using an intellij editor (Rider/Clion) with the vim plugin on mac osx and am attempting to intelligently select words in my editor, which I accomplish via an 'extend selection'/'shrink selection' ...
29 views

### Is it possible to run a script on a register content and send its output to another register on Vim?

Let's consider that I have the following bash script called time.bash: #!/bin/bash date -d @$1 This script converts the epoch timestamp to its corresponding date as the following:$ ./time.bash ...
38 views

### Are the contents of highlighted content saved to a register [closed]

Let me briefly explain what I am trying to do. I work on an air gap network. Anything not native to Red hat, or that I do not write is out of the question. The most popular two IDE's are VIM/GVIM ...
34 views

### Line mode command to delete from column X to end of line?

Using gvim on a file with 30K lines, I want to use ex mode to delete from column 130 to end of line, making each record no longer than 130 characters. I want to do this for the entire file. My macro ...
10 views

### How to resize default NerdTree width? [duplicate]

I don't know what changed recently but my NerdTree keeps opening up super wide and pushing my existing window to the right. Here's a picture: Before opening NerdTree: After: I tried adding this ...
69 views

### Alarm for inactivity

I want to know if there is a way to setup vim (internal feature, plugin) in such a way that it would raise an alarm (bell, flashing screen, anything) if there were NO changes to the find within a ...
14 views

### Is there an edefault in the spirit of gdefault for setting the appropriate flags in vim's substitution commands?

To perform a buffer-wide substitution on all occurrences of foo (and not just the 1st one in a line), we can do %s/foo/bar/g The g flag may be omitted by setting this in the vimrc as set ...
40 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. ...
145 views

### Does NeoVim really need plugins in 2019?

I've been using Vim with vim-plug, yiang-miao/auto-pairs and youcompleteme for a time now, and I really love it; but a friend recently recommended me NeoVim, and it seems it's more polished since it's ...
32 views

### Delete word around cursor and move to insert mode

My Problem Going from: To: I'm doing some editing (interactive rebase on a git repo, but the problem is generally relevant). The cursor is on a word (pick), and I would like to delete it , ...
27 views

### How to use setqflist to add an entry to the quickfix list

I'd like to be able to define my own functions that add certain kinds of line to the quickfix list, or set it to those in its entirety, without having to go via the filesystem with a made-up errorfile ...
31 views

### Go to next quickfix entry, removing current?

I frequently find myself going through the quick fix list, making my quick fix, with :cn and then quitting :q when I've finished ... and then :q again to also close the quickfix list. Is there a way ...
17 views

### How to get the right indentation and new line when adding a new line between brackets? [duplicate]

So I am curious about one thing: when I am between two brackets ({) in vim (or nvim), and I press Enter I go from this (where the pipe sign is the cursor): getUsers(){|} to this: getUsers(){ |} ...
66 views

### Simple .vimrc takes a very long time to save

Saving a file with :w takes several seconds for me, and I can't figure out the culprit. This is my .vimrc " Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using ...
32 views

### Is there a way to enter ex mode for a single command directly from insert mode?

I'd like to go directly into ex mode from insert mode, enter a single command (say :r !date which inserts the date) and then go immediately back into insert mode. Basically something similar to the ...
35 views

### How to disable margin (+/!)?

Currently I installed vim addons for python. http://fisadev.github.io/fisa-vim-config/ However, I don't like the +/-/! on the margin. Does anyone know how to disable all of them? Thanks,
31 views

### How to start insert-mode completion from select mode using Vimscript?

I have some text selected in select mode. I want to delete it and start insert-mode completion. When I type these keystrokes into Vim it works perfectly: gvc<C-X><C-U> gv switches to ...
22 views

### Spell Check Not Working Using Vimtex?

What is the correct way to have spell check for Latex files using the vimtex plugin? Spell check works for other filetypes but doesn't seem to work for .tex file extensions. I have read about using "...
23 views

my question is simillar to this: How do I surround a quoted string without including leading whitespace? But not exactly. I am using vim-surround. I have a string print he^llo_and_welcome where ...
26 views

for my fortran code, I have defined: au FileType fortran let maplocalleader = "" # i have tried \ as well. For fortran filetype in vim, :echo maplocalleader is showing  as expected. But, then,...
57 views

### How does vim decide if a file is “readonly”?

For testing purposes I set the setuid to my vim binary. Now when I open for example /etc/passwd, modify the file and execute :w, then I get the E45: 'readonly' option is set (add ! to override) error ...
188 views

### What's the functional difference between the key notations “\<xxx>” and '<xxx>'?

I stumbled recently upon a mapping in the Vim Tips Wiki that uses an expr-quote: nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR> and realized it still worked ...
39 views

### how to have a new line from within brackets

I normally write my functions this way public void test() {} to continue, I need to insert a new line from within the brackets, so the final output is this: public void test(){ // cursor is ...
35 views

### Change saved session's working directory

I have a neovim session saved using :mks which by default saves to a subdirectory in my project ~/project/subdir/Session.vim. I want it to save to ~/project/Session.vim, which I can do by running :cd ...
20 views

### Problems installing Vundle in fresh install of Vim

I, I'm trying to to install vim to use as a Python IDE on arch. I was using this tutorial to do it, but ran into some troubles. When I tried to open vim I got the following error messages: https://...
72 views

### enter inside curly braces does not indent

When I create a curly braces and press enter inside it I get this behavious {|} -> enter key { |} Now how do I get vim to do this {|} -> enter key { | } my vimrc brief filetype plugin ...
59 views

### How to indent or unindent lines in a block of text?

I use two spaces in my indentation of codes. What are the possible ways to indent or unindent a block of code?
39 views

### custom snippet extender Ultisnips

Suppose I have a snippet: snippet prg !This is file : !v expand('%:t:r') ! Author= !v expand(\$USER) ! Started at: date +%d.%m.%y` ! Last Modified : Sun 16 Jun 2019 12:30:58 IST ...