Repository navigation
Releases
v0.9.0
Added
- textpen draws the editor in a terminal that speaks Kitty graphics, as bateri does: the same editor
as pictures, with the mouse and the keys, where it used to open your own$EDITOR. Ctrl is what ⌘ is
there (Ctrl+/ comments a line). - A build without the drawing.
cargo build --no-default-featuresmakes a smaller file that opens
your$EDITORwhere no terminal hosts textpen. - Each release has two files for a machine. A small one, which bateri and kablo install, and one
that draws in any terminal that speaks Kitty graphics, whichinstall.shinstalls.
Changed
- The hint of the button that fits a picture to its tab names its key. It says Ctrl+0 where there is
no ⌘ key (it said Super+0), and ⌘0 on a Mac as before. - The keys on the status line stay put. They stand beside the branch, and no longer move when a
selection's count or "Saved" shows on the right.
v0.8.0
Added
- Zoom pictures and PDFs. Pinch, double-tap with two fingers, or press
⌘+,⌘-and⌘0.
The status line shows the zoom; click it to fit the page again. - Make the text larger. Away from a picture or a PDF, the same keys and a pinch change the size
of textpen's text. The terminal's own text stays as it is, and Text size in the settings
sets it too. - Drag a file out of textpen. Drag a file from the tree, or a tab, onto a terminal pane to type
its path there, or onto another app.
These need bateri 0.29 or later. In other terminals textpen works as before.
Changed
- A picture's size is now in the status line, not under the picture.
v0.7.0
Added
- A terminal can open files and folders in textpen. A release now says in its
app.jsonthat
textpen opens a file and a folder (opens), which lets a terminal offer it for the paths you
click.
Changed
- Opened on a file, textpen starts without the sidebar.
textpen notes.md, and$EDITOR, open
the file on the whole page;⌘Bbrings the files back and takes them away again for that run,
and what you kept of the sidebar is not changed. Opened on a folder, or on nothing, the kept
setting rules as before.
v0.6.1
Changed
- A new icon. A text cursor between the two marks of code,
<and>, which bend round it as
the lids of an eye. The one before, three lines of text and a cursor, came out as faint bars at
the size a terminal draws it in a tab. The page with no file open wears the same mark.
v0.6.0
Added
- A PDF opens in its tab. Its pages are drawn one under the other and scrolled by the terminal, in
the middle of the tab (a page wider than the tab scrolls across, 40 points in from its left);
⌘+,⌘-and⌘0zoom (to 400%, sharp at every step: a terminal that draws a page where it is
seen draws one of any size) and fit the width,⌃G(or the page in the status line) goes to a page, and
the words can be selected (a double click a word, a triple click a line,⌘Aall) and copied with
⌘C.⌘Ffinds in every page, as words, whole words or patterns, with the matches marked on the
pages. A PDF with no words in it says it has none. It needs a terminal that draws a page of a PDF;
an older one says it does not show PDFs. - The program reads PDFs. For a PDF the program tells the page how many pages it has and how large
each is, which of them have words and where every letter stands, and searches through all the pages
(regular expressions, case, whole words), so that the page can draw a PDF, select and copy from it
and find in it. A PDF with more than 10,000 pages, or past 8 MiB, is left as too large. The program
does not run what a PDF holds; it reads its pages. - Releases carry a signed
app.json. A terminal that follows textpen (bateri, from its list of
apps) reads it to find the newest file it can open and to know the file is the one the maintainer
released.make sumswrites it and its signature besideSHA256SUMS, and the release checks
refuse a release without them. - Leave what git ignores out of the tree. The setting
Hide ignored files, or Toggle Ignored Files in
the Tree in the palette. It is off to begin with, and what git ignores is shown grey as before.
Changed
- Building from source asks for Rust 1.99 (it was 1.88).
Fixed
- The keys keep the setting they come to in view. In a pane too short for all the settings, those below
its edge were changed without being seen.
v0.5.1
Fixed
- Scrolling a comparison is smoother. The two sides no longer have the whole page built again for
every line they pass, colouring the lines a fold hides no longer holds up a frame, and the hatching
of a tall gap, such as all of the left side of a new file, is cut into pieces that are the same
picture, which a bateri that keeps what it drew does not draw again.
v0.5.0
Security
- Opening a project no longer runs a command its own
.git/confignames. A project that was only
unpacked could run one as soon as textpen read its status (filter.<name>.cleanand.process) or
read a file its partial clone lacks (core.sshCommand). The filters a repository names are turned off
for what textpen asks of git, those of your own config (a globalgit lfs install) stay, and nothing
textpen asks goes to the network.
Added
- A folder of repositories. Opened on a folder that is in no repository, textpen finds those in its
folders, two levels down, and each is one in its own right: the panel of changes has each with its branch
and its lines, folding as a folder does, its files under it, and those with no changes one line at the end;
the tree has its branch beside it and greys what it ignores; the status line has the branch of the file
shown, and a file is compared and marked by its own repository. Folders that begin with a dot,node_modules,
targetand the like are not looked in, a link is not followed, and a project in a repository has that one
alone. The repository of the file in front is asked as often as ever; the others take turns, every ten seconds
or so.
Fixed
- The sidebar keeps every button of its head. Its edge could be dragged so narrow that Collapse
folders and Hide sidebar were cut off and could not be pressed: it now stops where they all fit
(228 points, from 160). - The search's field keeps its buttons inside it. In a narrow sidebar
.*stood past the field's
edge, and the line under it was cut off; the field gives way and the line goes on to a second. - The field of a dialog and of the sheet of keys has room around its text. The words stood against
the field's edge: the room asked for around them was not there. - The pointer says what is under it over the palette, a dialog and the sheet of keys. It was the hand
everywhere, ground and card alike; it is now the hand on what a press does something on, the I-beam on
the field and the arrow on the rest. - Dragging the sidebar's edge no longer selects text. A press on the right of the edge also went to the
editor beside it, which selected from there as the edge was dragged.
v0.4.0
Added
- The changed files under their folders. The button at the head of the panel of changes,
tin
it, or Toggle Changes as a Tree stands the files as the tree of the project has them, folders first:
a press orhlfolds a folder, which says the strongest of what git says of what is in it, and
the panel stays that way for the project. - How many lines each change adds and takes away. The panel of changes says
+12 −3beside each
file, as it is on the disk against the last commit, and the same for each group and folder of what is
in it. A file git does not keep says all its lines.
Changed
- What git ignores is grey in the tree, and so is all that is in a folder it ignores. Grey used to
go by the name alone (target,node_modules, a dotfile) and stop at that row: a file.gitignore
matches by another name stayed plain, and so did all that was inside the grey folder.
Fixed
⌘Kopens the palette with the keyboard in its field. On some window sizes and text sizes the
field lost the keyboard as the palette slid in: nothing typed reached it and no key did anything until
a click.
v0.3.0
Added
- A file beside the last commit.
⇧⌘D, the button at the end of the tab strip (on a file git
says is changed) or Compare with Last Commit in the palette shows the file in two columns: what the
last commit keeps of it on the left (it cannot be changed), the file itself on the right, with
the lines that differ in colour (red taken away, green added, blue changed, and in a changed line the
words that differ). A side with fewer lines has a hatched gap, so the same lines stand at the same
height, and the two scroll together, down and across. The right side is the file's own editor: type,
undo and save as ever. The header names the commit, counts the changes (1 of 5, orRenamed, same textfor a file that only moved), and has the arrows
for the change before and after (⌥F5,⇧⌥F5) and a button that closes it, as Esc does. Where
there is nothing to lay out so (a binary file, one outside a git repository, too many lines) it says
why. The program has the callscompareandcompare-basefor it (docs/calls.md).
The colour of a change crosses from one side to the other between them, in a curve where the two
sides have different numbers of lines, and a thin line marks the place on the side without its lines. - Fold what did not change, and take a change back. Beside the last commit the long stretches
both sides have the same are folded on both sides alike, three lines kept either side of a change and
N unchanged linesat the end of the line each folds from, so that the two stay as tall as each other.
The arrows in the gutter or⌘⌥]open a stretch on both sides, as does a caret that goes into one
with Find or Go to Line; the button in the header,⌃⌥]and⌃⌥[show all lines and fold them again.
A chevron at the first line of a change or⌃⇧⌫takes it back: the lines as the commit has them
replace it, as one edit that⌘Zundoes, and the line break at the end of the text comes out as the
commit's does. - A panel of the changed files. The sidebar has a third panel beside Files and Search, Changes
(⇧⌘G): the files git says are changed, and, below them, those it does not keep, each with its
icon, its name, its folder and its letter. A press on one shows it beside the last commit (a file
taken away has nothing on the right, which cannot be changed; a renamed one is read under its old
name; one git does not keep has nothing on the left), and the keys stay in the panel: the arrows go
from file to file, ⏎ goes into the editor. A file the panel opened that you did nothing in is
closed as the next comes, so that going through fifty files leaves no fifty tabs. In a narrow
pane the panel is a drawer that closes on the file. Compare with Last Commit is also in the menus
of the editor, a tab and a file of the tree.
v0.2.0
Added
-
An installer.
curl -fsSL https://raw.githubusercontent.com/bateri/textpen/main/install.sh | shtakes the
newest release, checks it againstSHA256SUMSand puts it in~/.local/bin. -
Drop a file on the tree to put it in the project. Files dragged from Finder over the page mark
where they would go and say so ("Upload to docs/"): a folder's row is that folder, a file's row
is its folder, and the empty room in the tree is the project's own folder. Dropped, each file is
a faint row in that folder at once, with how far it has got at its end ("42%") and a Cancel button
under the pointer; Cancel, ⌃C and closing the view delete what was received, so no half file is
left. Where the name is taken, one question is asked, Replace or Keep Both (the new file isfoto 2.png), and Esc gives the file up; no file is written over another unasked, even one that came
to be there while the bytes were on their way. A folder dropped is not uploaded ("Folders can't
be uploaded yet"); the files dropped with it are. A picture dropped alone is shown in a tab from
the file you gave before it is all in. A file dropped on the editor is uploaded beside the file
shown, the same on this machine as over ssh. The program has
the callsplaceanduploadfor it (docs/calls.md), and the page needs a terminal that opens
it atlua0.1 (bateri does). -
Upload Files and Download from the keyboard. The right-click menu of a folder in the tree, and
the command palette where a folder is chosen in the tree, have Upload Files: the terminal's Open
panel, and what you choose goes into that folder as a dropped file does. A file's menu, and the
palette where a file is chosen (or shown), have Download: the Save panel proposing the file's
name, the file written where you choose, and a note, "Downloaded foto.png". The program has the
calldownloadfor it (docs/calls.md). -
Files go through the terminal's folder, not its stream. Where the terminal keeps a folder on
textpen's machine (bateri does, here and on a server it reaches with kablo), a file you drop,
paste or choose, and a file you download, cross a pipe in it at the speed of the disk or the
line. textpen asks the same wherever it runs; a terminal that keeps no folder still carries the
file in its stream. -
Paste a picture into a Markdown file.
⌘Vwith a picture on the pasteboard, while you edit a
Markdown file, puts the picture beside the file asimage.png(image-1.png,image-2.png
where the name is taken, so nothing is written over) and writeswhere the caret
is. The preview holds a place for the picture, with how far it has got, until it is whole, then
draws it. A picture pasted in any other file goes nowhere. It uses the program'splace
(withdash) anduploadcalls (docs/calls.md). -
A file on its way waits out a pause, and says when it has stopped. The terminal pauses for a
few seconds now and then while a file crosses it (4.4 s at the longest measured): the row keeps its
percent and shows no error. With no word for 30 seconds the row says "Upload stalled" and has a
Retry button, which asks the terminal for the file's bytes again from the start (what was received
is not kept; the old attempt's part is another file and is deleted when it ends). A screen reader
reads a row as "Uploading, 42 percent", and "Upload stalled". In a narrow pane (80×24) the name of a
row gives way first, its last 22 points faded, and what is said at its end fades over its last 22
points where it does not fit (a stalled row with Cancel under the pointer); the whole of each is
in the tip. -
A picture opens in its tab. A click on a PNG, a JPEG or an SVG in the tree shows it fitted into
the tab (smaller in its proportions where it does not fit, never made larger), with how large the
file is and its pixels under it ("48.2 KB · 640 × 480"). A picture of more than 8 MiB, or of more
than 4096 pixels either way, is not drawn: the tab says "Too large to preview" with the file's
size, and offers Close Tab. A file named like a picture that is none (a text, a JPEG that is
cut short, an SVG that says no size) opens as it did, and so does any other picture format. The
program reads and measures the file (the sizes are in the first bytes, no library is added) and
gives it to the terminal to hold while the tab is open, which needs a terminal that opens the
page atlua0.1 (bateri does; with one that does not, a picture is the placeholder it was). The
program has the callspictureandreleasefor it (docs/calls.md). -
A Markdown preview draws the pictures it names.
is the picture, fitted to the
width of the text, wheredocs/x.pngis a PNG, a JPEG or an SVG in the project, found from the
Markdown file's own folder; one that is not there, is past the limits above, is out of the project
(a path that climbs out of it, or leads out by a link), or is an address, is its words, as it was. -
The editor has a right-click menu, as VS Code's: Cut, Copy, Paste, Select All, Toggle Line
Comment and Select All Occurrences, each with its keys, then Find in Project (the selection, or
the word at the caret), Revert Change (on a line git has changed) and Command Palette. A right
click outside the selection puts the caret there;⇧F10opens the same menu at the caret. -
The lines that differ from git's index are marked in the editor, as VS Code marks them: a bar
down the gutter (between the numbers and the buttons that fold) along the lines changed (blue)
and added (green), a small red triangle where lines were taken away, and the same marks on the
editor's right edge so that they are found in a long file. A click on one, or⌥F5and⇧⌥F5
(go to the next and the previous change), opens a peek under the change with the lines as they
were (on red) and as they are (on green), Revert Change (an edit that can be undone), the change
before and after, andEscto close it. The original is git's index, so a staged change is not
marked and neither is a file git does not keep; the marks follow what you type, and the setting
Changes in the gutterturns them off. A file with CRLF line ends or a byte order mark is compared
as textpen holds it, not as one change from its first line to its last. The program has a
diffcall for it (docs/calls.md), thechangestopic tells when git's index was written, and
the Settings havediffDecorations.
Changed
- The editor's cursor and selection are drawn as your terminal draws its own (in bateri: the
cursor's shape, its rounding and glow, how it blinks and glides, the rounded selection), and
follow it when you change those settings; a terminal that does not say how leaves the editor's
own look. - The tree shows whether a folder is open by its icon alone, with no arrow beside it, and the
pointer stays a hand over its rows when one is clicked. - The tree scrolls across when a name is wider than the sidebar, where it cut the name short with
an ellipsis: every name is whole, what git says of a file stays at the sidebar's edge (or right
after a name that goes past it), and each level of folders is indented further, 16 points where
it was 12. - Dragging the sidebar's edge keeps up with the pointer in a project with many folders open: while
the edge is held the tree makes only the rows in view, and a move that leaves the edge where it
is draws nothing. - The numbers of the lines keep more room to their left, away from the tree.
- The status line tells a selection of more than 256 KiB, or one over more than 256 carets, in bytes
("1.2 MB selected"), where it counts the characters of what is selected up to that: the editor
says its places in bytes, and a text that large is not read to be counted. Where the caret was
when a file was left is kept in bytes too: one kept before comes back that many bytes into the
file, a little earlier than it was where the text has accents before it. - The editor is a page of pencere's kit, in Lua, and the text is in the terminal's own editor, drawn
in its font, in place of a web page with CodeMirror. It reads 33 languages in place of well over
a hundred: JavaScript, TypeScript, JSX, TSX, Rust, Go, C, C++, C#, Java, Kotlin, Swift, PHP,
Python, Ruby, the shell, Lua, HTML, XML, Markdown, JSON, YAML, TOML, INI and.env, CSS, SCSS,
Less, SQL, PostgreSQL, SQLite, the Dockerfile, the Makefile and a diff, each with its own comments, indentation
(Python's after a colon, Ruby's and Lua's by their words) and folding. Each open file keeps what
can be undone, its cursors and its folds while another is shown. The tooltips, menus and the list
of commands are the terminal's own. - The quick open keeps up with a project of tens of thousands of files, the list filling in as it
is searched, and a long Markdown file's preview is read where you changed it and shown to its
end, a screen of it at a time. - A file's language is told by its name, its extension or its first line (
#!/usr/bin/env python3),
and every one of the 33 is in Change Language. - The other places of what is selected are marked in the text. Select Line, Join Lines, Duplicate
Line Up, Insert Line Below, Split Line, Transpose Characters, Delete to Start and End of Line
and Fold All are commands, in the palette (⌘I,⌃Jand⌃⌥[are the keys of three of them);
Delete Line is also on⌃⇧K. - A box opened with something in it (the find bar on the words you selected, the palette on
>
and a query, the search, the dialog that renames a file) has that selected, so that what you
type takes its place; renaming selects the file's name, not its folders or its extension.
Backspace in a palette with nothing typed goes back to the files. - A file that changed on disk while you had no changes of your own is changed where it differs, not
loaded again wh...