Community Digest

Top new questions this week:

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 ...

external-command job-control  
asked by wxyz 5 votes
answered by wxyz 5 votes

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 ...

terminal colorscheme statusline color  
asked by Dmitry S. 3 votes
answered by filbranden 2 votes

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 ...

vimrc key-bindings vimscript  
asked by Max Coplan 2 votes
answered by Rich 3 votes

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] . . . ...

syntax-highlighting  
asked by James Wright 2 votes
answered by Rich 4 votes

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 ...

key-bindings plugin-vim-commentary  
asked by Horror Vacui 2 votes
answered by Maxim Kim 4 votes

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 ...

vimrc neovim autocmd neovim-qt  
asked by Mason 1 vote

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?

vimrc key-bindings keyboard-layout  
asked by Andrew.Wolphoe 1 vote
answered by Ed Grimm 0 votes

Greatest hits from previous weeks:

How can I integrate gdb with Vim?

Instead of gdbtui or ctrl+x under gdb which shows source code on top of the screen I would like to see this in my Vim editor that would jump between tabs, and buffers accordingly. How can I do this?

external-command ide  
asked by name 55 votes
answered by viccuad 35 votes

How to jump between matching HTML/XML tags?

How to jump between matching tags (such as <div>, <span>, etc.) when editing HTML/XHTML/XML documents similarly as % is used to jump between matching parentheses?

cursor-movement delimiter-matching filetype-xml filetype-html  
asked by kenorb 46 votes
answered by Tom 45 votes

How can I see the full path of the current file?

When I'm editing a file in Vim, is there a command to see the path of the current file? Sometimes this is very handy if there are multiple files with the same name in a project.

statusline  
asked by thameera 131 votes
answered by thameera 151 votes

Show only matching lines?

In a long file, I would like to search for a pattern that will match roughly 200 lines or so. The matched lines are in random places in the file. When a line matches, only the line itself is relevant, ...

search  
asked by Volker Siegel 34 votes
answered by Zach Ingbretsen 37 votes

What is the difference between the vim plugin managers?

I have been looking at the different package managers for vim and the one I decided to use vim-plug but I have seen others like pathogen and vundle and I honestly don't know what the difference is. ...

plugin-managers  
asked by ZucchiniZe 210 votes
answered by gjg 151 votes

How can I rename the file I'm editing?

Is it possible to rename the file I'm editing from within Vim? Currently what I do is exit Vim, rename the file and open from Vim again.

save file-operations  
asked by thameera 42 votes
answered by OrangeTux 41 votes

How do I stop recording while in command line?

When I am recording a macro with q and I am done, I can type: q to stop recording if I am in normal or visual mode. <c-o>q to stop recording if I am in insert mode. .. How do I stop recording ...

command-line register macro  
asked by iago-lito 20 votes
answered by fflorent 13 votes

Can you answer this question?

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) ...

terminal external-command  
asked by Martín Fixman 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