https://github.com/infokiller/vim-errorlist
A Vim/Neovim plugin for navigating the quicklist and location lists relative to the current cursor position.
https://github.com/infokiller/vim-errorlist
loclist quickfix vim
Last synced: 6 months ago
JSON representation
A Vim/Neovim plugin for navigating the quicklist and location lists relative to the current cursor position.
- Host: GitHub
- URL: https://github.com/infokiller/vim-errorlist
- Owner: infokiller
- License: mit
- Created: 2019-10-01T12:27:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-25T22:49:46.000Z (almost 5 years ago)
- Last Synced: 2025-01-15T08:51:41.292Z (about 1 year ago)
- Topics: loclist, quickfix, vim
- Language: Vim script
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-errorlist
A Vim/Neovim plugin for navigating the quicklist and location lists relative to the current cursor position.
## Installlation
Install using your favourite package manager, or use Vim's built-in package support. Example for [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'infokiller/vim-errorlist'
" On-demand lazy loading
Plug 'infokiller/vim-errorlist', { 'on': ['errorlist#Navigate'] }
```
## Usage
The plugin offers 4 commands:
- `QuickFixPrev`: go to quickfix error before the cursor
- `QuickFixNext`: go to quickfix error after the cursor
- `LoclistPrev`: go to location list error before the cursor
- `LoclistNext`: go to location list error after the cursor
By default, the plugin doesn't do any remappings. Example configuration:
```vim
" Navigate quickfix list with Ctrl+{p,n}
nnoremap :QuickFixPrev
nnoremap :QuickFixNext
" Navigate location list with Alt+{p,n}
nnoremap :LoclistPrev
nnoremap :LoclistNext
```
### Configuration
#### Post navigation command
You can define a command that will be executed right after the navigation. For example, the snippet below will scroll so that the cursor in the center of the window:
```vim
let g:error_list_post_command = 'normal! zz'
```
#### Max items
By default, the plugin will fall back to vim's built in navigation commands (`:cn` etc.) if the number of items is more than 2,000. The reason for this is that navigating relative to the cursor can become slow with a large number of items.
To change the maximum number of items:
```vim
let g:error_list_max_items = 2000
```