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.
  • Ugh. Joe I was using SQL query language. Changing to C# fixes the behavior so thanks for that! :smiley:

    With that said, please consider implementing the same behavior for the closing braces, brackets, parens, etc. Thanks again.

    --Greg
  • VG
    should select the current line and all following lines, but it misses the last line of the file. Using the mouse to select text, vi thinks I'm in insert mode when I hit y for yank it instead overwrites the block with a y
  • Thanks for the heads-up. VG should now work correctly in the new beta.
  • Not sure what's going on here but this is weird. Starting with this text:

    string tsSymbol;
    double newValue;

    tsSymbol = "xxxxxxxx Index"; newValue = 157.1750;

    navigate to start of "tsSymbol =" line. Type: "f7cf;" The "7.1750;" text is deleted but the cursor is left between the remaining 1 and 5. It should be after the 5.

    Any plans to include vi editing in an upcoming release? As always, thanks for all your work on LINQPad.
  • Any chance we can choose a remapping for escape from insert mode? I am grateful for the "kj" mapping, but I've been a "jk" user for a long time and it's hard to transition.

    Also, is there a way to turn off LINQPad's ctrl-[ mapping (surround with brackets)? This is an alias for ESC in vim (and unix tty in general).

    Love vi in LINQPad. Thanks for all your hard work!
  • I downloaded the zip version of Linqpad 5 to take a look at the vi emulator which is really nice. When I disabled vi in Preferences, the soft and glassy edges of the Execute, Cancel buttons and Language, Connections boxes didn't change back to the original glassy style with curved buttons. I tried deleting the Linqpad files from %appdata% and %appdata% Temp but that didn't reset the style. Is there another file that I should delete or config file that I change to reset the look of the buttons to the glassy look?

    Thanks in adavance.
  • This sounds like something weird has occurred, such as your running low on memory or a hardware/OS failure. Have you tried restarting your machine?
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!