vi mode - experimental build

2»

Comments

  • I agree that there is no "correct" behavior in this case, because vi was designed for use without a mouse or shift-arrow combinations. I experimented with both options when writing the emulator and in the end settled for it behaving like a windows editor when using mouse or windows-style shift+arrow combinations (which is also how the vi plug-in for Visual Studio Code works). I think it makes sense because the biggest use-case for the mouse and shift+arrows is not those already intimate with vi, who would instead type something like /bob, but users transitioning to vi, whose would use the mouse and shift+arrow combinations (followed by overwriting with new text) out of muscle memory. Being in that category myself, I found the other behavior so annoying that I would never attempt to transition.

    Bear in mind that visual mode works as in vim, so if you type vwy, that will yank a work.
  • Which Visual Studio vi plug-in are you using? I'm using VsVim (https://marketplace.visualstudio.com/items?itemName=JaredParMSFT.VsVim).

    As for what folks intimate with vi would do, I think the jury is out. I've been using vi since transitioning from ed in the late '70s. On a dumb terminal (emulator since no actual dumb terminals exist anymore) connected to a unix system, yes I'd type /bob. In VS, I use ReSharper's ^T navigation a lot but just as often, if I see a bit of code I want to edit I'll navigate with the mouse.

    I'll keep a more careful eye on the differences between gvim, VsVim and the LINQPad emulation. Playing some more it appears a single click navigation is the same so maybe some of my issue is caused by double clicking to select vs simple navigation.

    Thanks,
    -Vic
  • Another search issue: there is no support for escaping characters or beginning of line. I see there is a search support for end of line:

    void Main()
    {
    Console.WriteLine("Bork");
    Bork();
    }

    static void Bork()
    {
    Console.WriteLine("Bork bork");
    }
    // Define other methods and classes here

    -----
    My specific searches are (no quotes):
    "/\/\/" - find the "//" comment
    "/^static" - find the "static" at the beginning of the line
    "/e$" - finds "here"
    "/;$" - does not find ; at EOL
    "/\;$" - finds ; at EOL (so escaping works for some characters, though I can't remember ever escaping ";").
    "/\e" - doesn't find "e"

    -Vic

  • Thanks Vic, will fix for next build.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!