sites

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

index.md (4569B)


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