Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhinz/vim-lookup
Jump to the definition of variables or functions in VimL code.
https://github.com/mhinz/vim-lookup
lookup neovim search vim vim-plugin viml
Last synced: 1 day ago
JSON representation
Jump to the definition of variables or functions in VimL code.
- Host: GitHub
- URL: https://github.com/mhinz/vim-lookup
- Owner: mhinz
- Created: 2017-01-19T14:32:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-26T03:24:21.000Z (over 1 year ago)
- Last Synced: 2023-10-20T21:46:40.855Z (about 1 year ago)
- Topics: lookup, neovim, search, vim, vim-plugin, viml
- Language: Vim script
- Size: 51.8 KB
- Stars: 55
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/mhinz/vim-lookup.svg?branch=master)](https://travis-ci.org/mhinz/vim-lookup)
# vim-lookup
This plugin is meant for VimL programmers. It jumps to definitions of variables,
functions, and commands as if tags were used, without needing a tags file. It simply
uses your [runtimepath](https://neovim.io/doc/user/options.html#'rtp').- [x] `s:var`
- [x] `s:func()`
- [x] `func()`
- [x] `autoload#foo#var`
- [x] `autoload#foo#func()`
- [x] `'autoload#foo#func'`
- [x] `Command`Sometimes a function `foo#func()` is not found in `autoload/foo.vim` but
`plugin/foo.vim`. This case is handled as well.It also works for global functions if they're defined or found in the current
file:- [x] `GlobalFunc()`
- [x] `g:GlobalFunc()`### Usage
- Use `lookup#lookup()` to jump to the defintion of the identifier under the
cursor.
- Use `lookup#pop()` (or the default mapping
[``](https://github.com/mhinz/vim-galore/#changelist-jumplist)) to jump
back.### Configuration
```viml
autocmd FileType vim nnoremap :call lookup#lookup()
```Alternatively, you can replace the default mappings Vim uses for
[tagstack](https://neovim.io/doc/user/tagsrch.html#tag-stack) navigation:```viml
autocmd FileType vim nnoremap :call lookup#lookup()
autocmd FileType vim nnoremap :call lookup#pop()
```### Other useful VimL plugins
- [exception.vim](https://github.com/tweekmonster/exception.vim)
- [helpful.vim](https://github.com/tweekmonster/helpful.vim)
- [vim-scriptease](https://github.com/tpope/vim-scriptease)