A vim plugin to indicate that code is referenced in external systems.
- It highlights lines that are referenced in external systems.
- It gives you information on the lines referenced when the cursor is on those lines.
- It allows you open the referenced system an external browser.
Plug 'tgsoverly/watupdoc.vim'
- Map the command to open in an external browser
nmap <silent> <LocalLeader>od <Plug>(WatupdocOpen)
curl
installed.- File must be in a
git
repo.
- OS X
- neovim
What I am doing:
- Opening a file that has a link to it in clubhouse.io
:w
the file to trigger the plugin.- Moving the cursor over the lines to show the information at the bottom of the screen.
\od
on the line to open that external reference in a browser.
You have discussions around nice to have features and you say something like "Next time we change this code we should update this method." Now you have another problem: how do you track that work? This plugin is an attempt to solve that problem.
- Setup the desired
Supported External System
s - Store a link to the line of code in a
Supported URL Format
in aSupported External System
.
- Github
- Clubhouse.io
- Get an API token from your clubhouse user profile.
- Set the following environment variable in your profile:
WATUPDOC_CLUBHOUSE_API_TOKEN
- Stack Overlow (for Teams)
- Follow the instructions to set up an OAUTH app here: https://www.stackoverflow.help/support/solutions/articles/36000154987-stack-overflow-for-teams-api
- Set the following environment variables in your profile:
WATUPDOC_STACK_OVERFLOW_ACCESS_TOKEN
,WATUPDOC_STACK_OVERFLOW_TEAM
, andWATUPDOC_STACK_OVERFLOW_KEY
- I was new to vimscript and http://bling.github.io/blog/2013/08/16/modularizing-vimscript/ helped me strcture code.
- I have used the Ale plugin to learn how to do some stuff: https://github.com/dense-analysis/ale