All Questions

1,039 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
18 views

neovim and youcompleteme

Anyone know how to get rid of the file path segment of the completion list. I'm using youcompleteme with rust.
2
votes
0answers
66 views

How to fix this `Omni completion (^O^N^P) Pattern not found` error?

I am trying to set up syntax keyword based omnicompletion in vim. I have defined a few syntax keyword Constants in ~/.config/nvim/syntax/spl.vim They are correctly detected and highlighted. They are ...
2
votes
0answers
36 views

switching `<Down>` and `<C-n>` in popup menu

I'd like to switch the behaviour of the <Down> and <C-n> keys when the popup menu (like from omnicompletion) is visible (and <Up>/<C-p> respectively). The following two ...
2
votes
0answers
100 views

What happens when error occurs during cdo?

:h :cdo says: When an error is detected execution stops. The last buffer (or where an error occurred) becomes the current buffer. Let's see what really happens: ...
2
votes
0answers
23 views

Cannot :Explore public ftp service (I see empty listing with ../ and ./)

The address is ftp://ftp.yandex.ru/ I tried from bash: vim ftp://ftp.yandex.ru/ After that I was asked for username and password (but this is public anonymous server), ok I entered anonymous for ...
2
votes
0answers
45 views

Is it more efficient to use one function instead of multiple autocommands?

I have a lot of lines with with filetype-specific autocommands defining mappings and abbreviations, which looks like this: augroup vimrc au! ... au FileType blah nnoremap <buffer> aa bb au ...
2
votes
0answers
163 views

(coc.nvim) RLS warning: …use crate_blacklist instead

I've got a warning on start: [coc.nvim] RLS configuration option use_crate_blacklist is deprecated: use crate_blacklist instead Probably I have to put into my coc-settings.json "rust.crate_blacklist"...
2
votes
0answers
124 views

Make Ctrl + arrows work inside neovim

I'm using PuTTY as SSH client and zsh as a shell. When I just connect to a host and don't run nvim, I can see that control-left/right keys work correctly and send a different key from simply pressing ...
2
votes
0answers
107 views

Use external commands within venv virtual environment

Same question as Use Vim with virtualenv, except for these differences: I'm using bash, not zsh using venv, not virtualenv or virtualenvwrapper I have a keybinding to run the current buffer as a ...
2
votes
0answers
39 views

Best way to move cursor to start of variable declaration?

There are a lot of times were I have something like int x = someFunction(a, b, c); If my cursor is somewhere after the equals sign, is there a good way to put the cursor on the “s” in someFunction? ...
2
votes
0answers
30 views

How to set syntax keywords dynamically

I'm trying to highlight the keywords for my c++ project. So what I've done is to create a file here: ~/.vim/after/syntax/cpp.vim and put some custom configuration into it. For example, putting the ...
2
votes
0answers
58 views

MacOS Terminal CPU spike after exiting Vim

I'm using Vim 8.1 from homebrew on MacOs 10.14.6. Whenever I exit vim back to the terminal, the first keypress in the terminal afterward results in a beachball and CPU spike to 100%, with terminal ...
2
votes
1answer
64 views

Session - start with buffer 1

Note: Possible fixed bug. See comments. A somewhat minor nuisance, but as the pedantic for these things :P When saving and opening a Session file the Session.vim file does: badd +1 file1 badd +1 ...
2
votes
0answers
56 views

How to configure Syntastic to process mixed Jinja/Html files correctly?

I've searched around for how to configure vim/syntastic to process mixed Jinja/Html files but not found the steps. Does anyone know if there is a way to configure Syntastic to handle filetype jinja....
2
votes
0answers
24 views

How to mimic Alt key functionality from ubuntu gnome to OSX iTerm2?

When I use Vim on my home Ubuntu computer, I am able to use alt-[key] as a quick way to jump from insert mode to normal mode and immediately run the [key] command. One thing I frequently do is: alt-j ...
2
votes
0answers
33 views

make u (undo) also reset . (repeat last command)?

Sometimes I make a change, then in my scramble to move to somewhere else that I want to repeat the change, I accidentally make some edit (e.g. ill). I would normally undo the accidental edit with u, ...
2
votes
2answers
99 views

format sparse json files for legibility

Situation I have a large, hierarchical json file with many single entries, like so: { "tokens": [ "payload, a string" ], "values": [ { ...
2
votes
1answer
33 views

:GhostInstall does not work

Note: I am fairly new to NeoVim. So far I have installed plugins by simply unzipping the plug-in master folder into the directory /usr/share/nvim/runtime/plugin. In case there is no master folder I ...
2
votes
0answers
38 views

How to get this tab/autocompletion setup?

Basically what I want is a PyCharm-like completion: If there is only whitespace, insert <TAB>. If pum is visible and nothing is selected, complete with first, otherwise choose the selected word/...
2
votes
1answer
74 views

Get neomake to recognize python and gcc location

I installed the latest versions of Python and GCC/G++ in alternative locations. I am using SpaceVim. I think SpaceVim is using neomake as the default. I want to know how you can configure neomake to ...
2
votes
1answer
85 views

How to get tpope/vim-rails gf command to work with SpaceVim

I am using SpaceVim as Ruby on Rails IDE and installed the tpope/vim-rails plugin. However, the other commands like :Econtroller, :Emodel, :find, commands are working just fine but the gf command ...
2
votes
0answers
25 views

How to identify the last DiffUpdated event?

The DiffUpdated event has been added in patch-8.1.0397. Sometimes the event occurs a few times in a session. For example, when 2 files are opened in diff mode, ":e!" generates the event 3 times. As ...
2
votes
1answer
77 views

Format / Indent c++ as you type inside expressions

In visual studio, that code : for(int x=0;x<10;x++) {} becomes that code : for (int x = 0; x < 10; x++) { } as soon as you hit enter. I was wondering, is it possible, and if so, how can I ...
2
votes
0answers
42 views

How do I delete a block a text using the mouse cursor?

Yes, I know this is unconventional, but I just want to know. When I right click on a chunk of higlighted text, the dropdown doesn't show any option for deleting - just copy, copy as html...show ...
2
votes
1answer
117 views

unable to copy to system clipboard with +clipboard and +xterm_clipboard in vimx

The system is Centos7.2. I have installed vim-enhanced and vim-X11, used vimx command. It shows that vimx supports clipboard and xterm_clipboard. But in vimx, there is no reg + and reg *. I can't ...
2
votes
0answers
36 views

head isn't included in syntax/sh.vim

head is a common Unix/Linux executable, but it's not listed in the shell syntax highlighting configuration. In contrast, many common executables are. Specifically, its counterpart, tail, is listed. ...
2
votes
0answers
50 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 ...
2
votes
0answers
228 views

Find and highlight current file in netrw

I want to use netrw as a project drawer. Not for opening/closing files or general file management, but only as a way to get a visual overview over the project structure. I open netrw automatically ...
2
votes
0answers
57 views

Is there a better way to diff from a patch?

Background: I'm working on a large project that has some disparate coding styles. I'm working on unifying that but only the parts that I've most recently touched. The tool that I'm using produces a ...
2
votes
0answers
268 views

Vim+Tmux: How to switch between Tmux Windows and Vim Tab Pages Seamlessly using the Alt Key?

In Vim I can switch between tab pages with :tabnext- to go left and tabnext+ to go right, simulating the tabs on an IDE. In Tmux I can switch between windows using <prefix>p and <prefix>n ...
2
votes
0answers
23 views

substitute short by long command forms from history on VimLeavePre

How can I edit the : history from a VimLeavePre autocmd? I'd like certain abbreviated command forms to be recorded with their long form in the shada file. I'm in the habit of using both :tabe {file} ...
2
votes
0answers
34 views

How can I make 'lnext' run 'lfirst' if it needs to be?

I use ALE for finding syntax errors in code in vim, which populates the loclist with any errors found. However, when I first open a file with errors, which populates that list (I have g:...
2
votes
0answers
32 views

Make <Esc> close completion menu and cancel selection, without side effects

I would like to make my Vim completion menu a little more IDE-like, and I was able to achieve this using the bindings suggested here. However, the <Esc> binding causes a bit of a problem: ...
2
votes
0answers
37 views

How to omit dictionary source file in dictionary completion

<C-X><C-K> complete words with long dictionary file name, such as /home/xxx/.vim/mydict. I'd like to omit or shorten the descriptive info. I have googled but got no hints. Any advice?
2
votes
0answers
108 views

How do I make vim's terminal use my emulator's cursor shape?

I am using ibeam a.k.a vertical bar cursor right now. When I switch to terminal mode in vim, it changes the cursor shape to block - but doesn't restore it after I quit the terminal. I tried changing ...
2
votes
0answers
72 views

custom fold expression to fold functions

I would like to create a custom fold expression for functions of the form x <- function(a,b,c) { ... ... body ... } where the lines starting from function(...) until the closing brace are ...
2
votes
0answers
58 views

Is it possible to call searchpair or searchpairpos on string instead of current buffer?

searchpair or searchpairpos works only on current buffer. Are there similar functions work on string instead of buffer?
2
votes
0answers
58 views

Unwanted extra indentation of multi-line statements

How can I make continuation lines indent 1 tab instead of align with the some text? With the default cindent options, I get the following: static int A = 0, B = 0, C = 0; But, ...
2
votes
0answers
104 views

Quickfix go to next error of specific type

I am starting to use quickfix to handle my latex compilation process. I found the vim-latex package (https://github.com/vim-latex/vim-latex) but I am only interested in the quickfix part, and I want ...
2
votes
0answers
82 views

Jump to last position when using vim netrw to open a file

I am looking to jump automatically to the last position in any file that I open. I have in my ~/.vimrc file: autocmd BufReadPost * ...
2
votes
0answers
183 views

Omni completion Pattern not found - Error loading rails environment

I'm trying to make Omni completion work with my Ruby files, but it only works with Ruby's core libraries; for instance, after typing String.<C-X><C-O> i get all Ruby's String methods, ...
2
votes
0answers
43 views

Go to current cursor position when invoking command-line edit mode

If I press v while using either the vi-mode zsh plugin or set -o vi in bash, it opens the line I'm working on in a full vim session. However, this puts my cursor at the beginning at the beginning of ...
2
votes
0answers
31 views

Do operator ranges/movements/textobjects always overwrite the last visual selection? workaround?

In vim, when I operate on a textobject from a plugin, say the 'inner indent' typed ii from kana/vim-textobj-indent, my last visual selection ('>, '<) is reset to where the operator worked on. ...
2
votes
0answers
64 views

Using an iTerm color scheme inside a Vim :terminal window

My normal terminal color scheme is set via a color preset in iTerm. When I open a terminal window in Vim (:terminal) that color scheme doesn't get applied, presumably because Vim has no knowledge of ...
2
votes
0answers
243 views

How can I record a macro across multiple files

I have two code files open and I'm trying to write a macro for moving code from one file to the other. I start recording the macro in file A. After I enter all of the commands I need in file A, I ...
2
votes
0answers
52 views

vi -u doesn't seem to work?

As system administrator I have to work under several user IDs, some of which are shared with others. We all have different tastes in what we like in terms of settings for our vi, so I am looking at ...
2
votes
0answers
77 views

Preventing autocmds from being redundantly repeated

I'm trying to figure out what is the proper way to prevent autocmds from being redundantly repeated. Here are articles which I have already read: Remove augroups around autocmds in .vimrc (related ...
2
votes
3answers
134 views

Can I define something in .vimrc to speed up pasting of large amounts of data?

Occasionally, I paste large amounts of data into vim, using Ctrl+v in my terminal emulator (in Linux). This takes several seconds before vim is responsive again. I have tried two other methods, which ...
2
votes
0answers
22 views

Applying full auto-format to comments but not code

I am considering using Vim's auto-format feature (i.e., adding a to formatoptions). However, I can't seem to figure out a combination of options that will give me the configuration that I want. For ...
2
votes
0answers
62 views

display list of buffers `ls` without scrolling down

Is there a way to display output at the bottom of the screen like ls does, but without scrolling down to accomodate the output? The Vim Wiki (no https) has the following snippet :nnoremap <A-n>...

15 30 50 per page
1 2 3 4 5 21