txtr banner

txtr

50 devlogs
61h 3m 2s
  • A vim style terminal-based LaTeX editor
  • Docs here: https://txtr.benji.mom
  • Existing editors make writing LaTeX too slow, txtr exists to change that!!
  • A continuation of a previous project
Demo Repository

Loading README...

eee

Shipped this project!

txtr - a vim-style LaTeX editor

I built txtr, a modal LaTeX editor that uses Vim keybinds. I’ve spent a long time on this project (~ half my hours not tracked on flavortown) and have made something pretty cool if I say so myself.

My main motivation for making this was down to a couple things:

  • While LaTeX snippet systems do exist to make existing editors better suited to LaTeX, they are not fast enough nor are they that efficient
  • Vim keybinds are amazing, people know them, they’re fast, keyboard focused and tl;dr - if it ain’t broke, dont fix it.

txtr ships with quite a few interesting features, some of which took a lot longer than others:

  • Snippet engine - fully customisable
  • Configuration - plenty of config options and custom themes!
  • Compilation utilities - compile your LaTeX directly in txtr
  • Plugin system - built in plugins and user-installable plugin suppot
  • A full documentation website @ txtr.benji.mom

To those reviewing this project, i hope you like it ! I’ve spent long time writing the documentation for this too so it should have everything you need to get going:
txtr.benji.mom

eee

logo

21/04/26 pt3


the time has come - to ship txtr
yay

whats new??

splash page versions

  • i removed the hard-coded splash page version number and made a separate file that manages all the version logic by parsing the package metadata (with a few backups too)
  • this means that txtr now reads the actual package version instead
  • so if i bump the package version, the splash updates automatically
  • also means the splash pg doesnt drift out of sync with the real release version lol

readme cleanup

  • cleaned up the README so its clearer for first time users of vim style editors
  • kept it light weight because theres loads of info in the docs
  • added a tiny little starter pack of commands and keybinds that you will find useful for this
  • made it clearer what txtr ships with in this ship
  • added a more direct pointer to the docs too (under installation)

other bits

  • did some final testing to make sure everything was working fine and ironed out a few wrinkles in the code, all good to go now!!

changelog

0
eee

logo

21/04/26 pt2


whats new??

zathura pdf viewer plugin

  • finally finished the zathura plugin, its pretty cool imo yay
  • the zathura plugin creates the following commands:
  • :pdf - forward-search the current cursor position in Zathura
  • :pdf sync - same as :pdf
  • :pdf open - open the current file’s PDF in Zathura
  • :pdf close - close the Zathura window launched by txtr
  • if you are wondering what i mean by forward search, ill explain it a little bit below:
    think of pdf sync as essentially a way of telling the pdf viewer where your cursor is in txtr and hence where to open the pdf to, this data is provided by the compilers (if supported), and can be parsed when you run :pdf to ensure that when the pdf viewer launches, you open right on the page you just edited!! pretty neat fr

docs pages

  • wrote up the full docs page for the zathura plugin to explain it in depth even more
  • find it here: txtr.benji.mom/plugins/zathura
  • also updated the custom keybinds doc page to show all the available handlers for custom keybinds, these are the things you can make custom keybinds actually do!!
    alibaba-hug

changelog

  • 9f2073a docs: add available custom kbind handlers
  • c09e172 docs: add zathura plugin pg
  • b465c01 docs: more docs updates - zathura stuff
  • 9135163 docs: update astro config
  • d530cf3 docs: add stuff to readme
  • 656a765 feat: finally finished zathura plugin
  • c25383d feat: more zathura work
Attachment
0
eee

logo

21/04/26


whats new??

  • more work on the zathura plugin

zathura plugin

  • wrote up a few more helpers and methods related to the zathura plugin - rapid pdf viewing soon trust yay

wordcount plugin fixes

  • made some small tweaks to the wordcount plugin command
  • if you only have one word or one character or one line - then the “N words N chars N lines” will not be pluralised (i.e the notification will actually be gramatically correct)
  • so if you only have a single word in your file theys notification says “1 word” … not “1 words”

other stuff

  • fixed a couple typos in the documentation because readability is key fr
  • some general debugging too to make sure that txtr is ready to ship soon (with the exception of the zathura plugin lol)

changelog

  • da009c4 chore: add whitespace
  • 15e575c fix: docs typo
  • f26497c fix: stop pluralising wordcount lines, words and chars :D
  • d699365 feat: zathura tracking method
Attachment
0
eee

logo
21/04/26

whats new???

compiler synctex

  • updated the compiler commands to ensure they also produce synctex
  • synctex is essentially this little bit of extra mapping info that says:
  • this bit of the pdf came from this line in your .tex file
  • that means txtr can now tell a pdf viewer (plugin being worked on rn lol):
  • “hey. my cursor is on this line right here, jump to this spot in the pdf”
  • so in normal human terms:
    the compiler understands where your cursor is in txtr and where that same cursor would be in the pdf
  • this is being added specifically for a plugin im writing rn which will launch zathura, a pdf viewer, and pass this parsed synctex data to it!!

zathura plugin

  • yet another built in plugin lol
  • very much still a wip but ive planned out what its gonna include and written around half of it:
    :pdf, :pdf sync, :pdf open, ``pdf close both :pdf` and `:pdf sync` - willl do the forward search (what i was talking about above w/synctex)
  • pdf open just opens the pdf
  • pdf close will close the window txtr launches
  • i plan to add proper tracking to this too so txtr knows if a window is active and wont ever launch a duplicate one

other stuff

  • made some small changes to the config defaults to mention the zathura plugin
  • wrote most of the zathura plugin helpers
  • fixed a few grammar issues on the docs
    yay

changelog

  • 3130346 feat: more work on zathura plugin
  • de71a45 docs: update some pgs
  • 62e6817 feat: first bit of zathura plugin main
  • 8231803 feat: zathura plugin helpers
  • 960ce9a feat: update compiler to add synctex
Attachment
0
eee

logo

20/04/26 pt2


whats new??

panel resize bug fix

  • fixed the panel resize bug properly this time
  • the issue was basically that overlays were being re-positioned too early during terminal resize, before the app layout had settled
  • this gave some pretty weird behavior and essentially, the editor would lag behind one terminal resize
  • this is all now fixed as txtr defers overlay re-layout until after the refresh/layout pass, then recenters help/config panels using the new terminal size
  • should be way better to use and should actually allow for terminal resizing now yay
  • tl;dr i fixed a bug :)

plugin install/update output

  • polished this all up by making the panel now show colored status lines instead of everything being plaintext
  • commands are highlighted differently from success/error lines so the output from installation of plugins doesnt just look like raw dumped text

other little bits

  • removed some redundant code in the source as i had moved it all elsewhere (including some comments which i was writing as a way to keep track of how stuff worked before i wrote the docs)
  • fixed the broken readme config docs link
  • a general pass on the docs to make sure its all good and changed a few bits (mostly just typos and stuff)

changelog

  • 0a45596 docs: fix a few little docs issues
  • d9e699a fix: center splash when terminal window resizes
  • 34ff050 fix: center infopanel on term resize
  • cfd46fe fix: help menu
  • f8ad8ae fix: cfg panel centering
Attachment
0
eee

logo

20/04/26


whats new??

  • fair bit of debugging today and just trying to figure out how to fix small little issues within the editor
  • i have managed to diagnose the main cause of the bug where the panels (help menu, info panel etc) do not resize with the rest of the editor if the terminal window size changes - this also applies to the splash page
  • in short, textual is buns and i need to write some stuff from scratch
  • ive also started to improved the plugin install logs - they
    will have better color coding and provide more instantaneous visual feedback ie a really easy to spot “success” message if install went well that will of course be green (depending on theme).
  • other than that, just a few misc bits of work like tidying up some code, adding a few comments, remove some redundant todos and i also chopped out the big chunk of comments i wrote in the plugins code as ive placed that all in the docs now anyways

changelog

Attachment
0
eee

logo

19/04/26 pt3


whats new??

  • finally finished off the custom keybinds work!! yay

custom keybinds

  • you can now define and configure your own custom keybinds!
  • the configuration file is seeded at ~/.config/txtr/keybinds.toml when you first run txtr (just like the rest of the config files)
  • this is override-based, so you dont need to redefine the whole editor just to change one key lol
  • you can bind keys to editor actions like cursor_left, system_copy, enter_command etc
  • or bind them straight to commands like :w or :build - this means you can create keybinds to build your latex file even faster etc
  • added :keybinds reload so you can tweak binds and reload them without restarting txtr
  • added :keybinds path too so its obvious what file txtr is reading ur binds from
  • now working on making a proper docs page for all this

mouse drag selection

  • mentioned briefly in the previous devlog but hey ho
  • clicking and dragging in txtr now gives actual visual selection
  • this means if youre in normal or insert mode and drag across text, youll automatically swap to visual mode !!

other stuff

  • finished off the info panel improvements
  • and added a dedicated plugin info row helper - trying my best to reduce the massive clutter in existing files sob-hole

docs

  • wrote up the entire custom keybinds docs section too so its hopefully very easy to figure out how to actually use the custom keybind system!!

changelog

  • chore: remove misc stuff
  • docs: add custom keybinds page + small changes to keybinds page
Attachment
0
eee

logo

19/04/26 pt2


what’s new??

custom keybinds

  • fully integrated the keybind dispatch into the main txtr package - it should (hopefully) work as intended (still yet to test the majority of it but txtr does run)
  • one step closer to having custom keybinds fully working!!

autocomplete popup

  • polished up the autocomplete popup so that it uses up/down arrows for navigation rather than hijacking ur tab key
  • this is way cleaner than the prvious behavior as tab remains dedicated to indents and snippet expansion
  • also styled the popup a little better so its nicer to use
  • the main reason for swapping to arrow keys was so you can go up the menu too, not just down it (trust me. its better)

plugin installation

  • forgot to mention this in the previous devlog (and i ran out of words) but i improved how txtr installs plugins
  • it now checks if a plugin is already exists or already builtin before trying to install
  • warns users properly and points you to enable/update plugins instead.

plugin info panel

  • fixed up the wrapping on this panel so it didnt cut off any characters and when wrapping, doesnt split words in half but instead forces the entire word down to the next line

yay


changelog

Attachment
0
eee

alt text

19/04/26


what’s new??

lots of proper polishing in this devlog tbf - starting to work on making txtr feel more configurable and ready for a proper release :)

custom keybinds [WIP]

  • still actively working on this but custom keybinds are getting there
  • I have written up most of the actual keybind logic and parsing keybinds from user config
  • i have also created some keybind related commands such as :keybinds reload and :keybinds path.
  • txtr also now seeds a dedicated ~/.config.txtr.keybinds.toml file for all your key bind needs !!
  • the main thing to do now is integrate this into the main backend logic - rn the helpers are all there, they just need to be called by the program when necessary.
  • also worked on adding a disabling of defaults feature - either you can rebind a default key or set it to “false” in the config file to disable it

clipboard shortcuts

  • wired up ctrl+insert and shift+insert as copy and paste (would have used ctrl shift c/v but terminals tend to swallow this)
  • this paste/copy action works regardless of the mode you are in (replaces selection on paste if in visual mode, insert/normal just paste it in).

Also working on mouse drag selection - so you can select text by clicking and dragging with your mouse if you prefer that.


changelog

  • 8be8128 feat: make autocomplete better
  • d593ad2 feat: improve install
  • f132c60 feat: mouse selection
  • 8402b79 feat: update defaults
  • c917b13 feat: kbind commands
  • c0cd0d7 feat: keybinds work
  • 5d53873 feat: kbinds dispatch!!
  • 4657765 feat: seed custom kbinds
  • 86ce94b feat: new helper
Attachment
0
eee

txtr devlog - 18/04/26

whats new???

  • honesty, a fair bit of this devlog was more trying to figure out how to add a changelog to my docs site and then giving up sob-pray
  • i have started to work on adding custom keybinds because this just makes using the editor way nicer and allows people to actually configure stuff how they want (so if you dont like vim binds, you can still use txtr :D )
  • the plan is to set out a list of possible things binds can do (all existing behavior of current binds essentially) and also allow for custom keybinds that trigger a : command.
  • i have written a couple helpers for the keybinds and started to work on the keybind dispatch
  • also updated the versions for astro / starlight in the docs site to keep everything up to date !!
    2

changelog

  • 8f29801 fix: bruh
  • 997f415 feat: add new methods for kbinds
  • 514c3c8 feat: start to add keybinds dispatch
  • e2f0d52 chore: update dependency versions (docs site)
Attachment
0
eee

txtr devlog - 18/04/26

whats new???

  • help, config, info and build panels/overlays now all close competing panels first instead of stacking realy weirdly
  • citation scan now checks if the user has set scan_local_dir to True in their config - this is an overall toggle for the citations loading
  • help, config and info panels now resize and recenter better on terminal resize - should look a lot nicer although there is still a couple issues to fix
  • added a “known” section to config defaults which is used internally by txtr in order to track disabled plugins that lie in ~/.config/txtr/plugins in order to avoid spamming the user with notifications saying they have got new plugins found in that dir that have not been activated
  • also wired up the new clipboard stuff so that the freeze plugin can effectively copy the screenshot to your clipboard :)
  • and updated the docs to match some changes ive made that otherwise made them very slightly outdated

changelog

  • 6e6b656 docs: update plugins section
  • f01a1e2 docs: update config section
  • 7bd277f feat: clipboard integration for freeze plugin
  • ffc3336 fix: close any active panels on new panel open
  • 298d116 feat: implement include dir
  • 5198468 fix: infopanel work
  • 3cf3db0 feat: update default configs
Attachment
0
eee

txtr devlog - 18/04/26

whats new???

  • this devlog has a heavy focus on fixing things rather than actually adding new features (albeit a couple new things have been added too)

fixes

  • menus dont stack very nicely currently, for example if you open the help menu and then the config menu - the config menu is essentially pushed beneath the help menu - it looks bad and just doesnt work
  • so im working on making some changes to how the panels are drawn on the screen so essentially, the most recently opened panel will draw on top - in the middle of the screen and will trigger the closing of all other panels (for ease of implementation)
  • i have also done a little bit of work toward an additional config option for the citations manager:
  • you will be able to completely disable the scanning of local .bib files if you would like
  • also removed plugin descriptions from the help menu - caused way too much bloat.

changelog

Attachment
0
eee

txtr devlog - 17/04/26

whats new???

  • lots of additions in this devlog :)
  • updated the wordcount plugin!!
    it now counts words way more accurately - the wordcount is actually latex aware lo;
    ignores latex commands. braces. environments and makes :wordcount an actually useful command
  • polished the freeze plugin:
    added a copy to clipboard option, so the awesome screnshot of ur latex is automatically saved to ur clipboard
    also tightened up the args and output and added some new manifest stuff for plugin config options
  • updated main plugin class to add some new helpers - specifically looking at managing plugin config, so once ive done the frontend work for this, you will see plugin config options in the info panel!!
  • readme is also a whole load slimmer now as all the docs are available on the website and there was no need to write it all out in the readme too
    tl;dr readme debloat

fixes

  • wordcount is accurate now lol and can actually be used to count ur words not ur words and latex commands lol loll

changelog

Attachment
0
eee

txtr devlog - 17/04/26

whats new??

  • docs, docs and more docs!
  • i have written up loads of new pages for the docs and also spent some time diagnosing and debugging the editor as im hoping to do my first ship of this soon (development will continue afterwards anyways)
  • i have written up the entire pages for the compiler config
  • this is detailing things like all the keys available to config the compiler behaviour:

engine chooses the built-in compiler preset
aux_dir controls where aux and log files go when the engine supports it
custom_cmd overrides the preset completely
autocompile supports:

“off” - requires manual compilation
“save” - compiles on file save but must be initiated with :build at least once
“always” - compiles on file save without needing to initiate with :build
build_log_autohide keeps the log closed unless a build fails
build_log_autoclose closes the build log after successful builds
watch_interval controls :buildwatch debounce timing

  • also worked on the citations config page - this details loads of awesome stuff about how to correctly configure txtr’s automatic citation/bib scanner:
    bib_files adds extra .bib files or directories to scan
    enabled turns citation loading off completely
    autoscan reloads citation data when .bib files change on disk
  • the awesome thing is that in bib_files you can define either a directory to more .bib files or a .bib file itself!

changelog

Attachment
0
eee

txtr devlog - 16/04/26

whats new???

  • finished up the freeze plugin - fully working now, feel free to start taking beautiful screenshots of your raw latex!!!
  • also did a whole load of documentation, focused on the config sections and plugin sections:

Plugin Development

This page is about writing plugins, not just installing them.
Choose a format

Use a single-file plugin when the plugin is small and self-contained.

use a package plugin if its more complex and needs plenty of helper functions/methods happy

The built-in freeze plugin is a package plugin and is a good reference example.

minimal workflow:

subclass PluginBase
 set metadata like name, description, version, author
register commands in on_load 
unregister your command section in on_unload

recommended metadata

name
description
author
version
commands

commands is worth filling out even for installed-but-not-loaded plugins because txtr can show it in :plugin info.

changelog

Attachment
Attachment
Attachment
Attachment
0
eee

txtr devlog - 16/04/26

whats new??

  • working on a new demo plugin!!
  • this plugin is a plugin for freeze which is a cli tool that lets you take awesome screenshots of your code
  • i started to write up the main plugin logic i.e what actually happens when you run the plugin and have also done so some stuff toward the helper methods for the plugin
  • i have decided that the freeze plugin will open a panel to show success of ss (this is not 100% necessary but makes a good demo to show off almost all of the plugin api)
  • the plugin is gonna have a whole load of config options too
  • current helper functions ive written include building the full command to send to freeze - so pulling the file dir, lines you selected (if any), any custom params and any further config ie a config file location.
  • also wrote the metadata for this plugin :)
    (it does appear in the plugin list if u install it however doesnt do anything rn lol)
  • also wrote up a snippets overview page on the docs and did a few other tweaks e.g. adding a sitemap and keywords for search engines :)

changelog

Changelog

Attachment
0
eee

txtr devlog - 15/04/26 pt3

whats new???

  • added more snippets!!
  • i added some more miscellaneous snippets - things like bold text and all that jazz
  • also fixed a tiny little issue in the actual snippets logic (tl;dr it seems like i cant spot the difference between square and round brackets)
  • also improved the snippets overview page on the documentation
  • it is a bit more coherent and will follow on well to the rest of the docs pages when i add those to show all the available snippets
  • started working on a freeze plugin - this is the cool bit lol
    –> using all the plugin apis ive strung together including panel drawing, im making a larger scale, package demo plugin that allows users to take fancy screenshots with the freeze cli tool
    –> the plugin will pass freeze any params you config and if you select any text in visual/visual line mode - it will pass just those specific line numbers to freeze!
  • this is why i added to the plugin api earlier to added more context - exposing selected_line_range (the lines you have selected :D )

changelog

Attachment
Attachment
0
eee

txtr devlog - 15/04/26

whats new???

  • added some new config options
    citations.enabled - enable the auto loading of parsing local .bib files to auto complete citations
  • citations.autoscan - toggle if txtr should automatically detech .bib file changes
  • duplicate citation keys across multiple .bib files are deduped
  • plugin api now exposes selected_line_range - the exact lines that the user has selected
  • working on creating a freeze plugin now
  • additionally, i have fixed the styling on multiline comments
    and improved the zip extraction process for package plugins

changelog

Attachment
0
eee

txtr devlog- 15/04/26

whats new??

  • fully implemented an improved visual mode and command mode flow - you can now send commands whilst still having text selected (will be useful for later plugins)
  • command handlers run before txtr clears visual selection
  • after command finishes, txtr still exits back to Normal like before
  • directory argument handling - if you pass a dir to txtr to open not a file, the error is handled nicely
  • builtin plugin update path fixed - builtin plugins can be updated independent of updating the entire pip package :) (installs to ~/.config/txtr/plugins to avoid having to edit the pip package code wherever its stored in your device)
  • updated the bib processing code to remove any duplicate entires and added a config option where you can set autoscan to on or off - if txtr should always check for .bib files in ur local dir :)

changelog

Attachment
0
eee

txtr devlog - 14/04/26 pt3

whats new???

  • working on fixing the visual mode context
  • i realised that in the current state of txtr u cant set keybinds to execute commands so if any plugin wants to access ur lines selected when u run a command for that plugin - it cannot because you need to exit visual mode and enter command mode (clearing your selection)
  • i am working on allowing the use of commands when text is selected in visual/visual line mode
  • also working on fixing the build log autohide feature - for some reason it isnt opening upon error (i need to diagnose)
  • added better error handler when someone tries to run txtr and open a directory as if its a file - txtr will still launch but shows a notification on startup (likewise for running :e <directory>.
  • also fixing up builtin plugins and allowing them to be updated just like user installed plugins
  • currently, :build actually saves ur file too - its a weird bug that needs fixing

fixes

  • build log autohide not opening upon error (mostly fixed)
  • compiling a latex file saves it too - came from when i added build watch, which required autosave but i didnt validate mode enough

changelog

Attachment
0
eee

txtr devlog - 14/04/26 pt2

whats new???

  • plugin system is so much better and it really didnt require much more work lol
  • i have finished off the new plugin context, what this means is that plugins can see more about ur txtr session and so can have more impactful behaviours
  • plugins can access things like the line ur one, the mode you are in, if you have lines selected (if so what lines), the dir you are in, the line count, if your buffer is modified etc
  • there is also a much better configuration system for plugins
  • plugins can define their own configuration options in the config file like:
[pluginname]
setting = ""

there is a helper to access config:

  • self.config(key, default) - reads from [pluginname] whilst self.config() returns the whole plugin section :)
  • plugins can even render their own textual widgets or access txtr’s infopanel helpers to use that instead (much simpler lol)
  • also updated the docs with an overview of plugins (not that brief tho lol)
  • tells you all about plugins and how to use them and little bits on how to develop them
  • i will be making more in-depth docs for plugin development soon, once ive made a few more plugins and ironed out any issues happy

changelog

Attachment
Attachment
0
eee

txtr devlog 14/04/26

whats new???

  • working on an even better plugin api - giving plugins access to more things inside txtr:
    new plugin context added (wip):
  • file path
  • cursor_row, cursor_col
  • mode
  • modified
  • current line
  • line count
  • selection bounds
  • selected lines
  • selected text

Added some more real authoring helpers - self.config reads from [pluginname] in config - so plugins can set their own config options !

  • self.context(app) -returns a structured editor context
  • self.notify() - pretty explanatory
  • self.config() returns whole plugin section
  • self.mount_overlay / unmount - for direct textual widget usage
  • self.open_panel(), self.set_panel_rows(), self.append_panel_text() etc

plugins no longer need to poke private panel wiring directly, now working on full support for plugins to render plugins and also textual widgets

  • also added a plugins section in the docs page (very early stages)

changelog

Attachment
Attachment
0
eee

txtr devlog - 13/04/26 pt2

whats new???

  • finally finished up this big chunk of work i was doing and all the features are fully implemented happy
    :plugin install logs:
  • running the install command will open the info panel and stream all install progress there for you
    git installs show clone/pull output, file downloads/extracts also log their steps
  • startup auto install:
    on launch, if a plugin listed in [plugins] is enabled but missing from disk, txtr now fetches it from the registry automatically
  • this runs before normal plugin loading, so enabled plugins can bootstrap themselves on first launch
  • plugin auto-update
    –> if plugins.auto_update set to true in config, txtr checks the registry on startup and updates installed user plugins whose version differs from the registry
  • also added a :plugin update command for manual updates (no arg will update all, arg will update only the passed plugin)
  • :plugin uninstall - clue is in the name, it unloads the plugin and removes it completely from disk
  • offline plugin commands - this means plugins not loaded show the available commands they have anyway

changelog

Attachment
0
eee

txtr devlog - 13/04/26

whats new???

  • explanded the :plugin command
  • added the main ground work for:
    :plugin update
    :plugin uninstall
    (update is partially implemented)
  • plugin info now shows commands even if they arent registered yet
  • fixed some jank with enable/disable
    –> now uses canonical plugin names properly
    –> avoids duplicate entries in config
    –> added helpers to manage all this
  • plugin install and update flow nearly done
  • when you install, an info panel opens and streams all the progress to you e.g. git clone output etc
  • update - checks installed plugins vs registry versions, builds list o outdated plugins and starts updating them (wip)

other things

  • added a detection for new plugins on startup (not fully finished yet)
    –> notifies user if something in plugin dir but isnt in config

changes to docs

  • added a config overview to the docs page - giving an outline of each config option
  • added a themes page to the config section which details how to create custom themes and the 4 preinstalled themes :)

changelog

Attachment
Attachment
Attachment
0
eee

txtr devlog - 12/04/26 pt3

whats new???

  • did some more work on the info panel
  • i am working on making long strings ie plugin descriptions wrap to new lines
  • sounds simple but for some reason it isn’t sob-hole
  • i have also worked on detecting when a new plugin is present when you launch txtr and sending an alert to the user to let them know (if a fresh plugin placed in plugin dir but not enabled in config)
  • added new rows to help menu plugin section for the commands i will be adding later - :plugin update and :plugin uninstall

changelog

Attachment
0
eee

txtr devlog - 12/04/26

whats new??

  • made a few small edits and also one or two slightly bigger changes in the last hour or so
  • the main aim of this devlog was to allow plugins to show the commands they have available even when they are not loaded
  • this means that if you run :plugin info <plugin> you will actually see all the commands that plugin has without it actually having to be enabled
  • in hindsight, i couldve avoided this by implementing the plugin command system slightly differently but its nothing i cant manage lol
  • this requires an additional command attribute in plugin metadata which details all the commands :)
  • also sped up the typing speed on the animation on the splash page because it seemed a little slow
  • updated default config ready for when i add auto-updates for plugins
  • finished off the help menu stuff for plugins - now each plugin gets its own separate section for its own commands
  • added the command unregister function so plugins can unregister their commands when disabled

changelog

Attachment
0
eee

txtr devlog - 12/04/26

whats new??

  • finally finished off the info panel - from now on, whenever you run :plugin info or plugin list you see a much nicer panel with all the plugin details
  • as a bonus, when you run :plugin list - you can select a plugin with arrow keys, hitting enter on a selected plugin will then open the :plugin info panel for that plugin!!
  • updated the wordcount plugin so it now unregisters its commands when disabled/unloaded by the user
  • started to work on improving plugin metadata stuff - i.e. improving how txtr pulls plugin data
  • worked on the docs and have started writing up a section all about snippets - how to use them, a general overview, the snippets available, configuration etc

changelog

Attachment
Attachment
0
eee

txtr devlog - 11/04/26 pt3

whats new???

  • finally finished up the new plugin commands stuff, lots of changes that make everything much better - mostly surrounding the use of the InfoPanel and better validation
  • info panel is very nearly done but when it is, you will see actual plugin menus not just a panel stolen from the build code
  • enable/disable commands improved:
    :plugin enable now warns for already-enabled / not-installed cases.
    :plugin disable now warns for already-disabled cases and removes the plugin from config cleanly.
  • plugin install and enable now persists the plugins’ canonical name instead of blindly using the registry key or folder name
  • plugin discovery and metadata listing now resolve names from plugin metadata properly - important to package plugins which have folder names diff to the name defined in the manifest

fixes

  • fixed a couple of tiny syntax errors i missed in testing cos that particular function wasnt being called :)

changelog

Attachment
0
eee

txtr devlog - 11/04/26 pt2

whats new??

  • because i was so eager to get the plugin system pushed and working, i repurposed the build panel to also show plugin info and the plugin list when :plugin list or :plugin info is ran - the only issue with this is that the headers from the build panel are still there (i.e. “compiler”, “success/fail” etc)
  • so ive decided to start making a more generic popup overlay for any other panels (might also make this available to plugins so they can render panels)
  • i am working on this rn and have made decent progress toward it
  • the new plugin list panel will allow you to scroll through the available plugins - hitting enter on a selected one will take you straight to the :plugin info panel for that specific plugin!
  • i will be moving all plugin commands away from BuildPanel and onto this InfoPanel
  • additionally, i have worked on a better help menu for the plugins tab - each plugin gets its own section to show the available commands
  • i am also working on improving the commands for plugins in general, giving plugins more access to the editor to render more things and access more data i.e what line you are at and all of those sort of things.

bug fixes

  • fixed a couple logic errors in the demo wordcount plugin
  • wip - improving plugin api and plugin validation + a command unregister sytem so plugins can remove commands when unloaded/disabled

changelog

Attachment
0
eee

txtr devlog - 11/04/26

whats new??

  • the plugin system has been fully implemented and is (i hope) stable
  • theres a lot to talk about around this plugin system but i’ll try to keep it to what you actually need to know lol
  • this devlog involves the integration of plugins into the main txtr package - so they actually work now and will be executed if you enable them
  • txtr loads plugins on startup from two places:
    texitor/core/builtins - builtin plugins (shipped with package)
    ~/.config/txtr/plugins - user installed plugins
  • plugins enabled in your config are auto-loaded at startup. you can also enable/disable/install them at runtime without restarting
  • two plugin formats:
  • single file - just a single python file with a plugin class - set class attributes to define metatdata for the plugin:
 class MyPlugin(PluginBase):
     name = "myplugin
     description = "does something cool"
     version = "1.0.0"
     author = "you"
  • you can also package multi file packages - so they have an entry point, and a seperate manifest.toml which contains all the metadata for the plugin
  • there are plenty of available hooks - will be adding more soon - this includesL
    on_load - call when enabled
    on_unload - call on disable or exit
    on_save - when file saved
    on_cursor_move - after cursor moves
    on_mode_change - normal/visual/insert change
    statusbar_segment - returns (text, color) or None
    there are a few more but ill write it all up in the docs
  • i have also created a demo plugin which measures the wordcount in your active file - it is very minimal and very inaccurate rn, will make it more suited to latex when i get a chance!

changelog

Attachment
0
eee

txtr devlog - 10/04/26 pt2

whats new???

  • finally finished off all the plugin commands!!
    :plugin list - opens a panel with all the available plugins (currently is using the build panel but with diff content - will update this to a standalone panel when i get a chance)
    :plugin info <plugin> - opens a panel with the information on a requested plugin - this is things like author, description, version etc
    :plugin enable - enable a plugin that is currently stored in ~/.config/txtr or a built-in one
    :plugin install - fetch a plugin from the registry and install it
    :plugin disable - unload from current session and remove from config!!
  • also added a new section to the help menu for plugin commands

changelog

Attachment
0
eee

txtr devlog - 10/04/26

whats new???

  • i have managed to finish off the plugin loader logic which is the main plugin class that manages plugins and interprets plugin metadata - took a while but it should be all working now
  • i have also started to work on the plugin commands that will be available, this includes things like:
    :plugin list, :plugin enable/disable, :plugin info, plugin install/uninstall
  • so far, i have implemented the :plugin list command which essentially renders a panel on the screen that shows all available plugins (installed ones and ones that are enabled / disabled)
  • i have done a little bit of work toward the :plugin info command too which will essentially pull plugin metadata (version, author etc) - and draw a panel on the screen showing this
  • also did some statusbar stuff so that plugins can add sections onto the statusbar easily without touching txtr’s source

changelog

Attachment
0
eee

txtr devlog - 09/04/26 pt2

whats new??

  • big docs update :)
  • ive written an entirely new section of the docs - “usage”.
  • essentially, i’ve updated the documentation @ txtr.benji.mom to detail the following things:
  • modes - insert mode, normal mode etc
  • keybinds - all the available keybinds in txtr
  • commands - all the available commands (accessible via the command mode)

on top of this, i have written the quickstart guide which details how to get familiar with using txtr to write LaTeX (briefly) - covering things like snippets, the help menu and the very basic keybinds you need to use txtr as an editor.

go read the documentation !!
txtr.benji.mom happy

changelog

Attachment
Attachment
0
eee

txtr devlog - 09/04/26

whats new???

  • nothing you’ll notice yet if you are using txtr lol

  • i have started to implement the plugin system

  • this is a pretty big feature so will definitely take me a while

  • i have started off by planning out exactly how its gonna work and how the main plugin loading + registry system works:

  • two plugin formats will be supported, single file and package

  • single file plugins will literally just be a single file and when you install, txtr will pull the raw file fron the url provided in the plugin registry for that command

  • package plugins will have a format along the following lines:
    mainfest.toml - stores plugin info ie desc, version, author
    __init__.py / main.py / plugin.py - main plugin file
    and any other helper files that might be needed

  • there will be a basic plugin registry system - literally just a json file on the repo which is fetched by txtr when you want to install or browse plugins - this will also be checked when you launch the program to see if version numbers still match (if not then update plugin)

  • the plugin registry system mainly relies on plugin authors supplying a link to the repo where the plugin is stored - which will be git cloned into ~/.config/txtr/plugin if you choose to install that plugin (will also support a plain zip file)

  • will also have plugin enable/disable so you can have plugins installed that arent actually enabled if needed

  • this is a lot of work lol and so far all i have done is begin to get my head around all this, made a decent plan (in the comments of the plugin.py file lol) and started to implement a generic plugin loader.

  • will be working on the docs a bit now so there isnt loads to put on the site when this is finished

changelog

Attachment
Attachment
0
eee

txtr devlog - 08/04/26 pt2

whats new???

build watch mode!!

  • toggle with :bw or :buildwatch

what does it do?

  • every edit triggers a 5 second timer (can be configured to extend/shorten) when enabled
  • once typing pauses for that duration, the file is automatically saved and compiled to pdf
  • statusbar will show “watching..” when this is toggled
  • build panel will only open on failure !
    **tl:dr - build watch mode will build your file every N seconds if a change has occurred - giving you a live preview of your work if you have a pdf viewer open at the same time (eg zathura) **

config append command

  • i realised that some config options are lists - specifically, the citations.bib_files option - this means if you ran config set ... it would override any additional directories, so i made config append where you can edit config and append additional options to the item in config if it is a list !

im now starting to work on the plugin system - this is quite a big thing so expect a few devlogs before a working system is in place lol

changelog

Attachment
0
eee

txtr devlog - 08/04/26

whats new??

  • did some changes to the editor and the docs site :)
  • i have removed that random balatro background on the docs splash page (it was cool but not practical lol)
  • replaced this bg with a simple grid, much cleaner and suitable
  • finished off the citations logic too
  • when you type \cite{ in insert mode, the autocomplete popup now shows matching entries from your projects .bib files instead of LaTeX commands. (also works with all cite variants like \citep{
  • essentially, the bib parses class scans files for the keys to each citation (using some very weird regex), and returns a list of the brief details of the source
  • the cite completer then pairs each key with a respective description which has the year, author and title
  • from there, the auto complete popup renders back to you all available sources you can cite (key and a des so you can identify them)
  • also added a :bib command which maually rescans .bib files (use if you added something to your bib)
  • bib files are auto-scanned on startup and when you open a new file.
  • you can configure additional bib paths with citations.bib_files in config :)

fixes

  • fixed a few bugs related to the docs site - main one was the splash page bg being rendered on all docs pages which was pretty annoying

changelog

Attachment
Attachment
0
eee

txtr devlog - 07/04/26

whats new???

  • wrote some more regex ( im starting to hate this stuff) for parsing bibliography files
  • more specifically, to extract all your source entries in any bibliography file so that auto completion can be offered for citations !
  • i have split this logic across two different files:
    bibparser.py - which holds all the regex for extracting citations/source entries from any passed bibliography files (.lib files)
    citecompleter.py - which scans the local directory for all .bib files (also checks the config file if any additional dirs have been passed), and proceeds to parse them using bibparser.py before then providing the completions for these - which will show up inside of the auto complete popup (only when typing \cite{}.)
  • updated default configuration ready to work with the new custom bibliography dir stuff
  • also updated the docs site to now have installation instructions - plenty more to come, this guide is more detailed than the readme because i didnt want to ovecrowd the readme lol.

see the new installation guide @ https://txtr.benji.mom/installation

changelog

Attachment
0
eee

txtr devlog - 07/04/26

whats new??

  • decided to some work on the logo for txtr and it came out pretty nice - also made the favicon for the site !!
  • i followed the tutorial on anchor.hackclub.com - its very good, you should defo check it out
  • spent a while refining this logo and making it look as good as possible
  • also then integrated this logo throughout the docs site - took a while because the config for starlight (astro) is kinda cooked - had to rewrite some css for the splash page and stuff but now the splash page shows the logo instead of “txtr” and likewise with the header that is shown on all pages
  • also threw the logo into the readme just so everything looks nice :)
  • i am now starting to work on a citation helper for the editor - it parses the .bib files in your current dir (and any passed) and will scan for citation ids so when you type \cite{….} - the autcomplete popup will show the available sources you can cite - i’m only just starting out on this so expect this to come a little later on

check out the timelapse of me doing all this here

fixes

  • fixed a few bugs regarding the splash page - mainly just some random tpyos which i hadnt found during testing since that function wasnt being called at the time and also fixed the animations for varying terminal sizes :)

changelog

Attachment
Attachment
Attachment
0
eee

txtr devlog - 0604/26 pt3

whats new??

  • finally finished up the splash screen and the respective animations for it
  • the splash screen shows up whenever you run txtr without a file argument
  • an ascii logo is picked at random (out of 4 available) each time you launch txtr
    animation modes:
  • on top of logo rotation, the way the logo is drawn is also randomised into 3 modes:
  • static - logo appears instantly, in full
  • typewriter - characters are revealed line by line to form the entire logo after a short delay
  • glitch - for the first 3 seconds, characters in the logo are randomly swapped with block characters - until this proability decays to 0

also added a cool animation at the bottom of the splash screen (worked on it a couple devlogs back too) - its a latex ticker that is essentially a scrolling strip of latex snippets that runs along the bottom of the splash page.

  • recent files list - the splash page shows you the last 10 files you opened and also has a hints bar with the keybinds you can use to navigate
  • any key not handled will dismiss splash page and take you straight into editing

there was a lot of code rewriting in this one but got there in the end :)

changelog

Attachment
0
eee

txtr delovlog - 06/04/26 pt2

whats new??

  • pretty short devlog but oh well
  • i have done some more work toward the splash page - its getting there lol
  • the main css and stuff for it is all done, i just need to finish off some little tweaks and i am working on adding an animation to the bottom of it that shows different LaTeX commands on a carousel thingy
  • starting to implement this all into the app function init methods so it opens on startup if you just run txtr without a file
  • also locked in all the recently opened file stuff - that is all done.
  • the splash page will have txtr written in some funky ascii fonts that rotate every time u launch txtr :)
  • the current state of the splash page is pretty basic - missing the animation, version number and hints (keybinds u can use on it e.g. q to quit etc)

changelog

Attachment
0
eee

txtr devlog - 06/04/26

whats new???

very peak devlog today

  • of course, ive done a little bit more work toward making a really nice splash page but i have also done some stuff related to a docs page for this editor
  • i realise that theres a lot this editor has in terms of binds and snippets and for it to really be fast for LaTeX, you need to know how to use it
  • so i’ve started making the documentation for it (even bought a domain lol)
  • the docs rn are incomplete and only have an introduction to what txtr is, more to come soon trust
  • now what i have the site setup though, im gonna do some more work on the editor itself - trying to finish off the splash page today or tomorrow :)

check out the docs at https://txtr.benji.mom

changelog

Attachment
Attachment
0
eee

txtr devlog - 05/03/26 pt2

whats new??

  • i’ve started work on something pretty interesting if you ask me :)
  • i am working on a splash page for when you launch txtr without a specific file - i.e if you just run txtr instead of txtr <filename.tex>
  • the splash page is really just to look nice but it will also serve a purpose by showing you your recently viewed files
  • i have finished the recently viewed files logic and started on the actual css and layout of the splash page itself
  • the recent file opens are saved to ~/.config/txtr/recents.json and can store a maximum of 10 recently opened files!
  • this means it will be much easier to launch previously opened files and you wont have to even worry about typing the path to them out if you’ve opened it before.

there are no actual visible changes yet since ive done backend work for it only and havent integrated into the main loop but heres some other stuff ive worked on and not demoed fully yet :)

changelog

Attachment
0
eee

txtr devlog - 05/03/26

whats new??

jump to error
the build panel that appears whenever you compile a latex file now has two different views:

  • log view (default) - shows the raw compiler output, completely unchanged, the footer now shows an additional indicator if any errors or warnings have occurred alongside a little hint that pressing e will take you to the new errors view !
  • errors view (press e) - a clean list of parsed LogEntry objects (essentially shows all the errors that have occured during compilation (if any) - there is a level bade (E for error, W for warnings), you also get filename:line for each error !
  • keybinds for the panel:
  • e - switch to errors view
  • b - back to log view
  • j/k - navigate errors or logs
  • enter - jump edit cursor to selected error’s line
  • q/esc - close panel
    whilst this panel does show errors to you in a nice format, its main purpose is to provide error jumping - you can hit enter when hovering over an error in errors view and you will jump there in the editor

i’ve also finished up the compiler logic to make this all possible lol

changelog

Attachment
0
eee

txtr devlog - 04/04/26

whats new??

  • regex, regex and a whole load more regex
  • ive been working on parsing errors from the outputs of all your favourite latex compilers (thank you latexmk for such a nice format :) )
  • essentially, im making the editor read through all the logs output from the compiler and detect errors - this will eventually be used later when i do error jump-to-line and maybe even that cool squiggly red underline you see in other editors lol
  • of course there are loads of types of errors and i can’t do infinite regexes for them so ive done the main ones - things like hbox, warnings, unknown control sequences etc
  • i am getting there (slowly lol)
  • also added new keybinds available in visual mode (visual line too) - all the keybinds like G and stuff work:
  • h/j/k/l - character navigation
  • w/b/e - word motions
  • 0/$ - line start/end
  • g g / G - first/last line -
  • ctrl+d / ctrl+u - half-page scroll
  • Arrow keys
    this means you can do something like VggGy and you will copy the entire file !

changelog

Attachment
0
eee

txtr devlog - 04/04/26 pt2

whats new???

  • the new command registry is fully in place and implemented everywhere it needs to be!
  • i have rewritten the entire of the commands file so that every single one of the currently registered commands (and yes i am every single command) - now uses the proper decorator and registry to define itself
  • i have made very few behavioral changes to the editor and instead have simply implemented changes to the command definitions so that they match the new system
  • did add a few aliases for certain commands - my current favorite being an alias for exit:
    :imstuckintxtrpleasehelpme - which exists txtr :)

checkout the timelapse of this session here

i am now working on a better error processing system for the compiler - it will be able to read error logs from your chosen compiler and then output them in a nicer format (perhaps line jumping later??)

changelog

Attachment
0
eee

txtr devlog - 04/04/26

whats new??

  • more backend changes lol because who doesnt love backend
  • i have finished the refactor of the command registry code - registering commands is now entirely managed by the command registry itself (not just with code dotted around everywhere)
  • each registered command will now have to carry a handler callable alongside its display metadata - all managed by the dispatch method, which splits the typed string, tries the longest match first (ie “config set” before trying to match the command to “config”) then if a matching command is found. calls the handler with any args passed - which of course, then carries out whatever that command may need to do.
  • the next thing i need to now do is updated the commands code in the app folder so it uses the new decorators - again, now behavioral changes, only improving the usability, and readbility of the code - and also thinking ahead for when i do plugins :)

changelog

Attachment
Attachment
0
eee

txtr devlog - 03/04/26

  • quick lil devlog for now, nothing to really commit as its not stable yet but i thought id still explain what ive been doing
  • i have started to work on the new command registry system - specifically, the changes i am making are about the command dispatch - the current command dispatch uses a massive list of if statements to parse commands and this isnt any good lol
  • the new command dispatch is gonna be much more expandable and will also work better when i try to add a plugin system later
  • the new system will have decorators when you define a function for each command ie something along the lines of :
@register(command="..." ... ) etc
def command_function(self) .....

much nicer and way easier to add commands, also means i’m not typing if statements constantly lmao

Attachment
0
eee

txtr devlog - 03/04/26 pt3

woohoo!! finished the refactor

whats new???

  • the old app.py file which was ridiculously long has now been split up into 3 different files:
  • __init__.py - the core app class, storing the key dispatch loop, autocomplete helpers, and everything else that makes up the core of the app itself.
  • actions.py - this mixin stores every single action method, this is things like mode transitions, cursor movement, yank/paste/delete and all other editing operations
  • commands.py - the commands mixin which is the core logic for all commands sent to the command line - this is things like write, quit, build, clean etc
  • the main txtr app class then inherits from all three of these child classes!!

what isnt new??

  • no behaviour changes (only some very minimal ones regarding warnings sent on build fail) - purely just a structural refactor

  • i am now working on getting rid of the massive if statement chain that is currently used by the command dispatch and instead making it a much more maintainable system that works directly with the command register :)

changelog

  • fix(ui): fix syntax error - too many typos lol [be51c76]
  • fix(ui): more syntax errors lmao [90f0e16]
  • feat(ui): more actions stuff [1e8c79e]
  • feat(ui): finish off actions stuff in refactor [35eb5cb]
  • refactor(ui): main app package stuff sorted - autocomplete, refresh, snips etc [a6f9363]
  • docs(pypi): bump version v1.8.7 [01071e5]
Attachment
1

Comments

eee
eee 18 days ago

(removed the hyper links on the commit msgs so i wasnt exceeding char limit)

eee

txtr devlog - 03/04/26 pt2

whats new?

  • done some more work toward restructuring the painfully long app.py file - i have finished the commands logic (although it still need changing later on so its more expandable and works with plugins)
  • have done a decent bit of the actions logic - this is stuff like switching modes, auto brackets and tab stops - most of the backend is staying exactly the same, the code still performs the same functions, i am just changing how its laid out :)
  • also getting started now on the init file for the new app code - this will manage snippet triggers, key binds (stuff like esc, u, dd etc

fixes

  • whilst i was refactoring i realised there was some weird logic going on with validation when building stuff - from now on, when you try build a file whilst there is a currently running build, that build is cancelled and you are sent a notification to let you know that it has been cancelled and that the most recent build to be passed to the editor is now being built
  • also fixed a couple syntax errors in the new commands code - stupidly left in the old app.py file when testing so my imports for app in the rest of the code were resolving to there and not the new app dir with the new code lol

changelog

  • refactor(ui): first chunk of new actions logic (9362601)
  • refactor(cui): app logic - init (9309225)
  • fix(ui): fix syntax error lol - when testing the import was still being resolved by old app.py (78f1fe4)
Attachment
0
eee

txtr devlog - 03/04/26

whats new?

  • changed the snippet system, instead of using | to identify where a tab stop lies inside a snippet, I have moved to using ${N} where N is the nth tab stop - this also allows for placeholder values by doing ${N:placeholder} which is pretty cool :)
  • started to restructure the main app file too, it was getting way too long and just confusing to program
    –> i am going to split it down into mainly an actions class/file and a commands class/file - currently i am implementing commands as i did previously with just loads of if statements but this isnt very expandable so I will be changing the command registry system slightly once i’ve finished the refactor so it works alongside the command dispatch and not just the help menus.

changelog

  • feat(latex): update default snippets for new system (66b5c22)
  • refactor(main): remove misc file (dd37cfd)
  • docs(pypi): bump version - v1.8.6 (20ffcd4)
  • refactor(ui): start to refactor main app logic (6dbe894)
Attachment
0