Author |
Topic |
|
ivan
Ketchup Master
Russia
75 Posts |
Posted - Aug 15 2004 : 09:23:05 AM
|
Suppose I have a following piece of code:
const char * psz = "\this is \a multiline string";
If I cut the 2 lines starting from 'this is' and then paste them back, they get indented, so the string gets several tabs inserted into it. I think VA X should recognize such situations... |
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Aug 15 2004 : 09:28:44 AM
|
This is not a issue of VAX, but VS. VAX does not format your code, but your IDE does. |
|
|
ivan
Ketchup Master
Russia
75 Posts |
Posted - Aug 15 2004 : 09:53:01 AM
|
Damn, for some reason I thought it was VAX formatting code after paste. Guess I've been using it for too long ;)
Okay, in that case I'm curious if it's possible to teach VAX to fix it. Maybe this belongs to the 'suggestions' forum, though. |
|
|
Ondrej Spanel
Senior Member
40 Posts |
Posted - Aug 16 2004 : 06:39:07 AM
|
quote: Originally posted by Uniwares
This is not a issue of VAX, but VS. VAX does not format your code, but your IDE does.
I think WAX does it - there is a VAX option Format after Paste in Text Editor/C++ category.
|
|
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Aug 16 2004 : 06:46:46 AM
|
VA X just calls IDE formating engine after paste. |
Cezariusz Marek https://midicat.net/ |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Aug 16 2004 : 06:52:04 AM
|
Lots of people get confused about this. Maybe the text could be reworded to make it clearer that the IDE is doing the formatting. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Aug 16 2004 : 07:01:22 AM
|
quote: Originally posted by ivan
Okay, in that case I'm curious if it's possible to teach VAX to fix it. Maybe this belongs to the 'suggestions' forum, though.
this has been requested before. it doesn't look likely, since the whole question of how to format code is a very personal thing. imagine the number of options to satisfy everyone still, it would be nice
you may want to check out GC, which is a free tool to format your C and C++ code. |
zen is the art of being at one with the two'ness |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Aug 16 2004 : 07:52:57 AM
|
I agree that VAX shouldn't try and format code to satisfy everyone's personal styles, but ivan's example is not in that category. His code is reformatted in such a way that it is syntactically different afterwards, which is a clear bug. Now it's a VS bug, not a VA bug, and I'm not sure that VA should get into fixing it. But it's not the usual request. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Aug 16 2004 : 08:40:24 AM
|
very true, i didnt read the first post as carefully as i should have |
zen is the art of being at one with the two'ness |
|
|
ivan
Ketchup Master
Russia
75 Posts |
Posted - Aug 16 2004 : 6:03:07 PM
|
Oh well, I can live with it. In a couple of days I'll be done with those obnoxiously long sql query strings anyway, and then maybe they'll fix it in VS 2005.
"Writing a code formatting tool that satisfies everyone's personal styles"... what a horrifying thought. Programmers who demand such tools from other programmers should be neutered. ;) |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Aug 17 2004 : 05:51:34 AM
|
when i write very long SQL queries i format them like this:
char szBuffer[200];
sprintf(szBuffer, "SELECT * FROM"
" main_table WHERE"
" record_number=25"); this way i dont have to worry about the effects of indenting. really down to personal preference though.
i am pleased to report the code formatting tool already exists under UNIX, long live vim
in fact, if it wasnt for VAX, i would still be writing my windows code in vim for windows |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
|
|
Topic |
|