Re: "Surround with" and version 2.1
Hi
I upgrade to version 2.1 and now I am unable to use selection of a block and surround with context menu option properly.
the ViEmu take the focus of the label...
is there any workaround or it's a known bug?
You are not logged in. Please login or register.
Hi
I upgrade to version 2.1 and now I am unable to use selection of a block and surround with context menu option properly.
the ViEmu take the focus of the label...
is there any workaround or it's a known bug?
Hi Shafik,
What version of ViEmu did you upgrade from? My guess is that you upgraded from 1.x, and you are accustomed to the old behavior of having ViEmu selection be equivalent to VS selection. In ViEmu 2.x, the visual mode selection is handled internally by ViEmu, and Visual Studio doesn't see a "selection", that's probably why "Surround with" doesn't seem to work.
You can either configure ViEmu to use the 1.x behavior (Tools|Options|ViEmu->"Use Visual Studio Selection for Visual Mode"), or you can keep the current behavior and use the "gS" command before one of these VS commands that requires the selection.
The advantage of the new visual mode is that it can more closely resemble vim's behavior for visual mode: the cursor can appear in the middle of the selection, block selections can be done vim-like even in the presence of word wrap, etc...
Let me know if the steps above are not enough to fix it.
Best regards,
Jon
Hi Jon,
I upgrade from 2.0 to 2.1 and I did try all of the options combinations, the thing is when I am doing "Surround with" (Ctrl+k and Ctrl+S) I get the regular pop of snippets but the delete/backspace and the arrow keys are not working.
so if I need to use the feature I need to disable the VIEmu.
Ah, ok, it's not that it doesn't work or it doesn't enter insert mode, but that the basic keybindings have been lost in the upgrade. It's rare, but this happens some times, depending on the VS start-up sequence. This will be properly fixed in a future release of ViEmu, as soon as I bring the new keypress interception techniques I have implemented for ViEmu/Word & Outlook.
The way to fix it is to restore keybindings and rescan with ViEmu's keyboard management tool. Here are detailed instructions:
--------------------------------------
The source of the problem is that probably ViEmu performed its initial scan & keybinding removal without all the keybindings properly in place, resulting in an incomplete keybindings table (will be fixed in a future release).
This is the way to restore all VS2005 keybindings:
1) Disable ViEmu with Ctrl-Shift-Alt-V (so that there will be no interference afterwards)
2) Go to Tools|Import and Export Settings
3) Select "Reset all settings" and click "Next >"
4) Select a file where to save the current settings, or just "No, just reset settings" if there's nothing really you want to keep just in case
5) Choose the default settings type to which to reset all settings (I use VC++, but it's up to you)
This will restore all settings in VS2005. Now, if you go to a text edit window (ViEmu should keep on disabled), arrows should work fine.
If this is the case, what you have to do now is instruct ViEmu to remove clashing keybindings and save them for automatic management. These are the steps to perform:
1) Go to Tools|Options|ViEmu->Keyboard. There should be a pretty long list on the right hand side list.
2) Click "Save and Remove" under the right hand side list (answer yes to the confirmation msgbox)
After this, you can go back to an edit window and press Ctrl-Shift-Alt-V. Everything should be fine now, and up/down should work in insert mode, both for cursor movement and for Intellisense autocompletion.
Please let me know if something doesn't match my description above, so that we can try to fix whatever the real problem is.
Best regards,
Jon
NGEDIT Software
--------------------------------------
Thanks for the detailed answer (it help me to understand the key binding in vs), but still when the ViEmu is on the Ctrl+K - Ctrl+S is poping the surround with dialog but the arrows change the selection text only and there is no backspace.
I am using the Ctrl+Alt+Shift+V for that and it's fine thanks, but FYI...
by the way really great tool,
Thank you Jon.
Hello Shafik,
I don't understand very well the misbehavior you are seeing. Can you describe it in more detail?
Here is my experience here (I checked "Use VS Selection for Visual Mode" for this to work better):
1) I select a statement (C#), using "v$".
2) I type Ctrl-K, Ctrl-S, a drop down list appears containing "#if", "#region", ... and a banner that says "Surround with". ViEmu has detected it and entered insert mode (although it's not reflected on the status line)
3) I can move up and down with the arrows, or type, to select the type of block. I then press enter and VS2005 enters the block
4) Now, the first field in the inserted "snipped" is selected, I can start typing to overwrite it or use arrows/backspace to edit it
5) Pressing TAB will go to the next field (if there is one), or ESC or ENTER will finish the mode
Let me know how it works in your system.
Regards,
Jon
By the way I am not using any other add-on in visual studio, and I check this behaviour in other pc - the same results.
Until stage 3 all good.
1. If "Use visual studio selection for Visual mode" is checked the only keys that I can type is [a-z] and all other keys like delete/backspace and arrows are frozen (Esc close the popup)
2. If it's unchecked it the same but the arrows change the selection in the background (the snippet popup is on top) again key stroke [a-z] is writing to the popup but no delete or backspace.
this situations are the same when I am in insert mode or visual mode.
Thanx
Ok, that last sentence is the key. It's a core keybindings problem, nothing related to Surround With.
Have you followed the steps in my second answer above to reset VS2005 keybindings? I'm almost sure it will fix it. I thought that you had done it but it didn't get fixed, but now I'm thinking you haven't done it or that some part has not been done as described.
Please let me know if that fixes it.
Best regarsd,
Jon
Yes I did and I even uninstall ViEmu reset setting and reinstall ViEmu and remove clashing keybindings,
and the same results...
My apologies! I will follow up by email and post back here when it's solved.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.
[ Generated in 0.030 seconds, 10 queries executed ]