This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use Column Editing in uVision3.*

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.

Parents
  • "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.

Reply
  • "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.

Children
  • As Per says, if you're routinely getting into that situation, maybe you should be looking at a better way to structure the code...?

  • "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.

    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

  • "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.

  • CodeWright has that feature but, as far as I know, doesn't have a correesponding un-comment feature.

    So you still need the column edit (or, at least, column select & delete) for that...

  • A bit sloppy to add a "comment" but not a "uncomment" command. A column-delete command is hard, always removing a fixed number of characters. A uncomment command would be able to check each individual line and don't destroy a line that doesn't start with //. No problem if the block is 10-20 lines, but if it is 500 lines, it can be easy to miss that there is some code in the middle that wasn't commented away, when marking the block.

  • Yes - unless I've just missed it?

    I guess the intention must've been just to make a block of text into a comment - rather than to enable/disable sections of code...?