Dear All, How to automatically reformat our code in µVision2 ? so that the code will have proper tabs to view it nicely. I have µVision2 V2.20a, but I can not find it. I only find "Go to matching brace" which is very useful too of course. I see this reformat feature in a freeware c editor/compiler such this http://www.cs.virginia.edu/~lcc-win32/ thanks
"How to automatically reformat our code in µVision2 ? so that the code will have proper tabs to view it nicely." uVision doesn't re-format existing code - you need a 3rd party tool to do that. However, it can auto-indent new code as you write - see the Manual for details. You have read the Getting Started Guide, haven't you...? PS: Avoid TABs - use only spaces. The interpretation of TABs is entirely application-dependant - if you format with TABs in uVision, you have no guarantee whatsoever that it will look right in any other application or printout. But you know where you are with spaces. Avoid TABs.
Avoid TABs - use only spaces. The interpretation of TABs is entirely application-dependant are you saying that the Keil editor does not have the "replace tabs with spaces" feature? Erik
"are you saying that the Keil editor does not have the 'replace tabs with spaces' feature?" I don't think it has a specific function to replace existing TABs with spaces, but it can (and, I say, should) be set to insert spaces when you press the TAB key. (I would use CodeWright to replace existing TABs, if required...)
Yes it has. There are plenty of new features in uVision3. Select the text, right mouse click on it -> Advanced -> Untabify selection. This should replace all tabs with spaces, however it will use the tab settings from Configuration -> Editor -> Tab size. Franc
"There are plenty of new features in uVision3" The OP was asking specifically about uVision-2. I think this feature is not present in UV2? The 8051 tools still ship with UV2, and I seem to remember that adding UV3 was not entirely straightforward... :-(
Wrong Andy; You can download uV3 from the Keil website. Install uV3 and you can still select either uV3 or uV2 to start your project. My last update from Keil included uV3 as an option. Also, you can download CARM or PK166 eval that contains uV3. Either eval will install uV3 and it will be available to PK51. You are right, the advanced edit features of uV3 are not available in uV2.
"You can download uV3 from the Keil website." That was my point: it's not (well, it wasn't) included with the C51 package - you had to download it separately, and then install it separately. Having done that, I think it was some of the Help/Books features that didn't work properly - it was looking in the wrong folders, or something. Maybe it's all fixed now...