Skip to content

Jump to the definition of variables or functions in VimL code.

Notifications You must be signed in to change notification settings

mhinz/vim-lookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

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.

  • s:var
  • s:func()
  • <sid>func()
  • autoload#foo#var
  • autoload#foo#func()
  • 'autoload#foo#func'
  • 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:

  • GlobalFunc()
  • g:GlobalFunc()

Usage

  • Use lookup#lookup() to jump to the defintion of the identifier under the cursor.
  • Use lookup#pop() (or the default mapping <c-o>) to jump back.

Configuration

autocmd FileType vim nnoremap <buffer><silent> <cr>  :call lookup#lookup()<cr>

Alternatively, you can replace the default mappings Vim uses for tagstack navigation:

autocmd FileType vim nnoremap <buffer><silent> <c-]>  :call lookup#lookup()<cr>
autocmd FileType vim nnoremap <buffer><silent> <c-t>  :call lookup#pop()<cr>

Other useful VimL plugins

About

Jump to the definition of variables or functions in VimL code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published