-
Notifications
You must be signed in to change notification settings - Fork 1
Vim browse manual
Julius Hülsmann edited this page Apr 26, 2021
·
3 revisions
The vim-browse patch offers the possibility to move through the terminal history-buffer, search for strings and use VIM-like motions, operations and quantifiers. It operates on top of the history-patch, which comes with a set of optional features that can be compiled-in as separate patches. It is possible to move through terminal history while an application currently writes to the terminal buffer and comes with an overlay highlighting the current search results on screen and showing current operation / motions / search string.
The following variables can be adapted from the defaults defined in config.def.h
:
-
buffSize
: Size of the buffer history in lines -
highlightBg
highlightFg
: Background / Foreground color of search results -
currentBg
: Background color used in order to highlight the current history cursor via a cross -
nmKeys
: custom commands (= sequence of operations/motion), the first character is the key to be used in order to execute the sequence of operations / motions. -
styleSearch
style of the search string overlay -
style
styles of the command string overlay depending on the currently active operation ([yank, visual, visualLine, no operation]).
User input | Operation / Motion active | Description |
---|---|---|
Alt+c |
Enter normal mode (give input control to the vim /history patch) |
|
[esc] / [enter] /i
|
no | Enter insert mode (return control back to st ) and abort resp. terminate operation |
[esc] / [enter]
|
yes | Abort resp. terminate the current operation / motion |
user Input | Mode |
---|---|
y | yank mode (yank 'till the next motion). Terminated via a motion or as described above |
v | visual mode (start selection of characters in REGULAR mode, that can be toggled to RECTANGULAR selection mode via motion t ). Terminated by yanking or as described above |
V | visual line mode (start selection of entire lines). Terminated by yanking or as described above |
User Input | Operation active | Description |
---|---|---|
[0-9] |
Quantifier | |
i /a
|
yes | inner / around (used for motions like yiw ([operation]{i/a}{w/W/}/}/[/]/(/)/"/' ). Matching parenthesis is not as sophisticated as in vim. |
[backspace] |
Remove last-inserted character from search string / quantifier | |
. |
reexecute last command | |
c |
clear search string, last command | |
r |
manual repaint | |
/ , ?
|
start forward / backward search | |
K / J
|
Scroll buffer up / down | |
k / j
|
Move cursor up / down | |
h / l
|
Move cursor left / right | |
H / M / L
|
Move cursor to first line, center, last line on screen | |
s |
Toggle MODE_ALTSCREEN (e.g. if vim /htop are currently running, press s in order to go to the history buffer filled by previous commands. |
|
S |
Toggle MODE_ALTSCREEN once | |
G |
move (history) cursor to the current insert cursor | |
g |
move (history) scroll offset to the offset of the insert-cursor | |
0 / $
|
move cursor to the begin / end of the current line | |
t |
visual |
toggle visual select mode |
n / N
|
move cursor to the next / previous occurrence of the search string | |
w / W
|
move cursor to the beginning of the next word (with different word delimiters) | |
b / B
|
move cursor to the beginning of the previous word | |
e / E
|
move cursor to the next word-end | |
[CTRL] u / [CTRL d
|
scroll buffer half a screen up / down | |
[CTRL] b / [CTRL f
|
move cursor to the first / last line on the screen and scroll the buffer up / down | |
y | yank |
yank selection |
[CTRL] h
|
hide cursor | |
Custom commands | can be added to the variable nmKeys in the config.def.h combining the aforementioned commands. |
- Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>
- Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>
- Kevin Velghe: Underline highlight fix
- smartding: detect and fix clipboard bug