0

I'm looking for a MacOS counterpart to the classic Windows Notepad -- a primitive text editor with minimal functionality. I'd prefer open-source, though other zero-cost software is acceptable.

Must have:

  • Support for loading, editing, and saving UTF-8 text files
  • Cut/copy/paste support
  • Display in a monospaced font
  • Find and replace
  • Support for MacOS 10.7 through 10.15

Nice to have:

  • Support for UTF-16, UTF-32, MacRoman, and other encodings
  • The ability to pick the display font
  • Toggleable word wrap
  • Display of line and column numbers
  • Support for files larger than 64kb

Would prefer to avoid:

  • Drag-and-drop editing

Must not have:

  • Support for styled text
  • Autosave, save-on-close, cross-session undo, or anything else that makes on-disk changes without my consent
  • Most other features
  • Before anyone suggests nano or another terminal-based editor, Terminal preserves styling when copying text, which violates one of my "must not haves" and would result in me pasting ten-point green Monaco text everywhere. – Mark Dec 17 '19 at 21:50
  • Just as an FYI to anyone who might not be aware, command-shift-option-v is the shortcut for 'Paste and Match Style' in almost every application in macOS, which gets around the issue Mark mentions of pasting green Monaco text everywhere, but I'll be the first to admit it isn't the easiest shortcut to operate or remember. So I'll understand Mark if you don't take it as a solution to your problem. ;) – RTHarston Dec 18 '19 at 6:04
1

The built in TextEdit seems to fit quite a few of your requirements just fine. Have you tried it out?

Command-shift-t puts it in to plain text mode (instead of rich text) which makes it monospaced, and it has most of the other features you are looking for in that mode.

Requirements (all met):

  • Support for UTF-8, UTF-16, Mac OS Roman, Mac Japanese, Windows Latin, and more
  • It has full cut/copy/paste support (including for column selection using option-highlight)
  • Monospaced (mentioned above, repeated here for completeness)
  • Find and replace (command-e uses the selection for find, super handy)
  • It has been around for forever, not sure exactly how long, but basically forever

Nice to haves (a few of them):

  • A few of those formats are supported (listed above)
  • You can select the font and size for plain text in the settings
  • I have a 10 MB XML file open in TextEdit right now, no sweat (handles it better than Xcode actually...)

Nice to haves it doesn't have:

  • Wrapping - I thought it did, but it doesn't seem to, my bad.
  • Line and column numbers - it doesn't display them, but you can jump to a specific line using Command-l and you can set the width of new windows in preferences to a certain character width, so as long as you don't resize the window it will be the width you want

Prefer to avoid:

  • Unfortunately for you it does allow drag and drop editing

Must not have (it has the first two, but they can be disabled):

  • It does have support for stylized text, but only in rich text mode, which you can switch out of using the command I mentioned above (and it goes in to plain text mode automatically for code and .txt files-basically anything but .rtf files I believe-so it shouldn't really be a big concern for most editing).
  • Save on close - it does save on close, but only if you enable it (and I believe it is off by default) under the General tab of System Preferences. I am 99.99% sure it doesn't have autosave or any other kind of auto disk writing stuff.
  • 'Most other features was' a little too vague to answer properly here, sorry. :P

Here is a picture of the settings for turning off saving on close (note that these are global settings for every application on the computer):

Auto save settings in System Preferences

So I hope you see that it is actually a pretty good candidate, and it is built right in to macOS! I love it and have used it for many a quick code change (I am more of an IDE guy myself, but sometimes a quick change means for a quick editor).

It may not be exactly what you were looking for but it is quite the handy tool to have built in to the OS. And there are a few preferences you can set to enable or disable features you don't want on a per file basis (in the format menu) or on all new files created (in the preferences window).

| improve this answer | |
  • The awkwardness of getting TextEdit to do what I want was a large part of my motivation for the question. I do software development and testing, which has me moving between versions of MacOS on a regular basis. I'd rather have one program I can install everywhere than need to check TextEdit for new features to disable every time a new version of MacOS comes out. ("Save on close" being global is especially problematic, as I'd need to remember toggle it every time I switch between the software I'm testing and the software I'm using.) – Mark Dec 18 '19 at 21:27
  • @mark Fair enough. I figured you'd have tried TextEdit already, but I at least wanted to throw it out there in case you or someone else reading this didn't know about all the options. Good luck in your search! – RTHarston Dec 27 '19 at 19:07
0

CudaText editor almost fits (open source, cross platform), UTF-32 will be supported soon. But it supports Python plugins, so it’s not as light as you wish. And it has optional toolbar and optional sidebar (hidden by default, don’t turn them on).

Must not support styled text: yes, it copies text without any styles.

| improve this answer | |
  • By "must not support styled text", I mean that if I copy out of the editor and paste into another program (eg. Word), the pasted text matches the current style; conversely, if I copy styled text out of a program like Word and paste it into the program, the styling is stripped and only the text shows up, and within the program, there is no functionality for changing the font, size, or style of only part of a document. – Mark Dec 18 '19 at 1:34
  • Edited the reply about styled text. – Ctpouk Dec 18 '19 at 2:10
0

you can try gedit : https://wiki.gnome.org/Apps/Gedit

You can also try MacVim if you have used vim editor on linux, it is same for mac. Also there is TextEdit which i think is supplied with mac os.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.