All Questions

Filter by
Sorted by
Tagged with
1
vote
2answers
79 views

What is the difference between loaded and unloaded buffers?

I was looking at the documentation for the 'complete' option, and I found it a bit confusing: . scan the current buffer ('wrapscan' is ignored) w scan buffers from other windows b scan other ...
3
votes
0answers
20 views

How to mark multiple files in netrw?

I tried using MF *.h for example to select all the files in the current directory that end with .h but this doesnt work. What are good ways to mark multiple files using netrw?
0
votes
0answers
27 views

netrw bug? cannot copy marked file to target

When I try to do the following on Windows 10: go to a directory, set it as the target directory using mt go to a different directory, mark a file in that directory using mf use mc to copy the file to ...
0
votes
1answer
171 views

Font on Mac Catalina

I just now upgraded to Catalina on Mac (10.15) and immediately ran into an odd font behavior: when I open a file with MacVim (8.1.1722 (157)), the letters with tails (g, y, p...) have their tails cut ...
0
votes
0answers
26 views

Neovim highlight syntax region inside typescript tagged template literal

I am having trouble fixing a syntax plugin for Vim. I've found a bug in a plugin that has not been touched in a fair amount of time. I want to address it myself but I believe I am lacking in a lot of ...
0
votes
1answer
30 views

Enable spelling in code files outside of comments

I've got the following obviously misspelled file: bla blar blar When I open it as "bla.txt" and run :setlocal spell vim rightly points out all three words as misspellings. However, if I mv the file ...
0
votes
0answers
10 views

Deleting the temporary buffer created by Pymode

I'm using the python-mode plugin with automatic lint checking. I want an easier way to delete the temporary buffers used to show errors when I use :wa. Sometimes there are more than one. Now I'm ...
1
vote
1answer
65 views

Make mapping that accepts count independent of line count

I have a mapping that looks like this: nnoremap <expr> <c-x>b ":call MyFunction(" . v:count . ")\<cr>" I also tried to instead define function with range, but the effect is the ...
0
votes
2answers
30 views

How to find all .kl files in current directory with Flygrep (spacevim)

I tried with Flygrep *.kl but it didn't work, I searched how to use --include \*.kl as in a grep search but I didn't find anything
0
votes
1answer
38 views

Bell ring on mapping <c-/>

This is the problem. I want to use in my mapping but it causes a bell to ring every time I press on it, no matter what I mapped it to. For example: nmap <c-/> y I am on nvim-qt. PS tried ...
0
votes
1answer
18 views

How do I open ctrlp plugin file suggestions in Insert mode?

I'm using CtrlP plugin to switch to other files in Vim by pressing Ctrl-p. But this only works in normal mode. I want to trigger it by pressing the same set of keys in insert mode as well. How can I ...
0
votes
1answer
42 views

insert new bullet point in autoindent mode

with autoindent mode on, when writing a short bullet point on restructuredtext file: - item one ~ Then I press Enter, and I get: - item one ~ but I whould like to quickly by here: - ...
0
votes
0answers
15 views

Spell check operator

Is there a way to run the spell checking for a single text object instead of the entire file? I would like to do something like: gsip (go spell in paragraph) I've found a gammar check operator: ...
5
votes
1answer
436 views

What is the difference between <C-V>x and \x?

Run the following commands, where <80> is a literal byte entered by typing Ctrl-Vx80: let literal = "<80>" let quoted = "\x80" echo(literal) and echo(quoted) will now both output <80&...
0
votes
1answer
21 views

Calling a function when timeoutlen expires and retrieving the input command

This might be quite challenging, but I would like to achieve the following behavior. Imagine that I have two mappings that overlap: dcb := delete comment block := delete comment block (all adjacent ...
0
votes
1answer
14 views

How to fix incorrect highlighting from 'matchpairs' caused by setline()

when using setline() to insert brackets, matchpairs does not do its job correctly. Using these commands fu Test() cal setline(".", "()") endf au TextChangedI * cal Test() set up the text ( ) ...
1
vote
0answers
31 views

Is there a way to make a command running inside a vim terminal open files in buffers?

I often find myself operating in the vim terminal needing to edit a few files. In this case I might type vim *.h. This opens a new vim instance nested inside my vim terminal. Is there a way to make a ...
1
vote
1answer
27 views

Calling g@ from a a vimscript function

I want to call g@ from a function. Given an operation: " Taken from :help g@ function! CountSpaces(type, ...) let sel_save = &selection let &selection = "inclusive" let reg_save = @@ ...
1
vote
0answers
147 views

How to avoid screen corruption?

I'd been using Linux Mint MATE for years, and recently moved to Arch Linux with MATE Desktop Environment without any change of hardware or .vimrc. (By the way, I use no plugin.) After that, when I ...
0
votes
0answers
18 views

gvim window completely frozen

I have a problem with gvim on Fedora 30: when opening a file, the content is displayed, but then the window is never refreshed. Already tried a lot of different solutions, with no success: CTRL-L ...
1
vote
1answer
25 views

Error With Simple Function Using setline()

I'm trying to start writing some Vim Script, and I've come across this issue. fu Test() call setline(1, getline(".")) endf autocmd InsertCharPre * call Test() This is in my .vimrc. When I type ...
0
votes
2answers
41 views

How to remap Autocomplete on Control+N, to Control+Space?

I am trying to remap this functionality: to Ctrl+Space, by using this line in .vimrc inoremap <C-Space> <C-n> However, I can not seem to get it to work. If I press Ctrl+Space after ...
0
votes
1answer
27 views

I want to save my typescript file, and immediately run tsc myfile.ts from inside vim. What is the best way to accomplish this?

I am building a daemon, and nodemon currently monitors a file called server.js, which is compiled from the file I am working on, server.ts In order to compile server.ts, after saving with :w, I need ...
1
vote
1answer
17 views

detecting insert-normal mode

I notice that when in insert, pressing <C-o> will take me to normal mode, but once I finish pressing a sequence of keys, I get taken back to insert mode. I find this very useful, but I want a ...
0
votes
0answers
10 views

Refactoring Ruby imports

Is there any way in Vim reliably refactor (i.e. rename, move up or move down directory structure) Ruby’s require_relative statements? I’ve searched thoroughly and couldn’t find any plugin or CLI tool ...
1
vote
2answers
68 views

Send keys to a terminal buffer

I want to map a keyboard shortcut to execute the last command in a terminal buffer that I have open. I've made some progress: I am storing the buffer's channel id correctly but when I try to send ...
1
vote
2answers
34 views

How can I edit the contents of my clipboard in vim?

Often while editing (say, a post on this network), I find myself wanting to copy something, edit it, and paste it back. At other times, I have some text in my clipboard, but isn't perfect. I would ...
1
vote
1answer
25 views

How to backspace with X at the end of a line

In vim I often use <S-x> to 'backspace' in normal mode (deleting the char behind the cursor). However if I position the cursor at the end of the line, the last character on the line is not ...
1
vote
0answers
35 views

How to use actual window size to control vim settings?

Background: neovim with tagbar plugin installed Goal: when starting nvim, if current window size is larger than 100, open tagbar and set auto-open for new buffers. Currently I use the settings below ...
1
vote
0answers
30 views

Smart and auto indent not indenting as expected for JSX

I'm trying to figure out how to get vim to correctly indent the next line in a JSX block. Currently when I press enter, the cursor goes slightly behind where it should be. In the example below, my ...
1
vote
0answers
36 views

Running a command Async in Neovim

As far as I know, neovim enables running a command async, without blocking the user. This is also enabled in vim8 I was told. But I couldn't find examples of how to run a command asyncly. Suppose ...
1
vote
1answer
66 views

Vim is highlights everything after EOL in yellow upon scrolling

My vimrc: http://ge0rges.com/vimrc My environment is: Ubuntu 18.04 in WSL on Windows 10. VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41) Included patches: 1-1453 Modified by pkg-...
0
votes
1answer
76 views

How to automatically execute a command every time visual mode is entered and every time normal mode is entered

I would like to execute a command every single time I enter visual mode and another command every time I leave visual mode. Is there a way to achieve this? My objective is to automatically record ...
2
votes
3answers
413 views

How to create a vimrc macro using :sort?

I tried creating the following macro: search an empty line above my location go down one line shift-v find an empty line down go up one line :sort This should sort the entire section I'm pointing at....
2
votes
1answer
126 views

Different mapping behavior for the different visual modes?

I want to have different behavior for the different visual modes. As an example if I wanted to vnoremap S{ so that it has the following behavior: surrounds the selection in v mode, (puts { at the ...
2
votes
0answers
42 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 ...
1
vote
1answer
29 views

Vim - swaping the curly braces and brackets, breaks the plugin shortcut

I want to swap curly braces and brackets. The problem I encountered is that some plugin shortcuts dont trigger. Here's example. If I put this in my config file: nnoremap { [ nnoremap [ { then ...
0
votes
0answers
34 views

Is it possible to replace tildes representing empty lines with another character?

I'm writing a plugin which needs to replace the empty line tildes with with a '.' character in a single window split. Is this possible to do with Vimscript?
0
votes
1answer
41 views

how to prevent resize of my split windows on every call of term_start() if I do need to use 'termwinsize' option

I have 2 files opened in a vertically split window. I call term_start() and get results in a split window below. I use something like this: :let foo=term_start("some_script", {'hidden':1, '...
1
vote
1answer
27 views

Adding prefix and postfix to matching regular expression

Dear fellow Developers, I would like to quote variables having @ inside like test@mail.org, but not starting with @ like @var1, @var2. Does Vi/Vim/Neovim have any option to inspect the matched pattern ...
1
vote
1answer
39 views

How to change colors of Vim editor?

I tried to change colors of Vim editor by going to the screen properties and change the color of background and text. It did not work. I like to know how to change the colors. Thanks.
0
votes
2answers
43 views

netrw's - map (up one level) broken after brew reinstall vim

Short Question: What is netrw function for up one level, how can I call it in my own function? Context: After installing a new ruby I had to reinstall vim to get it working again. But now netrw ...
1
vote
1answer
48 views

Integration between vrapper (Eclipse) and nvim-qt

I use Vrapper, which is a great plugin, providing some vim emulation to Eclipse. One of the features of Vrapper is that from anywhere you can type :vim and it will reopen the file you are currently ...
1
vote
0answers
19 views

YouCompleteMe GoToDefinition for java gives 'RuntimeError: Cannot jump to location' when used on classes from Maven Dependencies

I've been using ycm for Python and Go, trying to configure ycm to work with Java. I've installed java 8, maven, recompiled ycm with --java-completer and done mvn install in a repo that contains a ...
1
vote
1answer
22 views

Execute Vim command in terminal window and return to Terminal-Job mode

For a while, I'd been using :nnoremap <C-H> <C-W>h and :tnoremap <C-H> <C-W>h, et. al. to switch windows. This was working great, so when I started using tabs, I decided to ...
1
vote
1answer
27 views

load quickfixlist into a specific window

I'm not interested in loading an item into a specific window. I'm interested in opening/loading quickfix list into a specific window/pane. Searched online everywhere, but couldn't find it. Does anyone ...
0
votes
1answer
29 views

How do I redraw airline after setting window-local variable

:help airline states that variables related to sections can be window-local. The example from help shows how to do it for a plugin: function! MyPlugin(...) if &filetype == 'MyPluginFileType'...
2
votes
0answers
113 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"...
3
votes
1answer
45 views

How do I use a variable or return value in option, command, or mapping?

I have a variable foo with let foo='value', and a function F like function F() return 'value' endfunction and I want to use them in an option: :set option=foo, :set option=F(); or in a command: :...
1
vote
1answer
40 views

run vim without python3 suppport

I have python2 and python3 compiled into my vim vim --version VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct 2 2019 14:25:42) Included patches: 1-2109 Compiled by user@enterprise Huge version ...

15 30 50 per page