Community Digest

Top new questions this week:

Yanking results displayed in status line

After pressing <C-g> in normal mode, prints useful information in the status line. How can I yank this text?

key-bindings cut-copy-paste  
asked by Zach Wiebesiek Score of 5
answered by filbranden Score of 3

Is it possible to break out of nested loops?

Say I have a nested loop, is there a way to break out of the outer loop from the inner one? For example this code: for i in range(3) for j in range(5) echo i j if i == 1 && ...

asked by Jake Score of 5
answered by Mass Score of 4

The way to excute same command in command-line mode multiple times

I'm recently working on a project in vim, and I need to execute the same command in command-line mode multiple times to different files which are in the same folder. like :%s/V1/V2/g Is there a ...

command-line multiple-files  
asked by Daybreak Texas Score of 3
answered by D. Ben Knoble Score of 6

Check if VimPlug is installed in .vimrc

I'm trying to have a .vimrc that is portable between machines. Some computers I use have VimPlugin installed, while others don't. On the ones with VimPlug, I'd like to do some setup using call plug#...

vimrc plugin-vim-plug  
asked by drcomputer Score of 1
answered by TornaxO7 Score of 1

Is there a way to restore a previous version of file in vim

I had a swp file with old content, to which I restored and wasted much cleaning it. So I would like much such feature. Jetbrains's IDEs have feature local history: Which preserve history for ...

asked by Intolighter Score of 1
answered by Vivian De Smedt Score of 1

A multiple movement of the cursor

For example the code below, 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa The arrow key moves the cursor from one character to the left, ...

asked by Hyunsoo Score of 1
answered by Vivian De Smedt Score of 2

Why zc fold all the sections at the first time?

I have just the following two lines in ~/vimrc to set vim's foldmethod to marker. I do not want all sections are collapsed when the document is opened. So I use nofoldenable to open all marked ...

asked by midnite Score of 1

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 Score of 65
answered by viccuad Score of 37

Exit from Terminal mode in Neovim/Vim 8

I can't figure out how to go back to Normal mode after entering Terminal in Insert mode... Escape just doesn't seem to work. Any idea?

neovim terminal-buffer  
asked by Stephane Rolland Score of 108
answered by romainl Score of 117

What is the difference between autoindent and smartindent in vimrc?

I read the wiki entry on vim source code indentation I still can't understand the difference between autoindent and smartindent It seems they do the same thing, copy the indentation level to next ...

asked by Aaron Shen Score of 51
answered by guntbert Score of 41

How to automatically turn off "hlsearch" after I'm done searching?

I love the "hlsearch" setting, but after I'm done searching, I find it obnoxious. Especially if I search for something that has a lot of matches. I know that I can turn this off with :set nohlsearch ...

search highlight  
asked by DJMcMayhem Score of 33
answered by DJMcMayhem Score of 38

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.

asked by thameera Score of 221
answered by thameera Score of 262

How can I yank (copy) the single character on which the cursor rests?

I know many ways to copy things: yiw = yank in current word yaw = yank all word (includes a trailing space) yy = yank the current line 3yy = yank three lines starting at the current one yap = yank ...

asked by Christopher Bottoms Score of 86
answered by VanLaser Score of 85

How to adjust gVim to my HiDPI display scaling on Windows 10?

Being a user of GUI editors (mostly Sublime Text) and one simple CLI editor (nano), and just having gVim (the GUI version of vim) installed on my Windows 10, I can't figure out how to adjust this ...

gvim microsoft-windows  
asked by LinuxSecurityFreak Score of 13
answered by wl2776 Score of 20
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