sites

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

index.md (4385B)


      1 Vim Browse
      2 ==========
      3 
      4 ![Screenshot](https://user-images.githubusercontent.com/9212314/68340852-7d6d9380-00e7-11ea-9705-51ed098eba2a.gif)
      5 
      6 
      7 Description
      8 -----------
      9 
     10 This patch offers the possibility to move through the terminal history, search for strings and use
     11 VIM-like motions, operations and quantifiers.
     12 
     13 
     14 Default Behavior:
     15 -----------------
     16 The default behavior listed below can be adapted:
     17 
     18 **Enter Vim Browse Mode**:
     19 * `Alt`+`c`
     20 
     21 **Operations in Vim Browse Mode**:
     22 * Enter Visual Mode: `V` / `v`
     23 * Enter Yank Mode: `Y`
     24 
     25 **Motions in Vim Browse Mode**:
     26 * Basic motions: `j`, `k,` `h`, `l`, `H`, `M`, `L`, `0`, `$` like in VIM
     27 * Word Move operators: `w`, `W`, `e`, `E`, `b`, `B` similar to VIM
     28 * Search Operators: `/`, `?`, `n`, `N` for forward / backward search
     29 * Jump to the cursor position prior to entering Vim Browse Mode: `G`
     30 * Repeat last command string: `.`
     31 * in Visual Mode `v`: use `t` to toggle block selection mode
     32 
     33 **Custom Commands**:
     34 Custom arrangements of the aforementioned commands can be defined in the configuration file:
     35 
     36 The shortcut
     37 
     38 `
     39 struct NormalModeShortcuts normalModeShortcuts [] = {
     40 	{ 'C', "/Cheese\n" },
     41 }
     42 `
     43 
     44 searches for the next occurrence of Cheese when the letter C is pressed.
     45 Usecases are for instance to jump between executed commands or to last error in a compile error
     46 output.
     47 
     48 No sanity checks are performed wrt. the custom shortcuts; the program does not check if the command
     49 is circular. Hence the (useless) shortcut
     50 
     51 `
     52 struct NormalModeShortcuts normalModeShortcuts [] = {
     53 	{ 'C', "C" },
     54 }
     55 `
     56 
     57 triggers an infinite loop as soon 'C' is typed in normal mode, because `C` is contained
     58 in the shortcut as control character.
     59 
     60 **Search Mode**
     61 In search mode, the cursor jumps to the next occurrence of the search string, shifts the screen
     62 if necessary  and highlights all occurrences of the search string that are currently visible on
     63 screen.
     64 
     65 All motions -- including the search mode -- are currently circular,  (hence if no search result is
     66 found, the search is continued at the top or bottom of the history, depending on the search
     67 direction).
     68 
     69 Notes
     70 -----
     71 * Currently based on the [Scrollback patch](https://st.suckless.org/patches/scrollback/),
     72   this dependency will be removed (see __Bugs__ section).
     73 * The patch is applied both to a non-patched version and to a patched version of st
     74   and can be tried out [here](https://github.com/juliusHuelsmann/st) (browse the available branches
     75   for finding the different versions of the patch). Contributions are welcome.
     76 
     77 Bugs
     78 -----
     79 * The following two 'Bugs' will be resolved by removing the dependency on the Scrollback patch
     80   which is currently work in progress:
     81   * Normal mode overrides the output at the cursor position if the current command is still
     82       running and outputs text while not in alternate screen mode (not vim / htop etc)
     83   * in Alternate Screen mode, the current position is reset on repaint (e.g. htop).
     84 
     85 
     86 Download
     87 --------
     88 **Most Recent**:
     89 * [st-vimBrowse-20191107-2b8333f.diff (Github)](https://github.com/juliusHuelsmann/st/releases/download/patchesV1/st-vimBrowse-20191107-2b8333f.diff)
     90 
     91 **All versions**:
     92 * [st-vimBrowse-20191107-2b8333f.diff (Github)](https://github.com/juliusHuelsmann/st/releases/download/patchesV1/st-vimBrowse-20191107-2b8333f.diff)
     93 * [st-vimBrowse-20191107-2b8333f.diff (attached)](st-vimBrowse-20191107-2b8333f.diff )
     94 
     95 Authors of the [Scrollback patch](https://st.suckless.org/patches/scrollback/)
     96 ------------------------------------------------------------------------------
     97 * Jochen Sprickerhof - <st@jochen.sprickerhof.de>
     98 * M Farkas-Dyck - <strake888@gmail.com>
     99 * Ivan Tham - <pickfire@riseup.net> (mouse scrolling)
    100 * Ori Bernstein - <ori@eigenstate.org> (fix memory bug)
    101 * Matthias Schoth - <mschoth@gmail.com> (auto altscreen scrolling)
    102 * Laslo Hunhold - <dev@frign.de> (unscrambling, git port)
    103 * Paride Legovini - <pl@ninthfloor.org> (don't require the Shift modifier
    104   when using the auto altscreen scrolling)
    105 * Lorenzo Bracco - <devtry@riseup.net> (update base patch, use static
    106   variable for config)
    107 * Kamil Kleban - <funmaker95@gmail.com> (fix altscreen detection)
    108 * Avi Halachmi - <avihpit@yahoo.com> (mouse + altscreen rewrite after `a2c479c`)
    109 * Jacob Prosser - <geriatricjacob@cumallover.me>
    110 
    111 
    112 Authors of the Vim-Browse Patch
    113 --------------------------------
    114 * Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>