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

  • offspec@lemmy.nicknakin.com
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    Not sure if I totally grok what you’re asking but try Ctrl+v to enter visual block mode or whatever it’s called, navigate down to the line you want to go through, hit Shift+I, type in your junk, then hit escape.

    • indigomirage@lemmy.caOP
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      Unfortunately, that will just skip over the short lines contained within the the block selection, which is exactly what I’m trying not to do (hence the initial question).