sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (4495B)


      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 **Version 1**
     55 The previous version of this patch is based on the pre-applied [Scrollback patch](https://st.suckless.org/patches/scrollback/).
     56 - *Based on `295a43f`*: [st-vimBrowse-20200604-295a43f.diff](st-vimBrowse-20200604-295a43f.diff)
     57 
     58 **Version 2**
     59 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).
     60 - *Based on `st-0.8.3`*:
     61 - [st-vimBrowse-20200607-0.8.3.diff](st-vimBrowse-20200607-0.8.3.diff)
     62 - [st-vimBrowse-latestRelease-0.8.3.diff](https://github.com/juliusHuelsmann/st/releases/download/vim2_1/st-meta-vim-full-20200607-43a395a.diff)
     63 - *Based on `9ba7ecf`*:
     64 - [st-vimBrowse-20200607-9ba7ecf.diff](st-vimBrowse-20200607-9ba7ecf.diff)
     65 - [st-vimBrowse-latestRelease-9ba7ecf.diff](https://github.com/juliusHuelsmann/st/releases/download/vim2_1/st-meta-vim-full-20200607-9ba7ecf.diff)
     66 
     67 Authors of the Vim-Browse Patch
     68 --------------------------------
     69 * Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>
     70 * [Kevin Velghe](https://github.com/paretje): Fix: Underline highlight
     71 * [dadaurs](mailto:david.wiedemann@outlook.com): Port Version 1 to `st-295a43f`
     72