History patch for suckless' simple terminal (st
), which
vim browse
patch).This patch can be used in combination with the st-vim-browse
patch, which is a sophisticated
scroll-back patch operating on top of the history functionality and is also developed in this
repository. The vim patch provides >50 vim-like motions & operators and a search & info overlay.
Documentation on how this patch is used can be found:
normalMode.c
: function kpressHist()
-> executeMotion()
,In this repository I develop the following separate patches on corresponding branches
historyVanilla
: essential history patch which provides logic and utility functionality for
moving through the terminal history.patch_scrollback
: simple bindings which allows the user to use the historyVanilla
patch.patch_sel
rewrites the selection routine, allowing for a selection larger than the currently
displayed chunk of the buffer.patch_column
: when shrinking the width of the window, invisible content is kept instead of
removed, such that it becomes visible when the width is increased again.patch_repaint
visualizes new line-repaint-events via a distinct color in a color column.
This comes in handy when debugging / developing a custom scroll-back
functionality.patch_vim
: offers vim-like motions for moving through the history, yanking text and searching.The script release.sh
on branch master
/ tool
assembles the latest versions of all patches
and provides them in a newly created patches directory.
It generates (1) a raw patch for each branch, and (2) meta-patches for useful combinations of the
patches provided above.
./release.sh 1 1
The patches are released on this release page and on the suckless page.
The patches can be applied to st
's source and build code via
patch < [PATCH_NAME]
make
after removing/adapting an existing config.h
to contain the changes shipped in the config.def.h
.
The pre-patched current version of the full vim patch with a reasonable configuration and some
additional patches can be tried out in this repository,
in which this patches are also ported to new releases of st
,
and released.
The interface to the buffer term.line
is kept unchanged and points to a chunk inside a history
round-buffer; changes are hence limited only to very few functions.
When inspecting history or scrolling down, the position of the chunk is changed.
Therefore, functions which operate in the history buffer are 'annotated' to trigger a history Operation
.
The vanilla history patch
provides utility function for conveniently moving through history.