Wednesday, June 13, 2012

Overwrite/Replace Mode in Eclipse for Mac

Cliff notes: I figured out how to enter overwrite/replace mode on Eclipse on a Mac (double-click the "Insert" info tab.

Preface: I'm a Mac newbie.  So, if this is something that's obvious, you can consider me an idiot.

Anyway, I wanted to make some rather mechanical changes to some code I had written.  Something like changing the following:

myArray[0] = value_abcd;
myArray[1] = value_efgh;
myArray[2] = value_ijkl;
myArray[3] = value_mnop;
myArray[4] = value_qrst;

to

myArray[0] = value_efgh;
myArray[1] = value_ijkl;
myArray[2] = value_mnop;
myArray[3] = value_qrst;


I figure I would just switch over to overwrite/replace mode and just quickly overwrite the values.  But, I don't have an f'ing insert key on my Mac.  So, I contemplated resigning myself to the extra keystroke per edit (pressing  delete to get rid of the existing value).


It might be that I suck at internet search, but I could not for the life of me find useful information on how to get into overwrite mode.  Some Internet folks went so far as to ask why anyone would ever want to be in a mode other than insert mode?  WTF?  Are you serious?


Anyway, at the bottom of your Eclipse window, you will see an info tab that reads "Insert" or "Smart Insert" -- double-click that and boom... you enter "Overwrite" mode and your cursor's appearance changes to indicate this.


Would have been easier to just edit the code in vi, but now I know.  Let's hear it for completely non-intuitive UI design -- and F you, Mac for not having an insert key.

2 comments:

Duke said...

This is an application by application thing on the mac, and yada yada the lack of overwrite mode is a result of macs never having a text interface and being mouse reliant from the beginning.

For a straight text editor on the mac that offers that, TextMate is pretty popular, or you can always use http://code.google.com/p/macvim/

Brendan said...

Double clicking on the status bar field "Insert" does nothing on my installation :(
Eclipse Mars 1 Release (4.5.1)

Quantcast