Community Digest

Top new questions this week:

how can we put the cursor at mouse pointer

I can use the mouse to highlight, copy and paste text in VIM. So clearly VIM is aware of the mouse. As such it must be possible to get it to put the cursor where the mouse pointer is. Does anybody ...

cursor  
asked by elmclose 3 votes
answered by Martin Tournoij 7 votes

"3 files to edit" after quit from editing multiple files in Vim

I open vim with three files: vim a.txt b.txt c.txt. Then: edit a.txt, save it by :w, switch to b.txt by :n. edit b.txt, save it by :w, switch to c.txt by :n. edit c.txt, save it by :w, and quit vim ...

multiple-files  
asked by Bicheng 3 votes
answered by Quasímodo 6 votes

How to get Vim to show git status in the statusline?

I want to show the git status in the vim statusline, but I can't find any advice on how to do that. The output of git status -s would be fine, or alternatively a single field readout indicating ...

statusline git  
asked by Philip 2 votes
answered by Martin Tournoij 2 votes

custom syntax highlight doesn't match in parentheses

In a custom java syntax file (${HOME}/.vim/syntax/java.vim) I wrote syntax match CommonVar /ret/ highlight CommonVar cterm=bold with the intention display the word ret in bold. I tested it with this ...

syntax-highlighting filetype-java  
asked by quiliup 2 votes

View pylint errors using coc and neovim

For the following code there is an error in the gutter, but I don't know how to view the actual message for it. Similarly here: In the bottom right of the editor are warnings and errors: But I ...

neovim filetype-python plugin-coc plugin-python-mode  
asked by baxx 1 vote

ALE fails to lint or autofix, (executable check - failure)

i have ALE installed with vundle, but none of the linters seem to be executing, neither automatically nor on demand. vim starts with an error from my .vimrc: E121: Undefined variable: ...

plugin-ale  
asked by ludant 1 vote
answered by D. Ben Knoble 2 votes

Change comment char based on filetype

I am playing around with asm, which uses ATT syntax. For the filetype asm, vim is using the comment char ;, though it should be #. How/where can I change the comment char per file type? Note that I am ...

vimscript  
asked by David542 1 vote
answered by Luc Hermitte 1 vote

Greatest hits from previous weeks:

what is the command for "Select All" in vim and VsVim?

How do I select all the content of a file in Vim and VsVim? Like in other editors ctrl+A does the job for select all.

key-bindings  
asked by Armaan 44 votes
answered by SibiCoder 46 votes

Fastest way to switch to a buffer in vim?

One way to select a buffer in vim could be to browse the buffers list, using standard commands as :ls, or with some external plugin / vimscript code to browse a list in a window. Let's say I want to ...

vimrc buffers  
asked by Giorgio Robino 57 votes
answered by Doorknob 62 votes

What does :set background=dark do?

I didn't put color xxx in my .vimrc. So I see this when I first open my .vimrc. :color gives me default here. Then I type :color darcula. And it changes to this. :color gives me darcula here ...

colorscheme  
asked by Michael Ma 42 votes
answered by Rich 36 votes

How do I debug my vimrc file?

I have a problem in Vim, and I think it may be in my vimrc file (or have been told it could be my vimrc file). How do I verify this? If it is my vimrc file, how do I know where exactly the problem ...

vimrc  
asked by Martin Tournoij 85 votes

How do I open a file from another git branch?

I'd like to open a file from another branch in the current git repository. I have seen this SO question, but the suggestions for combining it with Vim are cumbersome (pipe to Vim, open stdin, set ...

git  
asked by muru 40 votes
answered by Peter Rincker 55 votes

What is the Vim8 package feature and how should I use it?

Vim 8 was released today and the release notes mentions a new "package" feature. What is it and how should I use it? Most importantly, does it replace the good old plugin managers?

plugin-system  
asked by statox 126 votes
answered by statox 90 votes

Execute current buffer as bash script from vim

I use vim for bash scripting, and sometimes I write a one-time script. Usually, I don't want to create a new file, make it executable, execute it and then remove it. For instance I open vim and type ...

command-line external-command bash  
asked by St.Antario 27 votes
answered by James 42 votes

Can you answer these questions?

How to format files on save using black with neovim and coc

I'm trying to have python files format on save using black and neovim, with coc. Coc config I have the following coc config: { "coc.preferences.useQuickfixForLocations": true, ...

neovim formatting filetype-python plugin-coc debugging  
asked by baxx 1 vote

Use cases of ":rewind"? How does it differ from ":b1"?

After reading :help :rewind :rew[ind] [++opt] [+cmd] Start editing the first file in the argument list. This fails when changes have been made and Vim does not want to |abandon| the ...

ex-command  
asked by Quasímodo 1 vote
answered by Quasímodo 0 votes

How to scroll down the output of coc help without using the mouse?

When coc prompts with information about what a class / function does there's help to the right, but if I want to scroll down within this help I have to use the mouse. I'm wondering if there's a nicer ...

neovim mouse plugin-coc  
asked by baxx 1 vote
You're receiving this message because you subscribed to the Vi and Vim community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3