Menu

Selective deleting

2007-08-30
2012-11-13
  • Nobody/Anonymous

    I have tabulations of numerical data, many rows, 5 columns.
    I would like to delete just one entire column, disturbing no
    other. Conventional highlighting will select entire rows to
    delete ("Cut"). I want to delete columns.....any clues?

     
    • Nobody/Anonymous

      You can use column mode - Alt-C to select the columns you want. Press space key to blank those columns.

       
      • Nobody/Anonymous

        Correction - press Alt key while dragging your mouse to select the block you want to change.

         
    • Nobody/Anonymous

      Thanks for the two suggestions...but neither one seems capable
      of deleting a column of numerical data. I don't understand the
      reference to 'column mode', and in the second selection, I drag
      to include the width of the column and it only blanks half of
      that width. Data looks like this, except many columns, and I want
      to keep all except the whole second column (4.763 16.854 etc.):

        1.000    4.763    5.234    10.776     1.543
        2.000   16.854    1.654     7.246    11.487
               etcetera

       
      • Nobody/Anonymous

        Alt-click&drag marks the block (column mode - popular in many editors) you want to do anything with.

        In your case:
          1. pick the upper/left hand corner of the block,
          2. press Alt key, click that upper/left hand corner,
          3. drag your mouse to the lower/right hand corner of your block,
          4. press Delete key to remove those columns.

        Using the same technique, you can replace step 4 with a key press to fill those columns with the same letter/symbol/numeric.

        If you only blank half the width, there is only one thing coming to mind - the column you are working on include double-width characters. I did some experiment using the two rows you provided, I could not duplicate your described "blanks half of that width". I am sorry I can't help you resolve this issue.

        Best Regards

         
    • Nobody/Anonymous

      Thank you. With this last message, and some trial and error,
      partially due to the fact that my table is 481 rows in length,
      I believe it is working as you described. It's great to be
      able to get help when needed...and quickly!
                  Thanks again.

       
      • Nobody/Anonymous

        You are welcome. :)

        Cheers

         
    • Nobody/Anonymous

      In using the selective deleting feature, I found one anomaly,
      maybe. It does work very nicely for deleting a full column.

      If I delete (say) the whole second column.....
      it will move any columns that are to the right of that
      column, over to the left, to fill that space.

      Now, that's good, and useful, and I surely want it that way.
      But if I delete only PART of a column, it doesn't
      just leave blank the space I deleted..... it moves
      the data that was to the right, over to the left to fill that
      blank space. That makes the new column have some good data,
      what I didn't delete from that column, and bad data in the
      space I created.... data not applicable to that column at all.

      It's just the way it is, and I can live with it and try not to
      forget it....but is there an alternative?

       
    • Nobody/Anonymous

      It has been several days since I posted my note describing how
      this delete feature can give an entirely undesirable result. I
      see no additional comments on it, which I interpret as tacit
      agreement that "That's the way it is.....it just ain't perfect".
      Do I interpret that silence correctly, I wonder!

       
      • pshute

        pshute - 2007-09-05

        You're complaining that when you deleted text, the text to the right moves left to fill the space, correct?  Yes, that's how it works.  What you really appear to want is to replace the selected text with spaces, rather than delete it.  I have a feeling there's something like that in the very latest version, but I haven't tried it.  Not even sure what it's called.

         
        • pshute

          pshute - 2007-09-05

          Another approach is to use advanced find/replace (control+r).  Tick the regex box, and enter the columns you want to work on in the box that initially contains "#-# column".  E.g. for columns 12 to 20, enter 12-20.

          In the find box, enter just a dot to find any character.  In the replace box, enter just a space.

          The find/replace operation will operate just over the columns specified, changing everything in them to spaces.