All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Terminus font broken in gVim on Fedora 31

I have just upgraded to Fedora 31 and see that my gVim with Terminus 12 font looks like this: Resetting the guifont option gives me a reasonable looking gVim back. How can I further diagnose this ...
0
votes
1answer
22 views

Vim wordcount for alphanumeric characters only

I know that vim has a function wordcount() that returns a dictionary containing the number of bytes, lines, words etc in the current buffer. The problem I have is that the words field of the dict from ...
1
vote
1answer
42 views

Why do I lose what i copied with "+y after exiting vim and how to change that [duplicate]

The + register always worked weird for me but only now I noticed a regularity in the weirdness: after I quit vim I can't paste anymore, it's as if the clipboard was replaced with a blank. Why, and can ...
0
votes
1answer
26 views

'visual inner word' on single space does not grow selection

In visual mode, the iw text object 'grows' with repeated presses of iw, ie., viwiwiw... will 'grow' to select multiple inner words. However, this 'growing' behaviour is not seen when the cursor is ...
0
votes
1answer
24 views

Paste into a new line and preserve indentation

I want a mapping that does it. Apparently, it is not that simple. Because first, it might decide to keep it commented when I press o. And it behaves differently if it was copied by yy, insists adding ...
0
votes
1answer
29 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....
0
votes
0answers
12 views

YouCompleteMe cannot find module

I am trying to get YCM working on Windows 10. Vim version: 8.1 64-bit GUI Since I'm using the regular gvim installer for Windows I have python support Compiler flags as follows: Compilation: cl -c /...
1
vote
1answer
30 views

Open quickfix/help in existing window [duplicate]

my usual setup is two vertically split windows. Lets say my cursor is in left window. When I vimgrep something, I would like for quickfix window to reuse already opened right window and automatically ...
1
vote
1answer
30 views

How can I reset all folds to the state when the editor started?

I have some configuration in my .vimrc governing the initial folding strategy. Sometimes, I am looking to restore the initial state and would like a :refold command or something, which restores the ...
1
vote
0answers
23 views

Meaning of `@` in `&isprint`

As far as I'm concerned "printable characters" are the set of characters that occupies a printing position on a display. You can print a subset of (not all) printable characters by executing :echo &...
1
vote
0answers
32 views

Disable expansion of environment variables when completing filenames

Let's suppose I have the following environment variable 1| export my__files=$HOME/Documents/MyFiles Now let's suppose I am editing the file main.txt (see content below) 1| foo 2| bar 3| $my__files/...
0
votes
1answer
28 views

How to create a custom colorscheme in which define custom highlight group each of containing set of words?

Let's assume we want to create a custom colorscheme. For example, content of a custom colorscheme file ~/.vim/colors/mytheme.vim are as follows, " syntax highlighting groups hi Comment guifg=#007f7f ...
2
votes
0answers
17 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 ...
1
vote
0answers
25 views

vim doesn't load syntax for a single file

I was toying around with my .vimrc editing it, and then checking in another file whether my changes worked or not. But now I ended up in a state where opening one file with vim file1.tex (this was ...
2
votes
2answers
167 views

How to use lookahead and lookbehind in vim in the same line

I am trying to delete all the spaces that aren't sandwiched by a letter. So this I am trying; but ; I can't find a way ; should be this I am trying;but;I can't find a way; I tried this but it ...
2
votes
0answers
27 views

How to press ESC only once to close suggestions list and exit insert mode

When using CoC.nvim's suggestion list, I often find myself pressing Esc twice to return to normal mode - once for cancelling CoC's list session and once to actually exit insert mode. I find that ...
1
vote
1answer
26 views

nmapping two commands works only sometimes

Due to working in an environment with no clipboard support I have the following line in my .vimrc: nmap <F12> :set invnumber<CR> <bar> :set invpaste<CR> Oddly enough, this ...
2
votes
1answer
323 views

Can `r` be used for multiple letters?

Background I am new to vi/vim world and finished running the vimtutor several times. The setup In the tutorial we learn several items to correct or edit lines of text. r to replace the letter the ...
1
vote
0answers
30 views

Repeat <Leader> mapping without having to press/release full combination

Similar to this question, I want to be able to resize my splits in a repeatable manner, but without having to use a plugin. I currently use the mapping: nnoremap <Leader>q <C-w>10< ...
0
votes
1answer
25 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 :...
1
vote
0answers
21 views

How to change the docstring format of the snippets by Ultisnips?

Using the snippets plugin I'm able to get: class MyClasnippets(object): """Docstring for MyClasnippets. """ def __init__(self): """TODO: to be defined. """ from just typing class. ...
1
vote
1answer
25 views

call omnicompletion from vimscript

I'd like to automatically call the omnicompletion (that is triggered manually by <Ctrl-X><Ctrl-O>) from within a vimscript function. I played around a bit with execute 'normal! …' and ...
13
votes
2answers
2k views

How do I disable vim from producing backup files?

How do I disable vim from producing backup files? Like file~ do not generate. Should I do that by modifying /etc/vimrc? I added set nobackup to /etc/vimrc, but when I looked at the distributed file ...
0
votes
1answer
40 views

vimgrep: Search from 'tags' file location

Is there a simple way to setup a binding that will :vimgrep up until a tags file is found? I'm curious because I can do set tags=tags;/ to do a similar search to define tags, but am not quite sure ...
0
votes
0answers
38 views

Ultisnips stopped working this morning

I've been using Vim for about a year now (so still a newbie), but this morning UltiSnips stopped working for me. Any help would be really appreciated! When I run :UltiSnipsEdit! the console returns ...
0
votes
0answers
29 views

Setting up fzf and integrating it with vim

I am trying to setup fzf and use it with vim, tried to follow the instructions in the git repo but could not get things to work. I was successfully able to install fzf and use the :FZF command in vim....
1
vote
2answers
108 views

How to replace a space with a colon - command line mode

Input Every line is separated into 8 parts by semicolons Every part can include words,numbers,space etc. Output I am trying to replace the space in the 6th part with a semicolon, thus separating ...
1
vote
2answers
39 views

How to create a window for specific lines of a buffer?

Suppose we have a file: 1. un 2. deux 3. trois 4. quatre 5. cinq 6. six 7. sept 8. huit 9. neuf 10. dix I want to create a window that shows only lines 5--10 and nothing else. Modifying them should ...
1
vote
1answer
53 views

Gvim 8.1 on Windows 10 won't source $HOME\_vimrc

I have a $HOME\_vimrc present, but it doesn't show up in the output of :scriptnames. And when I run gvim -V, it reports: could not source "$HOME\_vimrc" The only thing in my $HOME\_vimrc is the ...
1
vote
1answer
34 views

How to prevent markdown folding of # comments in fenced code?

I have python examples in a markdown file in a code fence (e.g. when I convert a jupyter notebook into a markdown document). These snippets sometimes have code comments in them starting with #. The ...
5
votes
5answers
2k views

How to replace a pair of brackets

I have a file, containing some lines like this: aaa bbb (ccc) ddd. Now I want to replace the pair of brackets by a pair of square brackets to make this line become aaa bbb [ccc] ddd. I think that \...
0
votes
1answer
26 views

YouCompleteMe does not work as expected

My process so far: Brew unlink vim Brew install macvim Brew link macvim Installing YCM with vim-plug. Running ./install.py from YCM folder. mkdir ycm_build cmake -G "Unix Makefiles" . ~/.vim/Plugged/...
0
votes
0answers
17 views

Is it possible to install YouCompleteMe on vim without using neovim?

I tried to download neovim (using Homebrew and pip) and I still did not manage to make YouCompleteMe work, it gave me several error messages regarding the neovim module and python. Is there any ...
0
votes
1answer
32 views

Wildmenu for command line history

While there is <up> and <down> that tries to complete the line, sometimes one wants to recall all the commands that start with what was typed, on a (wild)menu. Is this possible somehow?
0
votes
1answer
54 views

Why doesn't gJip turn a paragraph into a line?

Is there a good reason why gJip doesn't turn a paragraph into a line? If not, how could I make it work that way?
3
votes
1answer
65 views

How to print a list of possible matches from C-n?

That is, doing autocompletition with C-n, is there a way to obtain the list of possible matches, same as returned into the popup menu ? Given the example below is it possible to retrieve {aaa, aaab, ...
1
vote
1answer
24 views

I'm using a colorscheme installed with vim-plug, how can I change the color of the line numbers?

I'm using this colorscheme, how can I change the color of the line numbers? I think that the colorscheme will overwrite anything I'll put in .vmrc.
1
vote
1answer
27 views

Why can't I install this colorscheme properly?

I'm trying to install this colorscheme. They instructed to use a package manager so I've used vim-plugged: Plug 'rakr/vim-one' While my colours on vim did change, it really does not look like the ...
2
votes
1answer
33 views

Vim color black isn't black

I have the following text in my ~/.vimrc: syntax on colorscheme koehler highlight ErrorMsg ctermbg=Red ctermfg=Black however the error messages show like this: The error message is gray on red, not ...
0
votes
0answers
18 views

Can NerdTree/netrw display only the files that exist in QuickFix list?

There are different ways QuickFix list is populated (make, lsp errors, search, git diff, etc). I find the QuickList extremely useful as it standardizes many outputs and gives me a way to cycle through ...
0
votes
0answers
35 views

Vimtex conceal not working properly

Hi I am seeing the following on my .tex files. My .vimrc file looks like this let mapleader =" " call plug#begin('~/.vim/plugged') Plug 'lervag/vimtex' let g:tex_flavor='latex' let g:...
1
vote
1answer
34 views

vim expression unusual behavior

While playing with map() I get an error, which I cannot understand. In essense, pu=map(getcompletion('*','event'), '"h" . v:val') pu=map(getcompletion('*','event'), "'h' . v:val") pu=map(...
0
votes
0answers
24 views

how to implement basic ctrlp like UI interface

How to implement basic ctrlp like UI interface. In case never used ctrlp, let's be specific, how to achieve below functionality? type <F2> open a tmp window with 5 lines, wating for user input ...
2
votes
2answers
28 views

Incremental search for text from the command line

I'm trying to create a zsh alias that will start vim and search backwards from the end of the file for a given string. I learnt about +normal and can do something like this to start vim at the end of ...
0
votes
0answers
30 views

Autocompletion doesn't work when using ALE + deoplete

From my init.vim (I've checked that it doesn't work even with a minimal configuration): call plug#begin() Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'dense-analysis/ale' Plug '...
0
votes
1answer
20 views

vim: can non active tab being completely hidden, no headers show /c/e/n alike

When open multiple tabs, it will show in the topmost line something /c/e/n... alike. But I already has filename and &modified in status line, which just waste space then. Also I find that line ...
0
votes
1answer
29 views

Override longer mappings

Is there a way to trigger a certain short mapping i.e. \c without waiting to see if there is a longer one that starts with the same characters (effectively disabling all other overlapping mappings)?
0
votes
0answers
14 views

cannot build with x on centos

I installed the x11 libs with: yum install ncurses-devel libX11-devel xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps When I tried to build vim from source: ./configure --with-features=huge --...
1
vote
1answer
71 views

Operator Modifier

I have been using vim mode for atom for quite a while, recently I've been trying to switch to nvim, but I can't seem to find a way to replicate the operator modifiers behaviour, which I've come to ...
0
votes
0answers
27 views

What is the “stuck text” that happens on my screen as a byproduct of a plugin? How can I remove it?

When I'm using Vim in the terminal, I sometimes get stuff like this: The square bracket floating is what I'm talking about. When my autocompleter plugin stops completing, sometimes it "forgets" to ...

15 30 50 per page