Does anyone know how to use column mode for editing source code within uVision3 IDE??? I am used to using Jens where I could insert text in a column format defined by the start and stop of the drag of my cursor. I could then right click and insert defined text on all lines simultaneously starting where my cursor orignated to the end of the highlighted segment area in a column format. Can anyone help with this??? I know how to use the Alt key and mouse to highlight text in a column format, but I can find a way to enter text on multiple lines in a column format. This is very annoying.
Alt + drag
http://www.keil.com/support/man/docs/uv4/uv4_ui_seltext.htm
Thank you for the reply, but I am not talking about just selecting text. I want to insert text in a similar format. However, I would like to define the location of the column to start on, then drag to the line where I want to stop at. Then I would like to somehow insert text at this defined location on all lines within the drag highlighted area starting from where the cursor began and stopped.
Which software package?
If you mean uVision, note that there is no reason why you have to use the uVision editor - you can edit your files with any editor you choose, and just use uVision for the build & debug.
You could even set up items on the uVision 'Tools' menu to open a file selected in the uVision Project view in your external editor...
I've done this before with CodeWright.
No, I just mean that I am constrained by the product I am working on. I know that you can do a bunch of extra goofing around to edit files outside of the system and import them back into the project, but this defeats the purpose of the package in one concept: project,editor,compiler,linker, and hex converter all in one. Now you have to go outside to get the features that you want to you. It would be nice for one if a company took into consideration all of the editing features that are used by 99% of the software programming community and design the IDE editing around that. Work-arounds are always possible, but convenience is priceless!
1) What "import back"?
2) No integrated environment will ever be able to match the features of any set of stand-alone tools. A swiss army knife will never match the individual tools.
3) I'm not so sure about 99% of the software programming community in regards to column editing.
edit files outside of the system and import them back into the project
Are you sure you know what you're talking about?
It would be nice for one if a company took into consideration all of the editing features that are used by 99% of the software programming community
And what evidence do you have that your particular feature of choice is actually among those 99%?
That set aside, no, that thing would not be nice. It would be huge to the point of being unusable, particularly for newbies.
For starters, it's quite a waste of manpower if every compiler vendor tries to match that goal on their own. The world doesn't need dozens of different implementations of the complete, all-features-covered, perfect IDE. It needs only one --- and it only took about 20 years for the community to realize that. Eclipse seems to be well on the way to eventually end this waste of effort.
"goofing around to edit files outside of the system and import them back into the project"
There is no "gofing around" - you just open the files in the normal manner in the editor(s) of your choice. Simples. Facilities are available to make that more convenient, if you wish.
There is also no "import back into the project" - uVision (unlike Eclipse) just references the files directly on the hardware. So it make no difference whatsoever whether edits are made with the internal editor, or an external tool.
"this defeats the purpose of the package in one concept"
True, but that is, in practice, an unachievable goal.
If there were one single editor which did everything that everybody wants in the way that everyone likes - well, we'd all be using it, wouldn't we?!
As it is, we all have our own preferences - so no "integrated" product can ever completely please all of the people all of the.
I mostly use the uVision internal editor, simply for the convenience. Sometimes, CodeWright has a specific feature that makes a specific task so much easier, that it's worth separately running-up CodeWright for it. Sometimes there's a task that's easier in Word!
I've found exactly the same with every IDE that I've ever used - including Embarcadero RAD Studio (Delphi/C++ Builder), MS Visual Studio, and Eclipse. This has nothing specifically to do with uVision.
"editing features that are used by 99% of the software programming community"
As I said, I was not previously aware of any editor that offered the feature you describe - let alone used it!
"convenience is priceless"
But the trouble with making such a "do-everything" tool is that the number of configuration options required to please everyone's taste would be so vast as to be unworkable. I think Eclipse epitomises this!
I disagree!
Eclipse seems to me to be a perfect illustration that "It would be huge to the point of being unusable"
Eclipse is so versatile and so configurable that, it seems to me, it's (almost) impossible for any non-specialist to understand!
Building an Eclipse-based IDE seems to need about as much development effort as building a proprietary IDE!
And, when things go awry, there's the doubts as to whether the problem is specific to the particular Eclipse implementation (for the implementor to fix), or part of the Framework (for the Eclipse community to fix).
Oh, and Eclipse does not do any form of column editing - it doesn't even do what uVision does! So, when I'm using an Eclipse-based IDE, I still switch to CodeWright when I want to do column editing!
"It would be nice for one if a company took into consideration all of the editing features that are used by 99% of the software programming community"
that's precisely what the ide does not offer the column editing mode you are looking for: 99% of the software programming community does not use it.
that doesn't mean that nobody uses it. just that there isn't sufficient number of people using it to justify its existence in the ide.
I don't know the actual number, but the consensus here certainly does seem to be that it is not a "mainstream" or "widely-used" feature.
"there isn't sufficient number of people using it to justify its existence in the ide"
It could actually be that it's a sufficiently esoteric feature that the uVision developers hadn't even heard of it - let alone made any specific decision about whether or not to implement it!
I think uVision has many much more pressing deficiencies that ought to be addressed before this one! And these are things that really are common in other tools!
I appreciate all of the help and constructive criticism that I have received as feedback for my post. It seems that of the few people that I have got feedback from do NOT use column editing features. I don't know how you deal with that when you have to write hundreds of lines of code that are similar to the definition of several variables all the way to the level of functions. I would much rather write one line than one hundred, but I guess that's just me. You are right however, I could just copy the text that I want to manipulate and move it to the program that I know can execute column editing and paste it in. It's really not that tough, but it would be nice to have that available within the uVision IDE. In any event, it's still pretty frustrating to buy a software package and get no documentation that identifies all of the editing posibilities. In this case I had to go on a rabbit chase on the web to find out if something was available within the IDE instead of being able to find it within the IDE's documentation.
If you post an example of what you start with, and what editing you need to do, we might be able to give you suggestions what editing we do for similar problems.
If many things needs to work on a large set of variables, I normally use a struct. Then I can create a single variable of that struct at many places, instead of having to create a large number of variables again, and again.
Often, when I see repetitions, I have a strong reason to repackage the code into reusable modules instead of having multiple sets of similar code.
I use column editing quite a bit too. My solution is to edit and build within SlickEdit. The build button in SlickEdit can be configured to call uVision with the -b option to build a project. Errors are redirected to the build window so the error parser can see them. The only time I use uVision is to setup or modify a project. Yes, this is a workaround but it works pretty well for me and sure beats using the uVision editor. I prefer using eclipse with the SlickEdit core plug-in. Hopefully someday Keil will see the light and switch to the eclipse framework like many others have.
-Walt
I'm quite happy Keil is _not_ using the eclipse framework.
"It seems that of the few people that I have got feedback from do NOT use column editing features"
Not the specific "column editing feature" that you're speaking of - but I do quite often use the feature as found in uVision.
"I don't know how you deal with that when you have to write hundreds of lines of code that are similar to the definition of several variables"
I would write the first one, copy, paste it as many times as required, then overtype the bits that differ. Or start with a "skeleton", copy-&-paste, then fill in the blanks.
"I could just copy the text that I want to manipulate and move it to the program that I know can execute column editing and paste it in"
That's one way to do it. Alternatively, just open that file in the other editor - no need for copy/paste between applications.
As Per says, if you're routinely getting into that situation, maybe you should be looking at a better way to structure the code...?
some comments: I do not know about "99% of the software programming community" but I am a heavy user of column editiing: a) /* some inactive code */ b) //inactive ... //inactive ... //inactive ... b) is dead easy with the colun editing in CodeWright. b) has the HUGE advantage that the disabled lines show up as disabled on global searches.
The editor in the IDE of any small micro Compiler maker I know of STINKS. I am not suggesting they should redirect their efforts from compiler/linker to the editor, they should accept the fact and make an interface so that e.g. CodeWright could be hooked in.
the comment above about "going outside the IDE" is ridiculous, how big an effort is it to click on the taskbar instead of on "edit"
Erik
"but it would be nice to have that available within the uVision IDE."
it would be nice. but writing an ide is very much writing a piece of code: there are lots of nice things that we could but don't do in our code.
As a matter of fact, the greatest code we write has left out many nice features. and probably because of that, it is the greatest code we have written.
"Often, when I see repetitions, I have a strong reason to repackage the code into reusable modules instead of having multiple sets of similar code."
agree with that.
"make an interface so that e.g. CodeWright could be hooked in."
alternatively, it is not that difficult to embed the compiler in your own choice of editors (SI, CB, etc.).
As I've already mentioned, it's easy too hook Codewright in to edit the selelcted file from the uVision Project view, or the current file in the uVision editor - including going to the current line.
And there are documents here for hooking in to the debugger: http://www.keil.com/appnotes/list/uvision.htm
Note that a number of programmers editors have special features for comment away code, so you can do your alternative "b" without any column editing involved.
I can hook anything into uVision then? For example, I can hook Jens into uVision in the same manner as proposed for hooking in Code Wright???
Regarding column editing: I've used it in M, Brief, MSVC, Eclipse and Notepad++. When an IDE/editor doesn't support it I sorely miss it. Arguments along the lines of "maybe you're not structuring your code right" are not really acceptable.
Regarding Eclipse: it may not be the best IDE but to me it seems good enough that I wouldn't be too upset if all the embedded vendors standardized on it.
Regarding uVision integration: it would be nice to have a better way of plugging editors and other tools into uVision but I here's what I've been doing as a second-best solution:
- Set up a fake CDT project in Eclipse (trivial) - Set up a custom build command file that calls uVision to build the project in the background and pipe the errors back to Eclipse (easy) - Set up an error parser that makes errors and warnings show up in Eclipse's "problems" tab (moderately easy)
Eclipse's SVN and CVS integration is great, by the way. Makes source control so much easier to use.
Now I can do all my editing and building in Eclipse and when it's time to debug I switch over to uVision for debugging. Since the uVision debugger is pretty good I'm not too upset about not having debugging in Eclipse.
Andrew
Now I can do all my compiling and linking in uVision and when it's time to edit I switch over to CodeWright for editing. I'm not too upset about not having editing in uVision.
View all questions in Keil forum