*minimap-vim.txt* Blazing fast minimap for vim, powered by code-minimap
*minimap*

=============================================================================
CONTENTS                                                          *minimap-toc*

  1. Commands.................................|minimap-commands|
  2. Options..................................|minimap-options|
  3. FAQ......................................|minimap-FAQ|

=============================================================================
1. Commands                                                  *minimap-commands*

Minimap                                                               *Minimap*

  Show minimap window

MinimapClose                                                     *MinimapClose*

  Close minimap window

MinimapToggle                                                   *MinimapToggle*

  Toggle minimap window

MinimapRefresh                                                 *MinimapRefresh*

  Force refresh minimap window

MinimapUpdateHighlight                                 *MinimapUpdateHighlight*

  Force update minimap window

MinimapRescan                                                   *MinimapRescan*

  Force recalculation of minimap scaling ratio.
  Scans every line of the buffer to calculate the scaling ratio, then updates
  the minimap. Scanning can cause noticeable lag on large files.

=============================================================================
2. Options                                                    *minimap-options*

g:minimap_left                                                 *g:minimap_left*

  Type: |Number|
  Default: `0`

  If set to `1`, the minimap window will append to the left.

g:minimap_width                                               *g:minimap_width*

  Type: |Number|
  Default: `10`

  The width of the minimap window in characters.

g:minimap_window_width_override_for_scaling *g:minimap_window_width_override_for_scaling*

  Type: |Number|
  Default: `2147483647`

  Caps the window width for scaling the minimap.

  A smaller value will give more granular details for short lines at the cost
  of generating a minimap wider than the minimap window. A larger value will
  give more accurate scaling at the cost of losing details in short lines.

  The result of this value being used (i.e. the width getting capped) is a
  minimap that scrolls horizontally — any lines that are longer than this value
  will extend past the end of the minimap window width. In some cases, the
  minimap will shift the 'viewport' to the right, resulting in _only_ the long
  lines being shown, which is why the default scaling behavior is to fit long
  lines in the window width.

  The minimap's horizontal scale is also based off the minimap's width
  (`g:minimap_width`). Increasing this will allow more room for horizontal
  details.


g:minimap_highlight_range                           *g:minimap_highlight_range*

  Type: |Number|
  Default: `0`

  If set to `1`, the minimap window will highlight over a range of lines
  representing the visible lines in the buffer.

g:minimap_auto_start                                     *g:minimap_auto_start*

  Type: |Number|
  Default: `0`

  If set to `1`, the minimap window will show on startup.

g:minimap_auto_start_win_enter                 *g:minimap_auto_start_win_enter*

  Type: |Number|
  Default: `0`

  If both this and `g:minimap_auto_start` are set to `1`, the minimap window
  will show on `WinEnter`.

g:minimap_block_filetypes                           *g:minimap_block_filetypes*

  Type: |Array|
  Default: `['fugitive', 'nerdtree', 'tagbar']`

  Disable minimap for specific file types.

g:minimap_block_buftypes                             *g:minimap_block_buftypes*

  Type: |Array|
  Default: `['nofile', 'nowrite', 'quickfix', 'terminal', 'prompt']`

  Disable minimap for specific buffer types.

g:minimap_close_filetypes                           *g:minimap_close_filetypes*

  Type: |Array|
  Default: `['startify', 'netrw', 'vim-plug']`

  Close minimap for specific file types.  If a filetype listed here is also
  present in `g:minimap_block_filetypes`, the minimap will prefer to close
  rather than disable.

g:minimap_close_buftypes                             *g:minimap_close_buftypes*

  Type: |Array|
  Default: `[]`

  Close minimap for specific buffer types.  If a filetype listed here is also
  present in `g:minimap_block_buftypes`, the minimap will prefer to close
  rather than disable.

g:minimap_exec_warning                               *g:minimap_exec_warning*

  Type: |Number|
  Default: `1`

  If set to 1, enables code-minimap not found warning message at startup.

g:minimap_highlight_search                         *g:minimap_highlight_search*

  Type: |Number|
  Default: `0`

  If set to 1, the minimap will highlight matches to the last search done by
  the user. The highlight group `g:minimap_search_color` will be used for
  highlighting matches.

g:minimap_background_processing               *g:minimap_background_processing*

  Type: |Number|
  Default: `0`

  If set to 1, the minimap will use background processing to get the longest
  line in a file, which is used for minimap scaling. The default behavior will
  tend to lag with long files, as all the minimap calculation is done serially
  at file-open time, blocking until the longest line is obtained. Background
  processing will allow editing/navigation sooner, with the minimap 'popping
  in' when the longest line is ready.
  On MacOS, this requires `gnu-wc`, as the default version of `wc` does not
  support the `-L` (longest line) flag.

g:minimap_git_colors                                     *g:minimap_git_colors*

  Type: |Number|
  Default: `0`

  If set to 1, the minimap will highlight changes as reported by git.
  The highlight groups `g:minimap_diffadd_color`, `g:minimiap_diffremove_color`,
  and `g:minimap_diff_color` are used for additions, deletions, and line changes
  respectively.

`g:minimap_enable_highlight_colorgroup`

  Type: |Number|
  Default: 1

  If set to 1, minimap will create anautocommand to set highlights on color scheme changes.

g:minimap_base_highlight                             *g:minimap_base_highlight*

  Type: |String|
  Default: `'Normal'`

  The base color group for minimap. Possible values are any |group-name|.

g:minimap_cursor_color           *g:minimap_cursor_color* *g:minimap_highlight*

  Type: |String|
  Default: `'minimapCursor'`

  The color of the highlighting for the current position. Possible values
  are any |group-name|.

g:minimap_search_color                                 *g:minimap_search_color*

  Type: |String|
  Default: `'Search'`

  The color group for matched seaches shown in the minimap.
  Possible values are any |group-name|.
  Requires `g:minimap_highlight_search` to be enabled.

g:minimap_diffadd_color                               *g:minimap_diffadd_color*

  Type: |String|
  Default: `'minimapDiffAdded'`

  The color group for added lines (as reported by git).
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.

g:minimap_diffremove_color                         *g:minimap_diffremove_color*

  Type: |String|
  Default: `'minimapDiffRemoved'`

  The color group for removed/deleted lines (as reported by git).
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.

g:minimap_diff_color                                     *g:minimap_diff_color*

  Type: |String|
  Default: `'minimapDiffLine'`

  The color group for changed lines (as reported by git).
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.

g:minimap_range_color                                   *g:minimap_range_color*

  Type:  |String|
  Default: `'minimapRange'`

  The color group for window range (if highlight_range is enabled).
  Possible values are any |group-name|.
  Requires `g:minimap_highlight_range` to be enabled.

g:minimap_cursor_diffadd_color                 *g:minimap_cursor_diffadd_color*

  Type:  |String|
  Default: `'minimapCursorDiffAdded'`

  The color group for the cursor over added lines
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.

g:minimap_cursor_diffremove_color           *g:minimap_cursor_diffremove_color*

  Type:  |String|
  Default: `'minimapCursorDiffRemoved'`

  The color group for the cursor over removed lines
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.

g:minimap_cursor_diff_color                       *g:minimap_cursor_diff_color*

  Type:  |String|
  Default: `'minimapCursorDiffLine'`

  The color group for the cursor over modified lines
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.

g:minimap_range_diffadd_color                   *g:minimap_range_diffadd_color*

  Type:  |String|
  Default: `'minimapRangeDiffAdded'`

  The color group for the window range encompassing added lines
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.
  Requires `g:minimap_highlight_range` to be enabled.

g:minimap_range_diffremove_color             *g:minimap_range_diffremove_color*

  Type:  |String|
  Default: `'minimapRangeDiffRemoved'`

  The color group for the window range encompassing removed lines
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.
  Requires `g:minimap_highlight_range` to be enabled.

g:minimap_range_diff_color                         *g:minimap_range_diff_color*

  Type:  |String|
  Default: `'minimapRangeDiffLine'`

  The color group for the window range encompassing modified lines
  Possible values are any |group-name|.
  Requires `g:minimap_git_colors` to be enabled.
  Requires `g:minimap_highlight_range` to be enabled.


g:minimap_cursor_color_priority               *g:minimap_cursor_color_priority*

  Type: |Number|
  Default: `110`

  The priority for the cursor color group in the minimap.
  A higher valued priority will overwrite a lower valued priority.

g:minimap_search_color_priority               *g:minimap_search_color_priority*

  Type: |Number|
  Default: `120`

  The priority for the search color group in the minimap.
  A higher valued priority will overwrite a lower valued priority.

=============================================================================
3. FAQ                                                            *minimap-FAQ*

|Q:|
  Highlight and scrolling are not working properly.

|A:|
  Check the vim version you are using. minimap.vim requires vim 8.1.1084+ or
  neovim 0.5.0+.


|Q:|
  Integrated with diagnostics or git status plugins?

|A:|
  Git integration is supported. See `g:minimap_git_colors`.


|Q:|
  Minimap window is too wide for me, how to use it as a simple scrollbar?

|A:|
  You can reduce the width of the minimap window:

      let g:minimap_width = 2

|Q:|
  How do the color priorities work?

|A:|
  A higher priority color group will override a lower priority color group.
  By default, search > cursor/window position > git colors

|Q:|
  I don't like the default highlight group, how to change it?

|A:|
  Choose any one of the highlight groups (or define a new one) and just set it
  for minimap like this:

      hi MinimapCurrentLine ctermfg=Green guifg=#50FA7B guibg=#32302f
      let g:minimap_highlight = 'MinimapCurrentLine'


|Q:|
  Minimap shows up as a jumble of characters?

|A:|
  Check that your encoding is set to `utf-8` and not `latin1` (for Vim users),
  and check that you're using a font that is Unicode-compatible.


|Q:|
  What is `g:minimap_highlight_range` and how do you use it?

|A:|
  You can have the minimap highlight all the visible lines in your current window
  by setting `g:minimap_highlight_range`.  If you use Neovim, and your version
  is recent enough (after November 7, 2020), you can set this option to update
  the highlight when the window is scrolled.


|Q:|
  `g:minimap_highlight_search` searches don't go away until writing to buffer.

|A:|
  Not a question, but I'll help you anyway. It is recommended that you create
  a mapping to run `:nohlsearch` and clear the minimap all in one action.
  For example:

      nnoremap <silent> `` :nohlsearch<CR>:call minimap#vim#ClearColorSearch()<CR>`


LICENSE                                                       *minimap-license*
=============================================================================

The MIT License (MIT)

Copyright (c) 2020 Wenxuan Zhang

=============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
