Yep. In the late 90s/early 2000s I tried out a complex rich text databased-mediated notes program. And it was pretty great. It had hyperlinks, and inline images, and all sorts of fancy stuff. The one thing it didn't have was longevity. The company went under, the product depends on unsatisfiable depends now, and my old database of notes effectively vanished by 2005.
I've only used plain text for the last 15 years and it has been great. If I want images (or other files) I just put the file path to the images (or folder) in the notes. And since it's just a single text file called "notes" (now a handful of MB large) I can easily search through it with any tools I want.
I've got a folder on my family NAS called "notes." We store Markdown files and images in there. It's been a great way to organize loose information and media. Infinitely portable.
Wikis would come and go like mushrooms and I too was burned once, so I figured Wikipedia's data will never be abandoned and so have been using mediawiki for over a decade. Even if mediawiki is one day abandoned the migration tools will be excellent.
history, syntax highlighting, inline images, tables etc. Markdown would be nice - and there's an extension which enables that, but who knows if that extension will have a lifespan/migration-path like Wikipedia will.
Can I just be a little anal and say, Markdown is 100% plain text. HTML is plain text too. Org-Mode, RestructuredText, etc. etc. It's all just plain text.
-- update --
Okay then people. Go open a Word Document in your text editor and see what you get. If it is smart, like Emacs, it will open a directory of xml files. How about if you open up a ipython notebook? not plain text. But RMarkdown is.
-- update 2 --
Well, what does the Linux Information Project say about Plain Text?
- Plain text refers to any string (i.e., finite sequence of characters) that consists entirely of printable characters (i.e., human-readable characters) and, optionally, a very few specific types of control characters (e.g., characters indicating a tab or the start of a new line).
- However, plain text can contain instructions that are written in plain text for formatting, for adding images, for creating hyperlinks, etc. that can be used by programs that convert plain text into other forms. That is, it can contain tags (i.e., instructions or indicators that are written in plain text) that tell a word processor, web browser or other program to format it in a certain way, including which typefaces and fonts to use, how to set the margins, where to underline the text and where to use bold or italic characters.
- HTML (hypertext markup language) and XML (extensible markup language) are good examples of the use of instructions that (1) are used to convert plain text into some form of formatted text, (2) are written in plain text and (3) are embedded in the plain text documents that they are used to format. For example, the HTML tags <b> and </b>, although written in plain text, instruct any web browser that reads a file containing them to render (i.e., display) any plain text located between them in bold characters. Among the many other things that HTML can tell browsers are where to create hyperlinks, how to set margins, which images to use and where to insert them, which typefaces and fonts to use and where to render text in italics or underlined characters.
I'm afraid that if you can't accept this, then you may have a hard time accepting the existence of any kind of "plain" text at all. After all, what text does not include format? This does. How?
Well, a paragraph is separated by a new line. Sentences are separated by periods and the first word of sentence of capitalized. White space is used to delimit words within sentences--with some exceptions, as just shown.
Really I don't think there is an objective definition of a term like "plain text" and it's even context sensitive. If I tell somebody my software can be configured with a JSON file, and they ask "what's a JSON file?", I might respond that it's "just a plain text format" to convey that they can open the thing in Notepad and have a reasonable chance of understanding and editing it. On the other hand, if I get some software that receives emails in an inbox and parses them to load data into a table, and it claims to support "plain text emails only" I wouldn't send it HTML emails and think I'm doing it right because "HTML is plain text".
If you absolutely must have an objective definition, I might try saying that "plain text" is WYSIWYG Unicode or ASCII. WYSIWYG meaning the formatting it exhibits when displayed is the same formatting it exhibits in the editor, and Unicode or ASCII meaning only the formatting available from those character encodings is available (so a Word Document doesn't count as plain text even though it is WYSIWYG).
<p id="edit"> but I did upvote you for your different opinion, I don't really think it should be downvoted like it did, arbitrary word definitions are just that - arbitrary, including opinions from Linux Info and of course me and you. What really decide them in the end is the public perception of the term in question.</p>
> Can I just be a little anal and say, Markdown is 100% plain text. HTML is plain text too. Org-Mode, RestructuredText, etc. etc. It's all just plain text.
When people talk about plain text in that space, they usually mean the interaction level, not the technical level. Any cryptic rules which gives the text meaning in some parser is a rule the user need to first learn and internalize, which makes usage harder. Any tooling is an extra step you need to maintain for handling your texts.
Of course, markdown and org-mode are relativ simple, but it stills needs tools, thus has extra requirements. It's not as plain and simple as starting notepad and call it a day.
interesting, I think I describe my criteria identically to you, but I have different conclusions. The thing aboht markdown and org-mode is that it's fully readable without any extra requirements whatsoever, as opposed to e.g. jupyter, word, etc.
I've read and edited my own org files in notepad on occasion, which works perfectly well (imagine doing that with a word document!), The same is true for markdown files- to such a degree that it is the standard for readme files, and those are definitely supposed to be readable by anyone.
So to me that definitely makes it plain text- all the more as you will be perfectly fine not adhering to any of the rules within an org file, but then suddenly dropping a table with formulas in there and having it work immediately (again, image word here).
So I would say it doesn't _need_ tools, but can _benefit_, as opposed to word/etc.
You might say these are quantitatively less "plain text" in some way when compared with a literal .txt file, which is fair enough, but I think they're extremely similar when compared to a .docx file.
> interesting, I think I describe my criteria identically to you, but I have different conclusions. The thing aboht markdown and org-mode is that it's fully readable without any extra requirements whatsoever, as opposed to e.g. jupyter, word, etc.
Well, yes, but no. It's more readable than the json or xml-files used by jupyter or word (which technically are still plain text). But they are less readable then any markup-free plain text. If you use slightly complex markup, like links or tables, they can become quite unreadable too. That's the nature of complexity. Additionally, you still must be aware of the syntax and it's rules, especially when you wanna write it, not just read them.
That's why simple markups considered an in-between. The requirements are low, but they still are there.
> So I would say it doesn't _need_ tools, but can _benefit_, as opposed to word/etc.
True, but what are the benefits of using them without tools? Why not go full freestyle plain text? Use whatever text you want, make syntax up on the spot as you need it. That would be 100% plain text, as there is no cage that limits your expressioness.
> That's why simple markups considered an in-between
completely agree
> Use whatever text you want, make syntax up on the spot as you need it. That would be 100% plain text, as there is no cage that limits your expressioness.
However, see my point above: with md (but especially with org) one is completely free to do this!
Under that definition (printable plus whitespace controlling characters) a BASE64 encoded document is plain text. I'm not sure that makes it a very useful definition.
>Okay then people. Go open a Word Document in your text editor and see what you get. If it is smart, like Emacs, it will open a directory of xml files. How about if you open up a ipython notebook? not plain text. But RMarkdown is.
Org-mode as well, for those who can get into emacs. Especially as a programmer, the code blocks are awesome.
Want a quick analysis of some data in the same file? Toss it into a table, write a code block, run the code block, get a new table as output. I can export it to a variety of formats without much trouble in order to share with others.
Joking, but as someone that has mostly used vim, I have the feeling that emacs is trying to do everything within emacs while vim are supposed to be used in tandem with other unix tools.
Definitely a factor. There are still a lot of emacs use-cases which call out to or depend on unix tools, but yes. It's more common to try and "live" in emacs than in vim, whereas vim is more of a component within a larger experience.
The nice thing about org is how seamless it is to do all this. I do think that vim-style modal editing is the best way to go, but Emacs is to me a much better text manipulation platform than Vim is, and you can still get the Vim experience with evil mode.
It definitely is more akin to an operating system than just an editor. You can even VIM within Emacs with evil mode https://www.emacswiki.org/emacs/Evil
Markdown and a sensible directory structure has been working great for me. Put it somewhere synced to all the devices, and it's the quickest and easiest form to read and write anywhere. If I really need a nicely formatted copy I can produce one easily, but this is rare.
In the right editor syntax highlighting makes the structure obvious, and automatic formatting/linting keeps things sensible.
Any requirement for multimedia has been satisfied with links to local files or online sources.
The only issue has been collaboration, but in my experience it's easier to just use whatever my collaborators prefer. I can still have my own markdown as a searchable and familiar origin point, with links into whatever they are using.
This is exactly why I gave up and use word for all work documents (but not for any personal files). Colleague asked for the original word file of a PDF I sent them. Explaining that it was compiled to PDF from a LaTeX source was not worth it…
I built myself a little note-taking / wiki app that uses Markdown. The main issue I find with plaintext is that the minute you need anything like rich metadata on a document, it gets very clumsy, so the MD files are stored in a SQLite database which also holds any needed metadata.
I like the idea of plaintext as a least-common-denominator for many things, but it becomes difficult to use it beyond a small, constrained set of applications.
Sure, I can do that. The problem is what to do if I want to mass update the metadata across an entire set of documents. It's just easier to do that with a DB.
There is an alternative: you can use a MIME envelope to store notes. This way you’ll have a plaintext container and a way to attach files in a portable way.
You could just have a link to the rich metadata on the drive within the plain text document, and calling it up is as easy as grabbing the path and piping to your viewer.
I tried going that way. Authoring HTML by hand is miserable, it totally breaks up your flow of writing. Then to make matters worse, reading HTML raw text vs reading in an editor is a painful experience as well.
I feel like if you wanted to write notes in HTML, you would need to do it from within some WYSIWYG editor environment that felt like plain text most of the time but easily let you drop into metadata, links, tables, etc.
Did the same (with PostgreSQL). Markdown notes in the browser. Text and images, attachments. Only the essential functionality I really need. Used Evernote in the past, but got more and more disappointed.
The reason I use plain text is that nobody has made a similarly universal format for multimedia, and nobody has made tools for that fantasy format like Emacs and Vim. I'd love to use still and moving images at times.
The FOSS world thinks it's innovative but it's stuck in the 1980s. And because of that, ordinary people (and tech geeks) don't have a way to personally utilize and store their copious multimedia - it's all tied to some company's servers. For example, there's no good way to backup your Snapchat or Facebook page, or even better, to create an equivalent locally.
That's a start, but we still need multimedia handling: conversion, editing, etc. And we need a way to easily edit stored content: I create it, export it, now I want to edit it ...
It's not like posting something on Facebook, or using a good text editor.
and what do you archive when your page source is basically a script tag to a obfuscated js pack which talks to 20 other web services to dynamically retrieve the real data?
> The reason I use plain text is that nobody has made a similarly universal format for multimedia
Care to explain what you mean with multimedia? What is missing with the existing audio/video/picture-formats?
> And because of that, ordinary people (and tech geeks) don't have a way to personally utilize and store their copious multimedia
There are dozens of tools to organize and utilize your media-content? Kodi is widely used as I know.
> For example, there's no good way to backup your Snapchat or Facebook page,
How is this the fault of the FOSS-world? They can't dicate a company what they offer and what not.
> or even better, to create an equivalent locally.
Yes, but for what? What is Facebook or Snapchat in your mind that it would be even neccessary to create it locally? But, there are tools with similar function. It's just not simple to use, because such services are not simple by they their own nature and nobody, neither FOSS nor commercial world, has made it simple enough yet to setup services for any random user.
I mean one document that contains multiple kinds of media (text, stills, moving images, etc), which you can very easily author in many server-based applications such as wikis, social media apps, etc. Word and LibreOffice struggle with it.
Take a look at obsidian, it just outputs plaintext markup. You can embed stuff in there also (I frequently paste images in, and also edit the same documents directly on gitlab or via vim etc)
Using HTML for that purpose, emedding large images and other multimedia files in it, while in theory could work, is another nightmarish stretch of the standard and depending on the size of your document could bring your system to a stall. PPTX is Microsoft open-ish format for presenting slides and I doubt using it for that purpose would be a good idea.
Anytime I think about how everything is plain text, I
m reminded of TempleOS (http://www.codersnotes.com/notes/a-constructive-look-at-temp...), an operating system written by a schizophrenic man according to God's instruction. The fact that one guy built a system where everything is written in hypertext (yes, you can embed images in source files -- why not?), where *nix systems would use plaintext, shows just how far behind the FOSS world is.
>> where *nix systems would use plaintext, shows just how far behind the FOSS world is.
Plain text is a design decision that is still advantageous today. Plain text is universal and easy to build more complex formats on top of. It can easily be inspected, edited, compressed, encrypted, diff'ed, filtered, and processed by tools on any platform.
ESR wrote: "Text streams are a valuable universal format because they're easy for human beings to read, write, and edit without specialized tools. These formats are (or can be designed to be) transparent.
Also, the very limitations of text streams help enforce encapsulation. By discouraging elaborate representations with rich, densely encoded structure, text streams also discourage programs from being promiscuous with each other about their internal states and help enforce encapsulation."
It's FOSS supposed lack of interest in multimedia the reason why closed gardens don't let you backup stuff?
Moreover, the FOSS world is what is pushing technology further, without FOSS you wouldn't have git, ffmpeg, 7z and other archiving tools. The reason why a lot of FOSS tools deal with plaintext is because it opens much more doors than you can even think about.
BTW, if you're an EU citizen you can get zipped html copies of your FaceBook data, and I assume of Snapchat as well.
I don't know about _moving_ images per se, but still images have been possible for a while in org mode. simply drop a link to the image file (possibly with an ORG_OPTION specifying image size) and you'll have an image displayed in the buffer of you plain text file.
(there are even packages for making a screenshot and dropping the file in the current folder and making the aforementioned link, which I use a lot during online lecture note taking)
It seems like plain text has made a comeback among the generation that remembers Notepad and vim. The key thing is the focus on the routine and structure, rather than the choice of app or the styling. I've been putting together a collection of plain text applications:
+1 for plain text accounting. I'm using hledger^[0] to track my finances. I do use the web UI to submit information but I edit the plain text store extensively.
Replaced a lot of awk for me, along with places I might have been tempted to use sqlite. Unfortunately never had much luck with the bash or c integrations.
I've been playing around with the idea of "Google Docs for Plaintext" and have a working (but ugly) version using the CodeMirror 6 collaboration protocol using a Elixir-based server I wrote.
The idea is to have either single pane docs for just a plain text editor or split pane docs for Markdown, AsciiDoc, Latex, etc with the editor in one pane and the rendered version in the other. Doc editing/viewing would be collaborative with sharing similar to Google Docs.
I've done some research and I haven't seen anything like this which means either I have lost my Google-fu, it is a dumb idea or nobody has thought of it (in descending likely-hood).
Anyone have thoughts? Does this seem interesting/useful?
At face value, the idea feels reminiscent of earlier collaborative text editors like etherpad, hackpad, or usecanvas. I think the hard part would be resisting the temptation of folding your markdown (hiding # or *) or moving to WYSIWYG.
For starters, you can take inspiration from apps like bear notes, ia writer, ulysses, typora, or even apple notes (which has collaborative editing nowadays).
Plain text without some sort of markup makes little sense. (Even the usual punctuation is, in fact, an ancient form of markup.) So why deprive yourself of the convenience of an existing modern standard, such as HTML or XML. (Unlike various markdowns these ensure a clear separation of content from, well, markup). You retain full control, and, at the same time, you can add as much structural and/or semantic complexity as you like.
I used to use RTFD for all my note taking. Simple colored text options, embedded images, stored as a bundle. But when I stopped using MacOS(X), I found that RTFD support was basically nonexistent in Windows and Linux, and even regular RTF was pretty limited.
Switched to plaintext, never looked back. Simple, cross-platform
My absolute favorite hierarchical note application is CherryTree (https://www.giuspen.com/cherrytree), but there's no mobile support, and looks like there will never be.
I migrated all my notes to QOwnnotes (https://www.qownnotes.org) synchronized with DropBox, and use any markdown editor in mobile. I would be happier if it had encryption, but even if it had, a compatible mobile editor would be hard to find.
Both let you mix text and media/attachments, but CherryTree is more user friendly.
For mobile notes, I actually do the most fastest most cross-platform thing of all: I email myself. I can sort everything later if need be into my regular journals or wherever is applicable.
The biggest downside to a text file is when you need to add “not text”. At least, “not ASCII”. Non-latin characters. Images. Sound files.
Sure, some programs will accept unicode as readily as ASCII, but not all. Formatting symbols are not well, or universally, defined. And definitely no consistent support for non-text items.
Of course, these are mostly minor non-issues on a day-to-day basis.
That said, I do wonder sometimes if the answer is HTML. Easily written, significant support for writing in text editors, virtually automatic support for the entire unicode set, lots of built-in markup, images, sounds, and movies are easy to embed, and there isn’t an OS that can’t display it.
I use a markdown editor (Joplin) for all my notes. It easily allows for adding unicode characters, formatted code snippets and images. Sound files, probably not.
This headline feels click-baity to me. After singing the praises of plain text "for everything," he then lists all the things for which he's no longer using plain text.
> I’ve moved away from plain text in favor of apps in a couple places to help simplify things...any public, long form writing I do goes through the likes of Google Docs, Microsoft Word
The only places where his preferences are likely to be different from most readers is that he uses plaintext for taking notes, to-do list, and reminders.
I'm building an app (3D memory palace) and the save file format is JSON. It's not plaintext, but it is text, and structured in such a way that you could rebuild the app yourself if you wanted to - or still have access to your data should the app stop working one day. It also means it's trivial to edit the JSON if you want to add or remove something, or make mass-changes that would be impractical to do within the app itself.
At work as a web developer, I'll often facilitate CSV import & Export for Product to work with the app. This lets them use Excel, which they're already comfortable with, and removes me from the development cycle because now changes are just a file upload that they can do themselves.
Both JSON and CSV are great plaintext ways to represent structured data. Personally, I wish there was a markdown for excel, or some way of representing the entire capabilities (such as formulas) in plaintext instead of in a proprietary XLS. Hopefully someone has something in the works around that.
Proprietary is easy - just do whatever you want. But doing things in a way that lets users & other developers "yes and" your work is an under appreciated value add.
I think this is a fantastic attitude. And if the file grows too big, you can also do a simple compression.
MS office is a weird thing in this regard. The current formats are technically open (called Office Open XML), but good luck with the multi-thousand page reference.
I recently discovered Logseq and have been loving the experience of networked notes and markdown. I feel like this is something that has been missing from my workflow that I never realized.
File format is compatible with Obsidian as well so you can move your life anywhere. And you can back up to a private github repo so you can use multiple machines. I like Logseq so much I feel compelled to donate since its main competitor is outrageously priced.
Wrote my own vaguely Zettelkasten-inspired system because I wanted something that works at the command line and followed my own idiosyncratic (or idiotic) preferences. The data lives in my keybase KBFS mount and I symlink it into my home directory.
You build up a hierarchy of notes, but you can also cross-link so a note appears in multiple places. You can also drop arbitrary files alongside any given note. I expand it occasionally as I need new features; most recently I added regular expression searching and a command to locate "orphaned" notes. It's at https://github.com/floren/zk which contains the Go library to interact with the files on disk, and a command-line tool which wraps the library.
This is not really new, it's more a new generation of people who discover something that other have known for 20 years already.
The ironie is that the recent wave seems to originated from roam and other webservices, which are quite far from being plain text or even just being open.
I love plain text for my digital note-taking and I use a Foam [1] workspace now, but I've always struggled with diagrams. I love pencil and paper because I have complete freedom to draw diagrams which can be incredibly useful. I'd love a note-taking application for Android which lets me write text and then add a 'canvas block' to draw, and then switch back to text.
Apple Notes is my go-to for “almost plain text.” It’s simple, instantly syncs across phone/desktop, and I can throw in bulleted lists, photos, PDFs, or whatever else if needed. I have meeting notes, to-do lists, journal entries, and god knows what else in there.
It’s not perfect - Markdown, or at least code blocks, would be nice, and tags (I think those are coming in the next OS release), but in terms of ease-of-use, I haven’t found anything close.
I used to be a power-user of apple notes too. I loved how simple it is but I also missed having more functionality. My notes and folders became messy very quickly with limited options to organise. I also had to review my notes and put the action points into a calendar which became too much work. Decided to start building something better, https://acreom.com/
> It’s not perfect - Markdown, or at least code blocks, would be nice, and tags (I think those are coming in the next OS release), but in terms of ease-of-use, I haven’t found anything close.
On that note (no put intended), I’d expect iOS 16 Notes to support markdown now that SwiftUI and UIKit in iOS 15 now have native markdown support.
With markdown, it'd be so killer if you could just drop in tables from Numbers.app, or especially code kernels. I'm still looking for that shangri-la of "reactive Jupyter for the desktop" ObservableHQ is basically reactive Jupyter, and Jupyter-on-desktop can be hacked together, but I want all three.
I started using Notes a lot at some point because it is just right there in the Dock, it has an attractive design, and unlike with text files, it is easy to just drop images into it. Problem is, now I have probably thousands of notes in Notes but as far as I can tell there is no easy way to export them to text format or HTML or any other simple format. I recently tried a third-party app that is supposedly able to do export from Notes to text for you but the exported text files lacked the original note last-modified times and a bunch of the first lines of the original notes were also missing. I wish that Notes itself made it easy to export to text files - I would be ok with not having images exported. It would be really nice to back up all my notes to plain text rather than being locked in to some sort of Apple cloud nonsense. Notes does have a built-in export to PDF feature, but it seems that you can only export one note at a time that way and also, the note last-modified times get dropped on export.
So a word of caution for other Notes users - Notes has its advantages, but if you ever end up with a large number of notes and you want to copy them outside of the Apple ecosystem, it will probably not be straightforward.
I am a fan of Apple Notes because they support syncing with Fastmail's Notes[1], so I could access my notes from iPhone and web, and my data is not locked into Apple's ecosystem.
But I got irritated with Apple Notes. It lacks Markdown support. It auto-converts my note from plaintext to rich text anytime I start numbering, bulleting, or pasting, without a way to convert the note back to plaintext. Lastly, my notes had no structure or hierarchy. They were simply sorted by last-modified date.
So this month I researched note-taking apps having (1) Markdown support, and (2) support for syncing my data to Fastmail. Because again, I don't want to be locked into Apple. I settled on 1Writer[2]. It syncs to WebDAV endpoints, which Fastmail offers. My notes are now files, and I can organize them into folders, all within 1Writer.
For now, I love it. Markdown support is great, including highlighting in edit mode, and I don't miss anything from Apple Notes.
I use plain A4 paper, a physical clipboards and lots of colors(more than 10) and mechanical pencil.If I need to digitalize them for archival, I use same the Fujitsu snapscan automatic feed scanner that I use to digitalize books.
I can draw well, so using plain text feels so limited and constrained, rigid and not flexible enough.
Linear text and having to use a special language (markup) feels so clunky compared to a real 2D connection.
With paper you have eink support, A3 and A2 sizes if necessary and as big space as you need.
It is extremely cheap, does not need batteries, mobile and normal people understand it(WYSIWYG) much better than if you have to explain them how to install a Markdown viewer or worse something like emacs modes.
I am a lisper,fluent in emacs, could use it for notes and sometimes I do. I used Latex in University instead of Word.
But it feels so wrong for me. When I talk with artists in general they share the feeling I have. They will not use the keyboard if they could but their hand. For them programmers are just autistic not understanding their world.
Most programmers also can not understand artists. For them losing all the expression of handwriting and writing is just fine and for them the keyboard is sacred, and people should be trained in typing instead of computers doing the work for understanding human natural movements.
Thank you for writing the nice comparison. I agree that most people are focused on one method, either keyboard or pencil. Also, for other people it is talking. I feel that I can express my ideas much quicker using speech than any other method.
But let me ask you: What do you think about using an iPad with the Apple Pencil?
I do the same as you on math exercises. First, I solve them with a notebook and a pencil.
Then, I just use groff+ms+eqn+tbl... to get a PDF from a simple text file.
Also, as I use Unifont as my terminal font, the Unicode support is huge, really huge. So I can typeset math exercises with a simple xterm/st and a light PDF viewer such as MuPDF.
plaintext works well because it is universal and interoperable with everything. markdown is a great compromise in terms of keeping the portable format while giving you a bit more power. the article talks about reaching outside of plaintext for certain content - another approach is to adopt a plaintext note taking tool that has better supported for more complicated note types.
plug: i'm the creator of one of these tools (dendron.so) which I use to manage over 20k notes in plaintext
Gmail drafts are my #1 note taking app. Plain text, no formatting required but it's there if you want. Just hit Send to share a note. Not collaborative editing, but does solve all of the sync issues.
SyncThing is one of the most underrated programs out there.
>Sharing
There's a billion ways to share a text file with someone
>Collaborative editing
That's a fair point. Although, I've never had the need to collaboratively edit a text file. But it does look like there's stuff out there e.g. EtherPad, Gobby, HackMD.
I fixed my editor so that it recognizes URLs, and underlines them. Clicking on one brings up a browser on that site. I should have done that 20 years ago.
No special syntax is required. It just works. I've since been adding URLs in comments all over my code, for references. It's marvelous.
It could be extended to recognize filename.jpg and filename.mp3 to display or play those files, too. Again with no special syntax whatsoever. It just works.
I wish vim could do this. Or maybe it can and I don't know how.
Everyone suggests using "gx" but this is for opening local files in a viewer. If you do gx on a url it downloads the referent, and then tries to open the result using the local filename. If the extension is ".html" this fails fairly miserably because all the css, images, etc. are missing. If the page doesn't have an extension it fails entirely.
You can make it do that with a keybinding and a little vimscript function. Vim can run shell commands, so all it really needs to do is check if the text under the cursor is a URL, and if it is call a browser on it. Something like this (note I'm not exactly a vimscript master):
function! OpenUrl()
let pattern = 'http[^)\]"\n \t<>]\+'
let line_text = getline('.')
let matched = matchstr(line_text, pattern)
if strlen(matched) > 0
exe "norm! :!firefox ".matched."\n"
endif
endfunction
nmap <CR> :call OpenUrl()<CR>
This calls the function when you hit Enter in normal mode (the `<CR>`).
I use Google Docs for almost everything these days. At a basic level, you can use it as plain text + easy hypertext via CMD+k. That by itself is very powerful. I don’t know if there is another product that makes it so easy to create hyper text. (They could make that even easier if they had a hot key to “copy a shareable url to this doc to the clipboard” or similar.) The downside I suppose is that your data is in Google’s cloud. Personally, I think that is a manageable trade off for my use cases, but I get that it may not work for everyone.
My favourite quote from The Pragmatic Programmer is this one.
"Text manipulation languages are to programming what routers are to woodworking. They are noisy , messy, and somewhat brute force. Make mistakes with them, and entire pieces can be ruined. Some people swear they have no place in the toolbox. But in the right hands, both routers and text manipulation languages can be incredibly powerful and versatile. You can quickly trim something into shape, make joints, and carve. Used properly, these tools have surprising finesse and subtlety. But they take time to master. "
However, the impact of mistakes can be largely mitigated with good source control, a rapid rollback capability and good monitoring (Loggly, New Relic?). One I figured this out, I became more fearless with my coding.
Of course, good unit tests will prevent bugs also. I consider them a must for any large, wholesale changes.
I've been using Emacs for more than a quarter century, 99.9999% of the time text-only (whether Linux console, X terminal console, xterm, or SSH client) on a remote server.
My email client is VM, written in Emacs Lisp. I've used it to read mail for almost as long as I've used Emacs. VM (and ancillary tools, like Personality Crisis and mairix)
* does a great of job displaying HTML messages. For the very few that it doesn't, one keystroke sends the message to my web browser running locally.
* sends URLs I select (all from the keyboard) to the web browser
* opens images and attachments
* auto-adjusts the From: line of outgoing messages depending on the recipient
* archives messages to various folders using various criteria
* search my archived mail going back a quarter century at lightning speed
Of course, I can write Emacs Lisp code of my own to extend any or all of the above.
This, and also org-mode for organizing everything and org-roam and deft for personal interlinked knowledge base written in plain text. If anything ever happens to emacs or the packages it would be incredibly easy to convert all the notes into whatever format you like in a matter of minutes. It just blows my mind now that I think how much time I spend trying out other productivity tools instead of investing some time in emacs.
I use plain text because of speed. Often I find by the time Google Docs or a more powerful editor loads, I've lost a thought or two I was going to write down, especially if it's alot of them.
Plain text takes <1 second to open and start editing.
And of course all of the code I write is plain text.
Plain text has its limits. Good open-source markup options are available (or you can roll-your-own). They're fine so long as they will export into truly plain-text in a satisfactory way.
For text that I expect to use for a long time, I will never again use programs that use proprietary text formats. Once you commit to them you're at the mercy of the proprietor - and the platform (if they're not cross-platform). The programs may even fail after an OS update. That's a burn that's not soon forgotten.
I'll be contrarian and throw my opinion on top of the pile, why not.
I've never found most of the arguments about the UNIX philosophy or plaintext super compelling. Some people love to wax poetic about "composing together small programs" and "being able to use one toolset to accomplish many things." In my experience this works really great for systems administration (the activity the paradigm was designed around - big surprise) but not very well for other things. Sometimes I want to take a picture. Sometimes I want to query a sqlite database. Sometimes I want Powershell objects. Life is not systems administration, and neither is computing.
Don't get me wrong, I have emacs open all day every day at work. But when I hear people talk about using plaintext for everything, I think about Bret Victor's rant about the inhumanity of keyboards and screens:
I still haven't found a way to beat markdown in a private git repo.
It's certainly more friction than using apple notes, which I used to use, but in an extreme long term view, markdown plaintext files will still be accessible if Apple ever goes out of business, whereas anything stored in my iCloud is kaput.
If Apple Notes would let you write markdown and easily export/sync notes, I think I would use it again just for ease of use (especially when AFK). But on my computer I've always got vscode open anyway, so why not just have a window open to my notes repo.
I've only used plain text for the last 15 years and it has been great. If I want images (or other files) I just put the file path to the images (or folder) in the notes. And since it's just a single text file called "notes" (now a handful of MB large) I can easily search through it with any tools I want.
reply