Vim Browse
The vim-browse patch offers the possibility to move through the terminal history-buffer, search for strings using VIM-like motions, operations and quantifiers. It overlays the screen with highlighted search results and displays the current operation / motions / search string in the bottom right corner. The patch operates on top of the history-patch, which comes with a set of optional features that can be compiled-in as separate patches. Please leave a star.
Contributions & Bug Reports
- Report / Solve Patching issues with a new version of
st - Contributions and Bug reports
Default Behavior:
A more detailed overview on the commands can be found here and in the file normalMode.c.
Enter / Leave different modes:
Alt+c: Enter normal mode[esc]/[enter]/i: Enter insert mode or abort current operation / motion
Operations:
y/v/V: enteryank/visual/visual linemode.
Motions:
k,j,h,l,H,M,L,0,$,n,N,w,W,b,B,e,E,Ctrl u,Ctrl d,Ctrl b,Ctrl f,y,?,/like in Vim.re-execute last command (which is shown in the overlay)- Infixes
i,a: like in Vim, in conjunction with an operation and motion or pre-defined search char(){}[]<>"'(yiw,vi[, ...) [0-9]Quantifiers[backspace]erase last quantifier / letter in search and command stringrmanual repaintK,JScroll buffer up / downs,Stoggle [once]MODE_ALTSCREENG,gmove the history cursor to the current insert position / offsetttoggle rectangle / normal selection modeCtrl hhide overlay- Custom commands can be defined in the configuration files (see
nmKeys)
Patching and customization
The VIM patch performs changes in the config.def.h file, which need to be manually merged into a pre-existing custom config.h file. The following variables can be adapted from the defaults defined in config.def.h:
buffSize: Size of the buffer history in lineshighlightBghighlightFg: Background / Foreground color of search resultscurrentBg: Background color used in order to highlight the current history cursor via a crossnmKeys: custom commands (= sequence of operations/motion), the first character is the key to be used in order to execute the sequence of operations / motions.styleSearchstyle of the search string overlaystylestyles of the command string overlay depending on the currently active operation ([yank,visual,visualLine,no operation]).
Download
If you want to try out the current version of the patch before patching your own build, check out this repository, which contains a merged version of this patch with a reasonable configuration.
Based on a custom history patch, which is already applied in the patches below with full set of history features. A more minimal version of the vim patch can be generated from the st-history repository.
- Based on
st-0.8.4: - Version 2.2 (latest)
- Version 2
- Based on
st-0.8.3: - Version 2.2 (latest)
- Version 2
Authors of the Vim-Browse Patch
- Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>
- Kevin Velghe: Fix: Underline highlight
- dadaurs: Port Version 1 to
st-295a43f - smartding: detect and fix clipboard bug