All Projects → juliusHuelsmann → st-history-vim

juliusHuelsmann / st-history-vim

Licence: MIT license
Development of the "vim patch" and a minimalist "history patch" for the suckless simple terminal (st).

Programming Languages

c
50402 projects - #5 most used programming language
Roff
2310 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to st-history-vim

st
Repatch repository of developed 'Vim Browse' and 'Alpha Focus Highlight' patches for simple terminal (st).
Stars: ✭ 25 (-41.86%)
Mutual labels:  suckless, simple-terminal, terminal-emulator, suckless-terminal
slock-flexipatch
An slock build with preprocessor directives to decide which patches to include during build time
Stars: ✭ 58 (+34.88%)
Mutual labels:  suckless
prop-types-definition
Patch for prop-types to get property type definition in runtime
Stars: ✭ 15 (-65.12%)
Mutual labels:  patch
upp-components
A collection of packages for U++ framework.
Stars: ✭ 36 (-16.28%)
Mutual labels:  terminal-emulator
dwm-vanitygaps
My dwm vanitygaps build (incl. individual patches)
Stars: ✭ 26 (-39.53%)
Mutual labels:  suckless
CleanDmenu
🚀 Floating and enhanced dmenu build
Stars: ✭ 25 (-41.86%)
Mutual labels:  suckless
sent
a simple plaintext presentation tool
Stars: ✭ 22 (-48.84%)
Mutual labels:  suckless
deltaq
Fast and portable delta encoding for .NET in 100% safe, managed code.
Stars: ✭ 26 (-39.53%)
Mutual labels:  patch
Goblocks
Status bar for dwm
Stars: ✭ 50 (+16.28%)
Mutual labels:  suckless
bifrost
🌈 burning rainbow bridge between your terminal and serial ports
Stars: ✭ 70 (+62.79%)
Mutual labels:  terminal-emulator
duff
Pure OCaml implementation of libXdiff (Rabin's fingerprint)
Stars: ✭ 20 (-53.49%)
Mutual labels:  patch
FC2MPPatcher
A community-made utility for patching Far Cry 2 to yet again support multiplayer online.
Stars: ✭ 25 (-41.86%)
Mutual labels:  patch
libudev-zero
Daemonless replacement for libudev
Stars: ✭ 157 (+265.12%)
Mutual labels:  suckless
dipa
dipa makes it easy to efficiently delta encode large Rust data structures.
Stars: ✭ 243 (+465.12%)
Mutual labels:  patch
patchmanager
Patchmanager for SailfishOS
Stars: ✭ 21 (-51.16%)
Mutual labels:  patch
godot-xterm
Terminal emulator for the Godot game engine.
Stars: ✭ 61 (+41.86%)
Mutual labels:  terminal-emulator
jj
An evolution of the suckless ii(1) file-based IRC client
Stars: ✭ 80 (+86.05%)
Mutual labels:  suckless
Mirai
Mirai 未来 - A powerful Minecraft Server Software coming from the future
Stars: ✭ 325 (+655.81%)
Mutual labels:  patch
python-jamf
`python-jamf` is a library for connecting to a Jamf Server that maps directly to the Jamf Pro Classic API. It is the basis for the `jctl` tool to automate patch management & packages and many other items.
Stars: ✭ 37 (-13.95%)
Mutual labels:  patch
le9-patch
[PATCH] mm: Protect the working set under memory pressure to prevent thrashing, avoid high latency and prevent livelock in near-OOM conditions
Stars: ✭ 164 (+281.4%)
Mutual labels:  patch

st-history / st-vim-browse

History patch for suckless' simple terminal (st), which

  1. Maintains two distinct cursor positions for inserting new content and viewing old content.
  2. Keeps the interface to the line buffer unchanged, and hence is supposed to yield less merge conflicts
  3. Separates the history logic and the scroll-back implementation in different patches, allowing to use the patch with a custom / more sophisticated scroll-back logic (like the 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:

  1. in the source code of normalMode.c: function kpressHist() -> executeMotion(),
  2. in the Wiki, or
  3. at the Suckless release page.

Patches

In this repository I develop the following separate patches on corresponding branches

  1. historyVanilla: essential history patch which provides logic and utility functionality for moving through the terminal history.
  2. patch_scrollback: simple bindings which allows the user to use the historyVanilla patch.
  3. patch_sel rewrites the selection routine, allowing for a selection larger than the currently displayed chunk of the buffer.
  4. 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.
  5. 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.
  6. patch_vim: offers vim-like motions for moving through the history, yanking text and searching.

Assembling the latest patches

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.

Build the vim patch

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.

On the history buffer implementation

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].