All Questions

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

gvim: List all options for guifont as text?

I know that I can use the GUI to navigate to the panel for setting guifont, and I can also issue :set guifont=*. Is there a way to list all options as text? I would like to capture them in a ...
0
votes
1answer
8 views

Set CoC nodejs path dynamically

Currently for CoC I am setting the nodejs path like this: let g:coc_node_path = '/usr/local/.nvm/versions/node/v12.4.0/bin/node' But I want this variable to be set to the output of which node. How ...
1
vote
0answers
15 views

How to override ftplugin set commands in Neovim

One thing I hate about a lot of the default Vim plugins is that they add o to formatoptions. I Vim I would get around this by using au FileType * set formatoptions-=o in my vimrc, but for some reason ...
1
vote
1answer
15 views

Can I make left Alt act the same as shift key using key map?

So I would like to swap my left shift key with my left alt key, and I would like to know if it’s possible to achieve with vim key mapping? Maybe not swapping but copy the whole shift key map to alt?
0
votes
1answer
21 views

FileType autocommand not working in Neovim

My init.vim is just au FileType * echom "test" However, if I open a file, neovim-qt will not echo test. If I load a new file while the window is open, it will also not work. I have managed to find ...
0
votes
1answer
89 views

Cannot remove spelling error highlight from lowercase “vim”

The word "vim" is flagged as a spelling error in my documents. If I capitalize it, the error goes away. I don't want to capitalize "vim". Adding it to dictionary with zG or zg does not help. UPDATE ...
3
votes
1answer
16 views

ctermbg and ctermfg are backwards or incorrect for certain highlighting groups

I am currently attempting to create a custom colorscheme for vim by using ctermfg and ctermbg values, and checking what the colorscheme looks like with the highlight test file provided by Vim. What I ...
3
votes
2answers
279 views

How to build nvim to has_perl?

I am on macOS. My ultimate goal is to speed up dbext.vim and I found the page mentioned DBI which depends on has('perl'). So I'd like to know how to build Neovim to have Perl enabled... Now I am ...
2
votes
1answer
65 views

Why colorscheme is re-loaded if vimrc is located in $VIM?

I ran into a problem with cursor color being reset when using gruvbox color scheme on both Linux and Windows. During debugging I discovered that the color scheme is reloaded if vimrc is located in $...
0
votes
0answers
21 views

Ins-completion C-X C-F and the path variable

Can the insert-completion of file names CTRL+XCTRL+F can be used to complete filenames that are not in the current working directory ? But rather in any in the path variable ? Can we, for example, ...
0
votes
2answers
41 views

How to delete a character that is present between two specific character from every line in VIM?

I have a CSV file in which data in a row are present in following way: ID, Name, State, Score, Rank In the Name Column, data are in " some Name" form. But there are many entries in which a comma is ...
0
votes
0answers
32 views

How to get internal terminal's current dir name in vim?

I would like to start editing some files in dir to which I've switched in internal vim terminal. But I do not like to open nested vim inside this term. If I work in same dir in which I've opened vim, ...
1
vote
1answer
27 views

Switching arrow key mappings for wildmenu tab completion

When wanting to edit another file, I'm a big fan of typing :e then tab (or a few characters before) to see the wildmenu pop up. Problem is that the way it works, arrows keys up and down go 'down' ...
1
vote
0answers
29 views

How to visually scroll one line at the time with long lines? [duplicate]

Not even sure I can describe this well, but I work in markdown with one line per paragraph, due to some issues that are outside of my control, and i would like the screen to scroll down following the ...
1
vote
0answers
34 views

How do I prevent Vim from showing my terminal when executing an external command?

I'm running a long, blocking command using execute in Vim as part of a script. Vim shows the underlying terminal while executing the command, which is pretty distracting. function! DoSomething(query) ...
0
votes
0answers
23 views

Lose hlsearch when using with vim-fuzzysearch

I'm using this plugin: vim-fuzzysearch. When I have long file (I need to press ctrl-f/ctrl-b to scroll) Steps to produces: 1. Turn on `hlsearch` + vim-fuzzysearch and search for a keyword 2. ...
2
votes
1answer
69 views

Settings for the font in .vimrc are not working

Following the answers in I have tried many varieties of setting the font size and face in ~/.vimrc . None of them have any effect set guifont=Menlo:h12 set guifont=Monaco:h12 set guifont=Menlo\ ...
8
votes
1answer
266 views

vim ZZ lost output with autocommand

I want to check file before quitinq vim with custom functions, everything seems fine with QuitPre autocommand except using ZZ to exit. In this case the output is missing. Consider following function ...
9
votes
1answer
510 views

Is there a setting to force a hanging indent on bulleted/numbered lists WITHOUT hard wrapping?

Basically, I'd like to have long entries for bulleted / numbered lists that automatically indent like so: 1. Congress shall make no law respecting an establishment of religion, or prohibiting the ...
317
votes
11answers
267k views

How can I copy text to the system clipboard from Vim?

Is there a way to copy a block of text to the system clipboard, so I can paste it in another program?
4
votes
1answer
93 views

Parsing winlayout() For Toggling Multiple Windows At Once

When working in vim, I like to have a toggle-able terminal window that I can bring with me from tab to tab. This works by tracking a buffer, and opening it in a new bot split (if it isn't visible), or ...
0
votes
1answer
59 views

How can I decide whether a file can be opened in VIm or not?

I want to make a script with FZF (Fuzzy Finder) and I want to show only those file which can be opened with VIM. So, I don't want to list mp4, jpg, pdf etc files in FZF. So, is there any way to ...
2
votes
2answers
55 views

Do not delay mapped keys with common prefix

What I want to do is have two mappings. One mapped to <s-k>, and one mapped to <s-k><s-k>. What happens right now is that if I press <s-k> vim delays for timeoutlenms, and if ...
1
vote
1answer
25 views

How to turn on airline theme's background in vim?

I just started using vim and I installed tpope/vim-pathogen and then vim-airline/vim-airline-themes plugin to use these themes. Then I changed my .vimrc to set up the papercolor theme, powerline fonts ...
1
vote
2answers
262 views

Duplicate single char with the shortest keys combinations

Lets say I have "string" and I want to dupplicate the double quotes. What is the shortest way to do it?. I have done a search of double quotes using /". Then I navigate to the different occurences ...
26
votes
2answers
10k views

How do I get the name and extension of the current file?

Is there a way to get the name and extension of a file using vimscript? If so I would like the name and extension separately.
1
vote
2answers
1k views

How can I make the Neovim terminal run the current file in Python?

I know there'a probably a plugin for that, but since Neovim has a built-in terminal I wanna use it. I just want to bind a key that runs the current file in Python 3. I tried using @% and %, but the ...
1
vote
0answers
22 views

Problem copying form vim to system clipboard [duplicate]

I usually do this with "*y (from visual mode), but on the linux box I'm working with (lubuntu) when I press * after " in visual mode, vim doesn't insert * (it just ignores the whole "*). If I check * ...
3
votes
2answers
78 views

Howto enable only one plugin to test?

I need to test a vim plugin. The problem: I already have my vim setup in current env, so ~/.vimrc is occupied. I want to issue a command like vim -u <blah..blah> that maybe specifies the plugin ...
0
votes
1answer
18 views

Prioritize TabNine autosuggestion over Intelephense with Coc

I am trying to configure TabNine and Intelephense with coc. I like the autosuggestions offered by TabNine. But Intelephense plugin is enabled, I am seeing suggestions from only Intelephense and not ...
2
votes
1answer
109 views

Syntax region only if at top of file

I have a syntax I'm trying do make. It's yaml embedded in markdown for use with Hugo. The yaml region is enclosed by --- and this must be at the top of the file. --- [yaml front matter stuff] . . . --...
1
vote
1answer
41 views

How to show the name of a help buffer in the tabline of the airline?

I use :h command to open a help buffer. When I switch to other buffers, I can't go back to the opened help buffer. How can I show the name of a help buffer in the tabline of the airline?
0
votes
1answer
42 views

Is it possible to disable the “nowrap” option on pymode?

I installed pymode plugin but it overrides my default setting (set wrap). According to :verbose set wrap?, the option is set by pymode. However, I'm not sure if it is possible to override the setting....
1
vote
2answers
33 views

How to start search `/` from a mapping?

I'm trying to do the following mapping in my vimrc: nnoremap <silent> / :call <SID>FooFunction()<CR><BAR>norm! / But when I press /, instead of running the function and then ...
1
vote
1answer
35 views

Search backward for first line not matching a pattern?

Is there a way search backward from the cursor for a line that doesn't contain a pattern? For example, many of my lines match the regular expression ^ adding: \i\+. I want to find the first line ...
0
votes
1answer
61 views

fzf vim - when configured to display filenames of matched items, how to filter on just content and not the file names

I've configured my .vimrc file for GGrep: command! -bang -nargs=* GGrep \ call fzf#vim#grep( \ ('git grep -i --line-number '.(isdirectory(expand(".git"))?'--untracked ':'--no-index '))....
0
votes
1answer
59 views

How to ident the cursor to the indentation of the above or below line?

I want to move the cursor to the indentation of the line above or below. As seen from the example below, when I move the cursor down (j), it goes to the start of the line. This is both true for ...
4
votes
0answers
41 views

VIMDIFF missing small differences

I have two nearly identical very large files (890,000+ rows of exactly 899 characters each fixed length file). On rows 289141-289148 one file has a pipe character in column 38, and the other file has ...
3
votes
2answers
51 views

Ctrl-6 doesn't switch to the last buffer (Neovim)

Just noticed that this doesn't work for me. I have to hit Ctrl-Shift-6 (Ctrl-^) to activate the shortcut. Launching up my Vim it worked just fine so it's not something weird going on with my machine. ...
2
votes
1answer
212 views

autocompletion - How to add phrases as thesaurus synonyms

I have a thesaurus file which contains synonyms for the word iterate. I would like to add an alternative phrase for iterate like loop over so I added it to the thesaurus. Unfortunately, this doesn't ...
0
votes
1answer
19 views

Rename neovim terminal buffer without breaking :mksession

Is there a "good" way to rename the terminal buffer in neovim? I know that renaming is possible with the :file command, and that works fine for current session. The problem with this approach is ...
5
votes
1answer
90 views

job_start() command only works with seemingly random job options

I am getting some unexpected behavior when trying to run the zip shell command using Vim's job_start(). As an example, suppose I have two images (im1.png and im2.jpg) in the directory /home/username/...
1
vote
1answer
25 views

how to stop vim from shortening window title to terminal width?

after some tinkering with xprop and window resizing, I'm almost certain it's (neo)vim, not the terminal emulator or the window manager that's shortening the x11 window title name (one of these x11 ...
0
votes
0answers
23 views

How to display NERDtree buffer in a floating window

Thanks to a comment on reddit I was able to move my FZF search to a floating window and whilst it looks cool my main gain was that it's faster or at least it feels faster because it's no longer ...
1
vote
1answer
31 views

Why does :! open -a terminal or :! start cmd create totally new “applications”?

Edit: on Windows, looks like it's opening in sysWOW64 instead of system32. Any ideas why? Title. Basically, both of these commands are supposed to open a new console, the former on my mac and the ...
0
votes
1answer
47 views

Is there a way to change the message “press ENTER or type command to continue” to something else?

I would like to change it to make something like a separator between !python % Change this(my computer is in spanish): To something like: Hello World --------------- Hello World --------------- ...
2
votes
1answer
71 views

How can I use a plugin mapping in my own mapping?

I often repeat the following commands when I edit code: yy - yank the line gcc - comment out the line (so that I can visually see all the changes later) p - paste back the copied version what I will ...
0
votes
0answers
25 views

Don't highlight entire line for highlight group

I'd like to change the highlight colors for the QuickFixLine highlight group (something like highlight QuickFixLine term=reverse ctermbg=DarkGrey). Sidenote: the QuickFixLine highlight group is the ...
1
vote
0answers
23 views

gVim 8.2, display problem

I have a weird problem with VIM, both at work and at home (2 different computers): When I open a text in VIM, sometimes it is displaying it correctly, sometime not (I'd say 1 every 3 it works fine, ...
8
votes
1answer
339 views

Dealing with case insensitive filenames on Windows

I'm using the latest vim/gvim (8.0.118), but have noticed this problem in the past, with other versions. I created a file named fizzbuzz.java (outside of gvim), and opened it in a new tab in gvim on ...

15 30 50 per page