Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Improve IntelliSense feature request
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

msew
Ketchup Master

94 Posts

Posted - Dec 18 2004 :  9:38:26 PM  Show Profile
So in the never ending quest to make all text editors more like xemacs :-)

I have done: tools->options->environment->keyboard

then selected

Edit.FormatSelection

and set the Shortcut for this command to be TAB!!!


What this does is the emacs way of: hit the tab key and the code will be correctly formatted.

e.g.

while( true }
{
int foo = 0;

}


if you hit tab on the line with the int foo = 0; the code will be moved to be correctly indented.


Good Stuff. Sadly when you do this:

foo->

and the intellisense pops up hitting the tab key no longer works! Guessing because there is no longer a "tab" event being fired.

The question is:


Is it possible to make the intellisense respond from the tab key once the tab key has been remapped?

Or can that control be modified to respond to Edit.FormatSelection in the same way that it responds to the tab key?



VA_X.dll file version 10.1.1287.0
VAOpsWin.dll version 1.2.0.4
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
Single processor







Edited by - msew on Dec 19 2004 03:31:53 AM

jpizzi
Tomato Guru

USA
642 Posts

Posted - Dec 19 2004 :  12:18:48 AM  Show Profile
The example you cite does not require any configuration. If you highlight a line and hit tab, the line is indented by one tabstop. This is standard Visual Studio behavior.

What happens if you want a tab (or several spaces, as I have the editor configured to replace tabs with spaces) in the code somewhere? Does your shortcut cause all tabs to be "eaten"?? I wouldn't like that a bit.

Joe Pizzi
Go to Top of Page

msew
Ketchup Master

94 Posts

Posted - Dec 19 2004 :  03:38:09 AM  Show Profile
quote:
Originally posted by jpizzi

The example you cite does not require any configuration. If you highlight a line and hit tab, the line is indented by one tabstop. This is standard Visual Studio behavior.



right sorry. lack of being able to put spaces or html code to make spaces forced the example to be less clear than it should be. It has been updated now.



quote:

What happens if you want a tab (or several spaces, as I have the editor configured to replace tabs with spaces) in the code somewhere? Does your shortcut cause all tabs to be "eaten"?? I wouldn't like that a bit.



Have you used emacs before? :-) (http://www.xemacs.org) Load up some src code and then move the code all around crazy like. And then hit tab on each line.

This is doing exactly what Visual Studio's FormatSelection is doing.

i.e. if you do: mess up the spacing of your code, select all, edit->advanced->Format Selection (default is ctrl k, ctrl f)

All of your code is properly indented correctly (with what ever number of spaces you have set for each tab stop).



Edited by - msew on Dec 19 2004 03:47:51 AM
Go to Top of Page

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Dec 19 2004 :  2:04:23 PM  Show Profile
Yes, I miss that feature of emacs.

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
Go to Top of Page

msew
Ketchup Master

94 Posts

Posted - Dec 19 2004 :  8:37:55 PM  Show Profile
quote:
Originally posted by Stephen

Yes, I miss that feature of emacs.



well you can "turn it on" with that Edit.FormatSelection :-) You just lose the tab in the intellisense control.

ALSO: Visual Studio 2005 has an emacs mode. So now you can join us in our fervent support for VAX in 2005 :-)

Edited by - msew on Dec 19 2004 8:38:23 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 21 2004 :  10:21:59 AM  Show Profile
personally when i want my code reformatted i select it (many lines at once) and press: CTRL_K + CTRL_F

a lot more ugly than the VIM shortcut of equals to format code, but it works.

with regard to the original question, my guess is that the IDE "eats" tab rather than passing it to the editor. since the editor never sees tab VAX never sees tab.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000