index.md (4245B)
1 Vim Browse 2 ========== 3 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](https://github.com/juliusHuelsmann/st-history-vim), which comes with a set of optional features that can be compiled-in as separate patches. Please [leave a star](https://github.com/juliusHuelsmann/st-history-vim). 4 5 Contributions & Bug Reports 6 --------------------------- 7 * [Report / Solve Patching issues](https://github.com/juliusHuelsmann/st) with a new version of `st` 8 * [Contributions and Bug reports](https://github.com/juliusHuelsmann/st-history-vim) 9 10 11 Default Behavior: 12 ----------------- 13 A more detailed overview on the commands can be found [here](https://github.com/juliusHuelsmann/st-history-vim/wiki/Vim-browse-manual) and in the file `normalMode.c`. 14 15 **Enter / Leave different modes**: 16 17 - `Alt`+`c`: Enter normal mode 18 - `[esc]`/`[enter]`/`i`: Enter insert mode or abort current operation / motion 19 20 **Operations:** 21 22 - `y`/`v`/`V`: enter `yank` / `visual` / `visual line` mode. 23 24 **Motions:** 25 26 - `k`, `j`, `h`, `l`, `H`, `M`, `L`, `0`, `$`, `n`, `N`, `w`, `W`, `b`, `B`, `e`, `E`, `Ctrl u`, 27 `Ctrl d`, `Ctrl b`, `Ctrl f`, `y`, `?`, `/` like in Vim 28 - `.` re-execute last command (which is shown in the overlay) 29 - Infixes `i`, `a`: like in Vim, in conjunction with an operation and motion or pre-defined search char `(){}[]<>"'` (`yiw`, `vi[`, ...) 30 - `[0-9]` Quantifiers 31 - `[backspace]` erase last quantifier / letter in search and command string 32 - `r` manual repaint 33 - `K`, `J` Scroll buffer up / down 34 - `s`, `S` toggle [once] `MODE_ALTSCREEN` 35 - `G`, `g` move the history cursor to the current insert position / offset 36 - `t` toggle rectangle / normal selection mode 37 - `Ctrl h` hide overlay 38 - Custom commands can be defined in the configuration files (see `nmKeys`) 39 40 Patching and customization 41 -------------------------- 42 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`: 43 - `buffSize`: Size of the buffer history in lines 44 - `highlightBg` `highlightFg`: Background / Foreground color of search results 45 - `currentBg`: Background color used in order to highlight the current history cursor via a cross 46 - `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. 47 - `styleSearch` style of the search string overlay 48 - `style` styles of the command string overlay depending on the currently active operation ([`yank`, `visual`, `visualLine`, `no operation`]). 49 50 Download 51 -------- 52 If you want to try out the current version of the patch before patching your own build, check out [this repository](https://github.com/juliusHuelsmann/st), which contains a merged version of this patch with a reasonable configuration. 53 54 Based on a [custom history patch](https://github.com/juliusHuelsmann/st-history-vim), 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](https://github.com/juliusHuelsmann/st-history-vim). 55 - *Based on `st-0.8.4`*: 56 - [Version 2.2 (latest)](https://github.com/juliusHuelsmann/st/releases/download/vim2_2/st-meta-vim-full-20210425-43a395a-8.4.patch) 57 - [Version 2](st-vim-0.8.4.patch) 58 - *Based on `st-0.8.3`*: 59 - [Version 2.2 (latest)](https://github.com/juliusHuelsmann/st/releases/download/vim2_2/st-meta-vim-full-20210425-43a395a.diff) 60 - [Version 2](st-vim-0.8.3.patch) 61 62 Authors of the Vim-Browse Patch 63 -------------------------------- 64 * [Julius Hülsmann](https://github.com/juliusHuelsmann) - <juliusHuelsmann [at] gmail [dot] com> 65 * [Kevin Velghe](https://github.com/paretje): Fix: Underline highlight 66 * [dadaurs](mailto:david.wiedemann@outlook.com): Port Version 1 to `st-295a43f` 67 * [smartding](https://github.com/smartding): detect and fix clipboard bug 68