1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
|
*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:
|