15
submitted 8 months ago* (last edited 8 months ago) by indigomirage@lemmy.ca to c/linux@lemmy.ml

Hi There - I wanted to ask a question that I've asked previously, but adding a gif to illustrate what I'm trying to say.

https://lemmy.ca/pictrs/image/d50caca3-d2c3-4d9e-b8f4-3e30ce828017.webm

Is there a plugin that could accomplish this?

Cheers!   (Previous post) https://lemmy.ca/post/15305808

Hi there - I’m trying to dive into neovim and I can’t figure out how to do a certain thing in visual block mode…

Is there a way to extend a cursor/block column down from a long line through a series of shorter lines such that the short lines extend to meet the cursor (thus letting you enter text all in a column)? All I can seem to get it to do is have the cursor go to the end of each line, leaving a set of entry points staggered over a different column positions.

I think the feature I want is called Virtual Space, but I’m not sure. I am sure, however, that I use this feature extensively in Ultra Edit and Notepad++ (and mssql mgmt studio and visual studio but not vscode!)

Is there an add on? A plugin? (bonus points if the entry points remain highlighted once going into insert mode after the block is selected?) I’ve seen suggestions to try using the ‘virtualedit’ setting, but unfortunately, this doesn’t seem to solve the issue. It only adds text to lines that are already of length greater or equal to the column position of the block selection. Unless I’m missing something.

(Adding a link to a vscode issue begging for the same feature. It might help illustrate the concept. - https://github.com/microsoft/vscode/issues/13960 )

Would be grateful for help here. (bonus points is there’s a way to keep the cursor highlighted after the shift to insert mode…)

all 5 comments
sorted by: hot top controversial new old
[-] erer@lemm.ee 7 points 8 months ago

Ctrl-V is to enter vertical visual mode. After selection use Shift-I to insert the text. It will look like you are only inserting in one row but after exiting insert mode, esc, it will apply the changes in all selected rows.

[-] indigomirage@lemmy.ca 4 points 8 months ago

Ah. So no option with visual feedback..? Wonder if a plugin exists that can help there.

[-] eveninghere@beehaw.org 2 points 8 months ago

You might be interested in :set virtualedit+=block. Use +=.

https://stackoverflow.com/a/10776734

[-] indigomirage@lemmy.ca 1 points 8 months ago

Hi there - I'm fairly certain I've tried this but it doesn't give the desired visual feedback you get with multi-cursors or in the example I'm showing.

this post was submitted on 10 Apr 2024
15 points (89.5% liked)

Linux

48691 readers
1502 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS