All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

How to change this particular “deep blue” color that displays?

I'd like to change the color of a certain character set displayed in my terminal. I'm not sure if it's related to the terminal itself (xfce terminal) or to the colorscheme (distilled.vim) so I'm not ...
2
votes
1answer
28 views

Yank visual selection with modifications in a terminal-buffer

Upon writing a code, sometimes I open a terminal split with :term to test it by issuing some commands and checking some output. As an example, this is a fragment of what I have executed in a split ...
2
votes
0answers
17 views

Slow write/save speed for files on network

I noticed my VIM write/save file for a network path is quite slow. I found out VIM saves files with approximated speed of 20mbps (2.5MB/s). Network is 1Gb/s local area network so I believe the ...
1
vote
1answer
23 views

Is it possible to view a history of commands (per mode) executed in Vim?

I sometimes execute some commands in Vim by mistake, either in normal-, visual-, or ex-mode and have no idea what I pressed. Is it possible to see a history of executed command per mode in Vim? I know ...
1
vote
2answers
33 views

Can I remove all maps containing key?

I have a plugin (c.vim) which includes a lot of maps (all with leader key). I changed my leader key to space, which I like, but the problem is that the maps also apply to insert mode. I would like to ...
5
votes
3answers
246 views

How can I add text to the end of words on each line?

I have a series of single-word codes on separate lines in a text file. I'd like to add a backquote ( ` ) to the beginning and end of each word. I know I can add a backquote to the beginning of each ...
0
votes
1answer
36 views

NeoVim Not Using My ~/.config/nvim/init.vim File

Just installed neovim. I just created a file ~/.config/nvim/init.vim. The init.vim file only has one line: set relativenumber But then when I opened a file using the nvim command (in Cygwin), the ...
2
votes
1answer
25 views

How can I fold some lines on opening a buffer?

I want to fold from "Copyright" to "CONNECTION" every time I open a .c or .h file, so I don't have to see it. The license does have newlines in it in my files, so selecting shouldn'...
4
votes
1answer
265 views

How to stop Vim from sourcing a file halfway through? [duplicate]

I'm mostly a Neovim user and I would like to share part of my config with regular Vim. Here's the problem: my init.vim is organized in such a way that at the top there are the general Vim options, ...
2
votes
0answers
25 views

Unicode in vimrc no longer displaying correctly

I'm using VIM 8.1.2234 with +multi_byte and +multi_lang In my vimrc file, I have set listchars=tab:▸\ ,trail:· (Notice the "▸" and the "·") When I cat or less my vimrc, the text ...
1
vote
1answer
28 views

Shortcut for spell checking

I would like to create a shortcut for the spell checker, since it requires a relatively long command. I inserted the following map in the .vimrc file: inoremap <F5> <C-O>:set spell ...
1
vote
0answers
15 views

welcome message hidden by “exe” in timer function

My vimrc holds a script to change the color of the CursorLineNr conditionally based on the mode. My problem is that it hides vim's welcome message when it's launched without a file. I would like to ...
1
vote
1answer
32 views

pluging value to override vimrc

in my ftplugin, I have code: if executable('fprettify') au BufWritePre <buffer> :silent %!fprettify --silent else :let choice=confirm("fprettify doesn't exists! Install ...
3
votes
1answer
85 views

Is it possible to enter visual mode without changing the last visual selection?

In a script, I want to delete a rectangular block of text. For example, I want to convert this: ABCD EFGH IJKL MNOP into this: ABCD EH IL MNOP One way to do this is with visual block mode. Move the ...
0
votes
0answers
31 views

Remapping the menu key in Neovim-Qt

I would like to map the menu key (aka application key) on my keyboard to various behaviors in Vim, but in Neovim-Qt on Windows 7, Vim does not recognize presses of the menu button. For example, when I ...
1
vote
0answers
27 views

Is it possible to do a reverse vimdiff

There are many answers like this which talk about reversing the search results in one vimbuffer. But I am wondering if there is way to highlight matching lines only in vimdiff. Something like ...
0
votes
0answers
20 views

vimrc post buffer bash script

I have a script that is called when I open a file with fileA extension in vim: autocmd BufWritePost *fileA !/usr/bin/named_check_vim %:p script named_checkvim checks for errors in a file, if errors ...
0
votes
0answers
22 views

How to find and edit the setting of vim in windows

I have installed vim in windows. I am struggling hard to find the setting of vim where I can do the changes and importing packages in vim. Any help would be really appreciated. Regards, Pankaj
0
votes
0answers
39 views

How to map the slash key “/”

I am trying to map the NERDCommenterToggle command from the nerdcommenter plugin. I want to use "Ctrl+/" for this: vmap <C-/> <plug>NERDCommenterToggle nmap <C-/> <plug&...
3
votes
1answer
53 views

How to get highlighting group set by spell check

How do I get the highlighting group of a text when the group is defined by the command :spell? For example when a word is misspelled I want to get the highlighting group SpellBad. We have a question ...
2
votes
1answer
47 views

Is g@ useful outside of VimL scripting, i.e. when editing? (Instead of vim-repeat)

I read on an old none commentable reddit that Tpope no longer uses his vim-repeat plugin, and instead uses g@. I have used g@ in plugins, and unstand you set opfunc first, then g@{motion} will run ...
0
votes
1answer
31 views

Is there a way to create a new file from the editior once I have a file open?

So I have the following file number11.py open in vim, this is the route I usually take to create a new file I do ESC :save number11.py, and then :x. Then from my Ubuntu terminal I do the following vim ...
1
vote
1answer
18 views

Move between non-capitalised (SpellCap) spelling mistakes

After running set spell is see spelling mistakes as well as non-capitalised words. I can move between mistakes with [s or ]s, but is there a way to move between non-capitalised words? Motivation is to ...
-1
votes
0answers
23 views

Why isnt syntastic working?

Previously syntastic checked for unused imports, variable and long line length but now there is no error. Also this is my .vimrc set ignorecase set number set incsearch syntax on call plug#begin('~/....
1
vote
1answer
33 views

Disable Shift+Insert from pasting from Primary

In Vim, the canonical methods to interact with X11's Clipboard and Primary is to use + and * registers. There are at least another two ways to paste from Primary into Vim: Shift-Insert and Mouse ...
1
vote
0answers
25 views

vim cant source rgb.txt

I am trying to source rgb.txt or hex.txt, so that I can use color by name instead of hex value in my color scheme. In my ~/.vim/plugged/vim-coogle/colors, I have tree vim-coogle/ vim-coogle/ └── ...
0
votes
2answers
48 views

vim colorscheme color as variable

I have a vim colorscheme vim-coogle, which uses both hex value and named colors already defined in vim, like: hi Comment guifg=#FFF59D ctermfg=lightgrey Now, the problem is, I want do define my own ...
0
votes
0answers
44 views

:command to abort sequence?

To be honest upfront, I wanted to use global to find the first non-matching line, as in v,/usr/lib/, abort (having slashes in the search pattern is the reason for using g instead of / — I'm editing a ...
0
votes
0answers
19 views

How to follow while searching regex in vim? [duplicate]

In my previous vim, when i typed /something and after reaching upto so vim started immediately following and with each letter typed i got into new word until i got the perfect. However this following ...
0
votes
0answers
19 views

How to open netrw at each vim session but have the cursor on the code (and not on the tree) when opening

I found the following chunk of command on this blog to have a file browser open by starting vim that I added to my .vimrc. It splits the window into 2 panes: a file browser and the text editor. The ...
1
vote
1answer
40 views

Why cant i use `"+` in vim? [duplicate]

Previously, whenever I typed "+yy in vim, it yanked a line to the system clipboard. I reinstalled the OS again, and, when I try to do the same now the input disappears after entering +. Steps: I ...
-1
votes
1answer
25 views

Is there a simple way to persist command history in Vim/Neovim?

Is there an option I can switch on the init.vim config file to let me keep command history between vim sessions?
0
votes
0answers
15 views

How can set up ALE to be opt-in?

I'm trying to use ALE for auto-formatting for one specific language, however it has everything turned on for all languages by default and I can't figure out how to configure it so that it's disabled ...
1
vote
0answers
40 views

:terminal colorscheme inside Vim is different from either Vim or Host Terminal

I have a gruvbox theme applied to Vim inside my vimrc. The problem is that when I run the :terminal command inside Vim the colorscheme is different from either the Vim theme or the terminal emulator's ...
1
vote
2answers
44 views

Execute a vim command after entering vim

Is it possible to send a command to vim from the command-line? For example, to open the last file something like: $ vim -e "`0" # execute `0 after opening vim Or, if I need to run a ...
0
votes
1answer
29 views

Quit script after a certain condition is true

I have a script that checks for a certain condition (it checks if pip dependencies are installed). If they are installed and everything is ok, I want to import a bunch of python functions from my ...
0
votes
0answers
24 views

NERDTree causes Vim exiting when open two buffers on same window

Here is what is happening: I open one file, either with o in NERDTree or with :edit file_a. I open another file, again with o in NERDTree or with :edit file_b, and the file opens at the same window ...
1
vote
0answers
43 views

Local “statusline” override problem

I'm currently writing a plugin, and got stuck with this problem. My plugin opens a new window with all local options I want, but also sets the statusline option to display some useful information. Vim ...
1
vote
1answer
22 views

The line `eval local value=\“\${WORLD_$2[$1]}\”` breaks BASH syntax highlighting by inverting quote contents

So I have a BASH script I'm modifying and I've been noticing large blocks of script with broken syntax highlighting. They appear as though I have an unpaired double quote somewhere, despite all quotes ...
3
votes
1answer
40 views

Append to current copy buffer

I am copying multiple lines from different parts. I can for example do 3yy to copy the 3 next lines. Then I would like to scroll a bit and add 5 more lines: 5yy and so on. At the end, I want to paste ...
0
votes
0answers
18 views

Gruvbox theme for Airline resets every time Vim closes

I have installed gruvbox using vim-plug, then I installed Airline and set the theme following the recommendations. But every time I close Vim and open it, the theme for Airline is reset to default and ...
1
vote
0answers
26 views

embed one text file in another and edit the embedded file from the file it's embedded in

Is there any existing plugin or gist somewhere that would allow you to embed one text file inside another? Ideally it'd also allow editing the embedded file from the file in which it is embedded. ...
0
votes
0answers
19 views

Theme works in nvim on Windows, but not on Linux, what is the difference? [closed]

I'm quite new to the VIM scene but I already love it! However, I'm running into a problem with a theme I have created. I'm not really sure how to solve the problems since it is working on Windows, I'm ...
1
vote
1answer
38 views

changing font size leaves white bars in gvim

I wanted an easy way to resize the font in gvim (GTK), so I found this post: Quickly switch between fonts at runtime I created the following bindings based on that post: let g:fc_list = [ \ ...
4
votes
1answer
318 views

Why does Vim say “Already at newest change” despite a full “changes” history list?

I seem to be unable to undo something in a file I saved, despite that the history of changes shows up with I press :changes. So the change history is known to vim but I cannot access it? I thought it ...
0
votes
1answer
25 views

Quick question about indentation

Just had a quick (and probably stupid) question about indentation. When I try editing a script, one of my settings seems to "freeze" the indentation several tabs in, and I can't figure out ...
1
vote
1answer
28 views

Can we make substitutions based on rules from a file?

I've been using the command mode for making replacements in a file. Something like :%s/foo/bar/g and to make a series of replacements: :%s/i/1/g | :%s/j/2/g | :%s/k/3/g | :%s/l/4/g | ... This line ...
1
vote
2answers
32 views

How to create regex group with dependency with earlier group via math operations

Imagine I have a file as follows, 10 10 10 11 ... 10 20 20 20 20 21 ... 20 40 40 40 40 41 ... I know simple regex such as To search two numbers /\d\+ \d\+ To search repeated numbers /\(\d\+\) \1 My ...
0
votes
1answer
18 views

switchin back another viewport from the terminal buffer [duplicate]

I created :term, then I switch to another viewport, but latter when I switch back to the term buffer "!/bin/bash" it is full screen and I don't understand how can I access the vim command ...
4
votes
4answers
624 views

Show exact number of matches even for large (>99) numbers

When I search for something /search-term and it shows up more than 100 times in my file, vim shows me that I'm on match x/>99 instead of x/121 etc. For smaller numbers it shows me the exact number ...

15 30 50 per page
1
2 3 4 5
187