Skip to content

Commit c66a3ad

Browse files
committed
big boat load of fixes
1 parent c20dea6 commit c66a3ad

File tree

4 files changed

+33
-32
lines changed

4 files changed

+33
-32
lines changed

manuscript/04-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ sessions, windows, and panes.
115115

116116
Much like vi, tmux handles copying as a mode in which a pane is
117117
temporarily placed. When inside this mode, text can be selected and copied to
118-
the *paste buffer*, tmux' clipboard.
118+
the *paste buffer*, tmux's clipboard.
119119

120120
The default key to enter copy mode is `Prefix` + `[`.
121121

manuscript/10-scripting.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ people's flows. Full tables are in the [cheatsheets](#appendix-cheatsheets).
1010
## Aliases {#aliases}
1111

1212
tmux supports a variety of alias commands. With aliases, instead of typing
13-
`tmux attach-session` to attach a session, `$ tmux attach` could do the trick.
13+
`$ tmux attach-session` to attach a session, `$ tmux attach` could do the trick.
1414

1515
Most aliases come to mind via intuition and are a lot friendlier than typing the
1616
full hyphenated commands.
@@ -69,7 +69,7 @@ patterns.
6969
For instance, you need not type `$ tmux attach-session` every time. First,
7070
there's the [alias](#aliases) of `$ tmux attach`, but additionally, more
7171
concise commands can be used if they partially match the name of the command or
72-
the target. tmux' pattern matching allows `$ tmux attac`, `$ tmux att`, `$ tmux at`
72+
the target. tmux's pattern matching allows `$ tmux attac`, `$ tmux att`, `$ tmux at`
7373
and `$ tmux a` to reach `$ tmux attach`.
7474

7575
Every tmux command has shorthands; let's try this for `$ tmux new-session`:
@@ -253,7 +253,7 @@ Let's try to output it:
253253
$ tmux list-windows -F "#{window_id} #{window_name}"
254254
> @0 zsh
255255

256-
Here's a cool trick; list all panes with the x and y coordinates of the cursor
256+
Here's a cool trick to list all panes with the x and y coordinates of the cursor
257257
position:
258258

259259
{language=shell, line-numbers=off}
@@ -282,7 +282,7 @@ Pane variables: `cursor_x`, `cursor_y`, `pane_active`, `pane_current_command`,
282282

283283
This book focuses on separating the concept of server, sessions,
284284
windows, and panes. With the knowledge of targets and formats, this
285-
separation takes shape in tmux' internal attributes. If you `list-panes` all
285+
separation takes shape in tmux's internal attributes. If you `list-panes` all
286286
variables up the ladder, including window, session and server variables are
287287
available for the panes being listed. Try this:
288288

@@ -403,10 +403,10 @@ Output of cal(1).](images/10-scripting/send-keys-cal.png)
403403

404404
`$ tmux capture-pane` will copy a panes' contents.
405405

406-
By default, the contents will be saved to tmux' internal clipboard, the *paste
406+
By default, the contents will be saved to tmux's internal clipboard, the *paste
407407
buffer*. You can run `capture-pane` within any pane, then navigate to an
408408
editor, paste the contents (don't forget to `:set paste` and go into insert mode
409-
with `i` on vim), and save it to a file. To [paste](#clipbpard), use `Prefix` +
409+
with `i` in vim), and save it to a file. To [paste](#clipboard), use `Prefix` +
410410
`]` inside the pane you're pasting into.
411411

412412
You can also add the `-p` flag to print it to [stdout](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29).
@@ -429,7 +429,7 @@ To check what's inside:
429429
$ cat ./test
430430

431431
Like with `send-keys`, [targets](#targets) can be specified with `-t`. Let's
432-
copy a pane into tmux' clipboard ("paste buffer") and paste it into a text
432+
copy a pane into tmux's clipboard ("paste buffer") and paste it into a text
433433
editor in a third pane:
434434

435435
![Top-left: Listing panes, Bottom-left: Capturing pane output of top-left pane,
@@ -446,10 +446,10 @@ a powerful way of retrieving information on its objects between `list-panes`,
446446
`list-windows` and `list-sessions` and formats. This makes tmux not only
447447
accessible and configurable, but also scriptable.
448448

449-
The ability to target information explicitly and reliably down to the point of
450-
tracking a pane by its ID and collecting its pane contents, even sending in
451-
keys. Used by the skilled programmer, opening the possibility of orchestrating
452-
the terminals in ways that were previously unrealistic; anything from niche
449+
The ability to retrieve explicitly and reliably, from session the sesson down to
450+
a pane. All it takes is a pane's ID to capture its contents or even send it
451+
keys. Used by the skilled programmer, scripting tmux can facilitate orchestrating
452+
terminals in ways previously deemed unrealistic; anything from niche
453453
shell scripts to monitor and react to behavior on systems to high-level,
454454
intelligent and structured control via object oriented libraries, like
455455
[libtmux](https://libtmux.git-pull.com).
@@ -458,6 +458,7 @@ In the next chapter, we delve into optimizations that showcase the latest
458458
generation of unix tools that build upon old, time-tested concepts, like [man pages](https://en.wikipedia.org/wiki/Man_page)
459459
and [piping](https://en.wikipedia.org/wiki/Pipeline_(Unix)), while maintaining
460460
portability across differences in platforms and graceful degradation to ensure
461-
development tooling works on machines missing optional tools. In addition, a
462-
class of powerful, high-level applications that leverage tmux' scripting
463-
capabilities to consistently build tmux workspace via declarative configurations.
461+
development tooling works on machines missing optional tools. Also, the chapter
462+
will introduce *session managers*, a powerful, high-level tool leveraging tmux's
463+
scripting capabilities to consistently load workspace via a declarative
464+
configuration.

manuscript/11-tips-and-tricks.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Read the tmux manual in style
44

5-
`$ man tmux` is the command to load up the "[man page](https://en.wikipedia.org/wiki/Man_page)"
6-
for tmux. You can do the same to find instructions for any command or entity
7-
with a manpage entry; here's two fun ones:
5+
`$ man tmux` is the command to load up the man page for tmux. You can do the
6+
same to find instructions for any command or entity with a manpage entry; here
7+
are some fun ones:
88

99
{language=shell, line-numbers=off}
1010
$ man less
@@ -127,7 +127,7 @@ snippet in conjunction with a [session manager](#session-manager):
127127
entr -c go test ./...; else go test ./...; fi
128128

129129
If the project is a team or open source project, where a user never used the
130-
command before and could missing a required software package, we can give
130+
command before and could be missing a required software package, we can give
131131
a helpful message. This shows a notice to the user to install entr if not
132132
installed on the system:
133133

@@ -225,7 +225,7 @@ panes in a certain order. In addition, there's the burden of assuring the shell
225225
scripts are portable.
226226

227227
A declarative configuration in YAML or JSON configuration abstracts out the
228-
commands, layout, and options of tmux. It'd prevent the mistakes and repetition
228+
commands, layout, and options of tmux. It prevents the mistakes and repetition
229229
scripting entails. These applications are called tmux *session managers*, and in
230230
different ways, they programmatically create tmux workspaces by running a
231231
series of commands based on a config.
@@ -237,8 +237,8 @@ Ruby. There's also [tmuxomatic](https://github.com/oxidane/tmuxomatic), where
237237
you can "draw" your tmux sessions in text and have tmuxomatic build the layout.
238238

239239
I sort of have a home team advantage here, as I'm author of [tmuxp](https://github.com/tony/tmuxp).
240-
I wrote it, already having used teamocil and tmuxinator, but with many more
241-
features. For one, it builds on top of [libtmux](https://github.com/tony/libtmux),
240+
Already having used teamocil and tmuxinator, I wrote my own in python instead of
241+
ruby, with many more features. For one, it builds on top of [libtmux](https://github.com/tony/libtmux),
242242
a library which abstracts tmux [server](#server), [sessions](#sessions),
243243
[windows](#windows) and [panes](#panes) to build the state of tmux sessions. In
244244
addition, it has a naive form of session freezing, support for JSON, more
@@ -284,10 +284,10 @@ paths](#troubleshoot-site-paths) in the appendix.
284284
I've dusted off a C++ space shooter and a new go webapp I've been playing with.
285285
They're licensed under MIT so, you can use them, copy and paste from them, etc:
286286

287-
- c++14 [space shooter minigame](https://github.com/tony/tot-cpp-shmup) - side
287+
- C++14 [space shooter minigame](https://github.com/tony/tot-cpp-shmup) - side
288288
scrolling [shmup](https://en.wikipedia.org/wiki/Shoot_'em_up) demo (sdl2,
289-
cmake, json resource manifests, linux/BSD/OS X compatible)
290-
- golang [tmux web frontend](https://github.com/tony/tot-go-webapp) - display
289+
cmake, json resource manifests, Linux/BSD/OS X compatible)
290+
- Go [tmux web frontend](https://github.com/tony/tot-go-webapp) - display
291291
current tmux session and window information via browser ([gin](https://github.com/gin-gonic/gin),
292292
[bower](https://bower.io/))
293293

manuscript/12-takeaway.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ your brain around concepts. You do not have to understand the intricacies of
66
tmux, let alone the terminal, in a single sitting. Acclimation happens over
77
time.
88

9-
tmux' userbase varies in skill level. Some readers of this book may have just
10-
learned how to use the Prefix key yesterday. Others are looking to tweak their
9+
tmux's userbase varies in skill level. Some readers of this book may have just
10+
learned how to use the `Prefix` key yesterday. Others are looking to tweak their
1111
configurations and host it in their "dot files" on github. There also exists a
12-
very clever hacker, who utilizes the advanced scripting capabilities tmux
12+
very clever hacker who utilizes the advanced scripting capabilities tmux
1313
offers to pilot the terminal in ways previously thought impossible.
1414

1515
We've covered the [server](#server), [session](#sessions), [window](#windows),
16-
and [pane](#panes) concepts. Panes are shells, aka pseudoterminals or
17-
PTYs. The command system. That [configurations](#config) are basically a file
16+
and [pane](#panes) concepts. Panes are shells, AKA pseudoterminals or
17+
PTYs. The command system. That [configuration](#config) is basically a file
1818
filled with commands. An overview of the [target](#targets) system lets
1919
you specify objects to interact with tmux commands. A breeze through [formats](#formats),
20-
a template system with variables to retrieve information on tmux' current state.
21-
How to [send keystrokes](#send-keys) and [copy from tmux panes](#capture-pane)
20+
a template system with variables to retrieve information on tmux's current
21+
state. How to [send keystrokes](#send-keys) and [copy from tmux panes](#capture-pane)
2222
programmatically. A lot of [terminal tricks](#tips-and-tricks) that work across
2323
platforms and well with tmux, including a [file watching workflow](#file-watching)
2424
to run linting, testing, and build commands on file changes. [Two permissively licensed open source projects](#example-projects)

0 commit comments

Comments
 (0)