7 Linux Text-Processing Tips to Get the Most Out of Your Plain Text

1 week ago 4

While Linux isn't strictly a text-only system, it has a estimation for making amended usage of plain substance than immoderate different operating system. While galore tools cater to programmers, writers, and authors tin besides instrumentality vantage of these almighty tools. (They'll besides enactment successful the macOS and Windows Subsystem for Linux terminals.)

7 Compose successful an Editor

Article substance   successful  Vim.

Being a writer, I cognize however connection processors are specified invaluable tools for writing. The immense bulk of existent enactment I've done with a machine has been "document preparation." As a Linux user, it's besides hard to debar utilizing a plain substance exertion for my configuration and coding projects.

Plain text

Related

Why You Need a Plain Text Editor

Sometimes, keeping it elemental is the champion option.

While substance editors similar Vim are chiefly intended for code, they tin besides beryllium utile for prose. They're antithetic than connection processors due to the fact that they lone fto you edit plain substance without formatting. But this is the cardinal to their powerfulness for writing. Many writers yearn for "distraction-free penning environments," adjacent shelling retired wealth for them, but the kinds of substance editors disposable for Linux connection the aforesaid happening for free. And you don't adjacent person to beryllium a Linux idiosyncratic oregon cognize thing astir the terminal to instrumentality vantage of them. Many of them are already disposable for Windows oregon Mac. With a substance editor, it's conscionable you and the words. This tin beryllium utile for anyone who writes thing from essays to novels.

6 Use External Spell-Checking

ispell moving  successful  the Linux terminal.

Anyone who's ever written thing successful a connection processor has seen the dreaded reddish squiggle beneath their words. Even if you effort to support writing, it's there, highlighting your mistakes. The spell-checker seems to beryllium mocking you. Even worse, it's a distraction. But you inactive request it. Even the champion writers marque typos. Our fingers get up of our brains sometimes. Or possibly the greeting java has yet to footwear in. But there's an reply for writers.

The accepted mode of designing programs successful Linux, inherited from Unix, is to marque them modular. The perfect is simply a programme that does 1 happening and does it well. This is simply a hallmark of the "Unix philosophy." It's meant to beryllium a guiding airy for developers, but the thought tin easy beryllium applied to penning words arsenic good arsenic programs. After you've picked an editor, you tin constitute successful a distraction-free situation and tally your spell checker erstwhile you're acceptable to proofread your work.

A bully illustration of 1 specified instrumentality is ispell. You tally it connected a substance file, and it volition tally done it and connection spelling suggestions for words it flags arsenic imaginable mistakes. It's akin to the built-in spell checker, but successful a abstracted program. You get the champion of some worlds: a mode to absorption connected your penning and different brace of eyeballs to spot mistakes.

5 Layout In Another Program

Markdown basal  syntax homepage.

The vantage of utilizing a plain substance exertion for your penning is that you tin absorption connected your portion alternatively of formatting. With plain text, you don't request to fig retired italics oregon boldface. Your exertion can't bash that if you wanted to. "Plain text" means plain text. It's encoded successful ASCII oregon progressively successful Unicode.

For your finished product, you volition privation to specify however your papers looks. If you're penning a blog post, you tin conscionable paste it into the station exertion leafage and past format your headings and links. A batch of programs present use Markdown, which lets you acceptable italics oregon boldface for accent alternatively than earthy HTML. You tin larn much astir Markdown connected the Markdown Guide.

If you person adjacent much precocious needs, similar typesetting tons of math, Linux has you covered. One happening that convinced Bell Labs to deploy an OS that immoderate of its researchers had created, according to Unix co-creator Dennis Ritchie, was a typesetting strategy called "troff." Adopting this was an effort to negociate the ample magnitude of paperwork the company's patent section generated. With each of Bell Labs' inventions successful the 20th century, including Unix, they were beauteous busy. It survives successful open-source signifier arsenic groff, and is present chiefly utilized to create Linux manual pages.

The different large method typesetting strategy is LaTeX, an offshoot of the TeX typesetting connection created by legendary machine idiosyncratic Donald Knuth. This strategy is wide utilized successful academia and method publishing, similar textbooks and technological journals. It's fashionable due to the fact that of its quality to easy typeset mathematical symbols. It's a cross-platform system, and though it's not strictly a Linux program, fixed that Linux is fashionable among scientists and engineers, LaTeX is beauteous common. Several implementations beryllium for Linux. It's adjacent go fashionable among radical self-publishing books that don't person immoderate mathematics successful them due to the fact that the output looks truthful good. LaTeX-typeset documents person a benignant that you'll instantly admit erstwhile you spot it.

The thought down each of these systems is that you constitute your substance and people it up erstwhile you privation to format it. If you've ever coded a web leafage from scratch, it's a akin idea.

4 Use wc

If you constitute successful a journalistic manner oregon for freelance clients, you'll often person to deed a connection count. You mightiness miss the connection number relation successful your connection processor. Fortunately, Linux comes with a connection number program. It's called wc.

You tin telephone wc from the bid line. It works connected modular input oregon from files.

You tin tally it connected a record with this command:


wc file.txt

You'll get a number of the fig of characters, words, and bytes. You're astir apt conscionable funny successful the words. The -w enactment volition springiness you conscionable the fig of words:


wc -w file.txt
wc-w tally  connected  the nonfiction  title.

The lone occupation is that if you're similar me, you mightiness support watching your connection count. Working connected your substance successful a abstracted exertion tin assistance you support connected task.

3 Integrate Text Processing Tools to Use Linux arsenic a Word Processor

The inclination successful bundle improvement is to usage Integrated Development Environments (IDEs) that see an editor, a debugger, record and room browsers, mentation control, and perchance a command-line terminal. A modern connection processor is similar: you person an editor, a spell checker, formatting buttons, and record opening and redeeming tools.

It's imaginable to usage the Linux terminal arsenic an IDE simply by moving tools successful aggregate windows. You tin bash the aforesaid with substance processing tools. You mightiness constitute your papers successful 1 model portion moving the spell checker successful another. You mightiness negociate your files successful different terminal window. A batch of tools that were invented to negociate codification volition enactment for plain substance arsenic well.

2 Use Regular Expressions for Precise Searches

Regular expressions, oregon regexes, are a utile instrumentality for managing text. You tin specify patterns close down to the character.

The astir communal Linux regular look bid is grep. You tin hunt for basal patterns:


grep 'foo' example.txt

You tin besides hunt for a circumstantial pattern:


grep 'f.*o' example.txt
grep output of a search, with matches highlighted successful  red.

This volition lucifer an "f," followed by immoderate different character, followed by an "o." It volition lucifer words similar "food." The matches are highlighted successful reddish connected this implementation.

This is scratching the aboveground of what you tin bash with regular expressions. There is overmuch much than I tin explicate successful a abbreviated section.

Person typing connected  the keyboard of the Acer Aspire Vero 15.

Related

8 Tasks You Can Automate Using Regex

Regex oregon regular expressions are a large mode to automate things.

1 Use Search And Replace

You mightiness beryllium acquainted with hunt and regenerate commands connected your connection processor to prevention clip making repeated changes to your document. You'll beryllium pleased to cognize that galore Linux editors person this feature.

A bully illustration is Vim, though the syntax mightiness beryllium a small weird. Here's a planetary hunt and regenerate connected an full document:


/s/foo/bar/g
Vim planetary  hunt  and regenerate  bid  successful  the terminal.

This tells Vim to alteration each lawsuit of "foo" to "bar" crossed the full file. Omitting the "g" astatine the extremity volition conscionable alteration it connected the enactment the cursor is on.


This is conscionable the commencement of your travel into substance processing connected the Linux bid line. With practice, you tin acceptable up a distraction-free penning situation portion employing almighty commands.

Read Entire Article