Awesome Open Source
Awesome Open Source

📡 minimap.vim

Blazing fast minimap for vim, powered by 🛰 code-minimap written in Rust.

CI License Vim Neovim pre-commit Contributors


✨ Features

  • Blazing-fast (see benchmark).
  • Dynamic scaling.
  • Real-time highlight.
  • It can be used to scroll buffer (in vim's way!).

📥 Installation


  • 🛰code-minimap is required. The plugin receives rendered minimap from it.
  • vim8.2+, or neovim 0.5.0+.

Use your favorite plugin manager, vim-plug for example:

Plug 'wfxr/minimap.vim'

If you need to install the plugin manually, you can refer to this issue: #2.

You can use cargo to install 'code-minimap' simultaneously (Only recommended for rust users):

Plug 'wfxr/minimap.vim', {'do': ':!cargo install --locked code-minimap'}

📑 Example configuration

let g:minimap_width = 10
let g:minimap_auto_start = 1
let g:minimap_auto_start_win_enter = 1

🛠 Commands

Flag Description
Minimap Show minimap window
MinimapClose Close minimap window
MinimapToggle Toggle minimap window
MinimapRefresh Force refresh minimap window
MinimapUpdateHighlight Force update minimap highlight

⚙ Options

Flag Default Description
g:minimap_auto_start 0 if set minimap will show at startup
g:minimap_auto_start_win_enter 0 if set with g:minimap_auto_start minimap shows on WinEnter
g:minimap_width 10 the width of the minimap window in characters
g:minimap_highlight Title the color group for current position
g:minimap_base_highlight Normal the base color group for minimap
g:minimap_block_filetypes ['fugitive', 'nerdtree', 'tagbar' ] disable minimap for specific file types
g:minimap_block_buftypes ['nofile', 'nowrite', 'quickfix', 'terminal', 'prompt'] disable minimap for specific buffer types
g:minimap_close_filetypes ['startify', 'netrw', 'vim-plug'] close minimap for specific file types
g:minimap_close_buftypes [] close minimap for specific buffer types
g:minimap_left 0 if set minimap window will append left
g:minimap_highlight_range 0 if set minimap will highlight range of visible lines
g:minimap_git_colors 0 if set minimap will highlight range of changes as reported by git
g:minimap_diffadd_color DiffAdd the color group for added lines (if git_colors is enabled)
g:minimap_diffremove_color DiffDelete the color group for removed lines (if git_colors is enabled)
g:minimap_diff_color DiffChange the color group for modified lines (if git_colors is enabled)
g:minimap_highlight_search 0 if set minimap will highlight searched patterns
g:minimap_search_color Search the color group for highlighted search patterns in the minimap
g:minimap_search_color_priority 120 the priority for the search highlight colors
g:minimap_cursor_color_priority 110 the priority for the cursor highlight colors
g:minimap_git_color_priority 100 the priority for the git grouping of colors

💬 F.A.Q

Highlight and scroll are not working properly.

Check the vim version you are using. minimap.vim requires vim 8.2+ or neovim 0.5.0+.

Integrated with diagnostics or git status plugins?

Not implemented currently but it should be possible. Welcome to contribute!

update: Git support has been implemented #72.

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

You can reduce the width of the minimap window:

let g:minimap_width = 2

Or use scrollbar.nvim instead if what you want is a pure scrollbar indicator.

How do the color priorities work?

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

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

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'

All existed Highlight groups can be displayed by :hi.

Minimap shows up as a jumble of characters?

Check that your encoding is set to utf-8 and not latin1 (for Vim users). Also, ensure that you're using a Unicode-compatible font that has Braille characters in it.

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

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.


I'm using g:minimap_highlight_search and the highlighted searches don't go away until I :nohlsearch and save!

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>

📋 Running Unit Tests

  • Install Testify.
  • From the top level directory (minimap.vim/) vim +TestifySuite for a yay/nay from your shell.
  • For a more detailed run, open vim at the top level and run :TestifySuite. works, but an empty buffer at the top level works too.
  • To hone in on one test file, open that file (located in the t/ directory) and run :TestifyFile.
    • (As a note, the t/ directory is named such as a requirement from Testify. :TestifySuite runs all the tests in the t/ directory)

📦 Related Projects

🌼 Maintainers

wfxr rabirabirara ZNielsen
wfxr rabirabirara ZNielsen

📃 License

MIT (c) Wenxuan Zhang

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Rust (61,502) 
Vim Script (18,829) 
Vim (5,578) 
Neovim (2,164) 
Scrollview (219) 
Scrollbar (152) 
Related Projects
Advertising 📦 9
All Projects
Application Programming Interfaces 📦 120
Applications 📦 181
Artificial Intelligence 📦 72
Blockchain 📦 70
Build Tools 📦 111
Cloud Computing 📦 79
Code Quality 📦 28
Collaboration 📦 30
Command Line Interface 📦 48
Community 📦 81
Companies 📦 60
Compilers 📦 60
Computer Science 📦 74
Configuration Management 📦 39
Content Management 📦 167
Control Flow 📦 197
Data Formats 📦 77
Data Processing 📦 266
Data Storage 📦 132
Economics 📦 60
Frameworks 📦 198
Games 📦 122
Graphics 📦 103
Hardware 📦 148
Integrated Development Environments 📦 47
Learning Resources 📦 147
Legal 📦 28
Libraries 📦 119
Lists Of Projects 📦 21
Machine Learning 📦 336
Mapping 📦 61
Marketing 📦 15
Mathematics 📦 55
Media 📦 228
Messaging 📦 97
Networking 📦 304
Operating Systems 📦 84
Operations 📦 120
Package Managers 📦 52
Programming Languages 📦 229
Runtime Environments 📦 96
Science 📦 42
Security 📦 375
Social Media 📦 26
Software Architecture 📦 70
Software Development 📦 68
Software Performance 📦 57
Software Quality 📦 127
Text Editors 📦 45
Text Processing 📦 131
User Interface 📦 310
User Interface Components 📦 465
Version Control 📦 29
Virtualization 📦 68
Web Browsers 📦 38
Web Servers 📦 25
Web User Interface 📦 194