Giter Site home page Giter Site logo

bisratm / tag-peek.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from semanticart/tag-peek.vim

0.0 0.0 0.0 6 KB

A neovim plugin for peeking at tag definitions using the `nvim_open_win` "floating window" feature.

License: MIT License

Vim Script 100.00%

tag-peek.vim's Introduction

vim-tag-peek

A neovim plugin for peeking at tag definitions using the nvim_open_win "floating window" feature.

example usage

Usage

Assuming you have installed this plugin and have ctags properly setup, map a command to peek at the tag under the cursor

nnoremap <leader>q :call tag_peek#ShowTag()<CR>

You can also invoke the function directly to view a specific tag definition. e.g. to view the tag delete you could do :call tag_peek#ShowTag("delete")

Preview Mappings

Unless you opt-out of mappings (via let g:tag_peek_mappings=0), the following normal-mode key mappings will be setup for the preview window:

key behavior
q Close the preview window
<c-n> Jump to the next definition of the tag
<c-p> Jump to the previous definition of the tag
<c-e> Edit the currently previewed file in a split

Configuration

This plugin aims to have reasonable defaults but a few configuration variables are provided for power-users.

variable usage
g:tag_peek_mappings set to 0 to opt-out of the default preview mappings
g:tag_peek_split_command control how a split is opened from the preview window (this is vsplit by default but you might prefer split or tabnew)
g:tag_peek_float_config set this to a custom function name to control the config passed to control the display of the preview window. See below for an example and :help nvim_open_win for more info.

Example g:tag_peek_float_config usage:

function! MyFloatConfig()
  return {
        \ 'relative': 'editor',
        \ 'row': 10,
        \ 'col': 10,
        \ 'width': 80,
        \ 'height': 20
        \ }
endfunction

let g:tag_peek_float_config="MyFloatConfig"

TODO

  • screenshot(s)
  • blog post

tag-peek.vim's People

Contributors

semanticart avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.