

I'll agree that vim is pretty awesome and can likely perform functions like these in its own way (given some effort), as probably could other text editors, but Text Edit isn't as bad as you think. There are other good reasons to use Text Edit which I won't go into.

I also perform multi-line searches very often. But some nice features in Text Edit include for example, option-click-drag to make vertical selections, which I frequently use for tab-delimited data. In fact, I prefer xemacs exclusively for coding. I use vim somewhat frequently, but there are lots of things you can do in Text Edit that you cannot do (or cannot do easily) in vim or some other text editors. You know, there are plusses and minuses to every app. It's a nice check to make sure I'm not opening a very huge file. Thus, to get around the warning, you would have to escape the alias (e.g. If one or more of the files supplied to open (with -e as the first argument) is larger than 200M, it prints a warning instead of opening the file(s). Again, I'll defer to improvements in the comments.īasically, all I did was create an alias for the open command which first checks the file sizes before performing the command. Also, there are many valid reasons to avoid aliasing actual commands (though I do so all the time without any problem) so you may want to change the alias name to something other than 'open.'įinally, I used perl because I'm most familiar with it, though I'll admit there may be a more efficient and simple way of doing it. Perhaps someone can post a bash equivalent in the comments. This hint, unfortunately, only works if you happen to (like me) use the C shell as your shell of preference, because there's no way of referencing arguments in a bash alias. Here's a way I've found that can avoid these headache-inducing periods of no work getting done. It takes minutes for me to go around saving open files before I can force-quit TextEdit. Whenever I do this, my system crawls to a halt as TextEdit's virtual memory size bloats and the swap space goes crazy with page swaps. Every once in awhile, I inadvertently open such a file using the open -e command from the command line to view it in TextEdit (without checking the file size first). In my line of work, I frequently deal with very very large text files, gigs in size.
