Community Digest

Top new questions this week:

Set line length for gq without affecting typing

I recently discovered that I can use gq} instead of !}fmt to break up long paragraphs into lines. This works great. Unfortunately, I ran into a bit of a problem. GNU fmt uses a default max line width ...

asked by John 7 votes
answered by B Layer 5 votes

Why do some Ex commands not need a white space before a path argument?

For example, why does this work: edit/home/foo/bar.txt (I had to enter visual to see the changes) I was expecting a whitespace after edit, like: edit /home/foo/bar.txt I couldn't find a reference in ...

command-line ex-mode whitespace filenames  
asked by anakimluke 4 votes
answered by Matt 3 votes

GUI support will not compile in latest from github

I'm using CentOS 7.5. I just did a git pull in my clone of the vim repo to the latest: last tag v8.2.2340. I'm trying to compile. No matter what I do, it will not compile for the GUI (which it's ...

gvim linux compile-vim  
asked by Andrew Falanga 3 votes

Vim Terminal interferes with statusline

I am editing a lot of files with Vim, and I have the following in my .vimrc to help me stay oriented as to which file I am in: " Add file name to statusline so we know where we are in the ...

terminal statusline  
asked by Aleksey Tsalolikhin 2 votes
answered by Matt 1 vote

Why does this pattern make :global work only on the first line of the highligted match?

\/\*.*\(\n\s\*.*\)*\n\s\*\/ is a pattern which I cooked up to match some multi-line C comments, i.e., in the format of: /* Comment Text * Comment Text * Comment Text */ Searching for the pattern ...

regular-expression comments global-command cygwin  
asked by Monke 1 vote
answered by Pak 1 vote

Is it possible to detect a highlighted search match with synIDattr() or similar?

When I have hlsearch on and my cursor is somewhere in a highlighted search match, is it possible to detect the search highlight hl-Search with synIDattr() or a similar function? As far as I can tell ...

syntax-highlighting search highlight  
asked by Andy Stewart 1 vote

What are the acceptable values for termwinkey?

What are the acceptable values for termwinkey? From VIM's documentation, it appears that any single keystroke (multi-byte or not) should be valid. However, setting it to <D-'> (my first choice) ...

key-bindings terminal macvim  
asked by Mark Wilbur 1 vote

Greatest hits from previous weeks:

How to add space on multiple lines when pressing spacebar (without extra configuration)?

I tried visual block, but visual block only allow to highlight or delete characters on multiple lines. Is there any function that allows to add space before the first character of multiple lines when ...

insert-mode visual-mode replace  
asked by ggrr 10 votes

How to switch between buffer and terminal

I have a vim's buffer and a terminal in the same vim's window but each time switch to terminal I can only exit it to go back to vim's buffer, Is there a way to keep terminal session but be able to ...

vim-windows terminal-buffer  
asked by Tuyen Pham 6 votes
answered by Tuyen Pham 9 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 54 votes
answered by Tom 49 votes

Installing or building vim with +python3 support for Python 3.7.x on linux

I've got Vim installed on MacOS using Brew and it installs with +python3 support for Python 3.7.2 by default. I'm writing a Vim plugin which utilises some Python 3.7 and would like this to be able to ...

asked by Willem van Ketwich 13 votes
answered by João A. Toledo 11 votes

How to replace tabs with spaces?

Is it possible to convert tabs to spaces, while maintaining text alignment? Simply replacing only works usefully when there are no leading characters.

indentation tab-characters  
asked by ideasman42 107 votes
answered by guillem 121 votes

How can I find out what <Leader> is set to? And is it possible to remap <Leader>?

How can I figure out which key is set as my <Leader>, and how do I remap it?

asked by krampstudio 81 votes
answered by OrangeTux 79 votes

What is the purpose of swap files?

When I edit files, Vim tends to create files named .filename.swp, which I find annoying. From vim -h, I see that the -n option suppresses the creation of swap files. Is there a vimrc directive that ...

vimrc crash-recovery swap-file  
asked by 200_success 91 votes
answered by jamessan 105 votes

Can you answer this question?

Partial abbreviations

Pretty new to vim so this might be a basic question. I am trying to construct an abbreviation such that only part of a word gets corrected. For instance abcPRops====gets=corrected=to===> abcProps ...

vimrc neovim nvim  
asked by Nahush Farkande 1 vote
answered by Luc Hermitte 0 votes
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