https://github.com/genkiroid/vim-mdlink
vim-mdlink is vim plugin faster than genkiroid/mdlink-vim.
https://github.com/genkiroid/vim-mdlink
Last synced: about 1 month ago
JSON representation
vim-mdlink is vim plugin faster than genkiroid/mdlink-vim.
- Host: GitHub
- URL: https://github.com/genkiroid/vim-mdlink
- Owner: genkiroid
- Created: 2018-09-18T12:50:40.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-12T14:11:01.000Z (over 1 year ago)
- Last Synced: 2025-01-24T18:14:56.306Z (3 months ago)
- Language: Vim Script
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-mdlink
Vim plugin to convert URL to Markdown style with title.
## Install
Checkout into your plugin directory. Or use plugin manager.
## Requirements
* Vim 8.0+ (with +channel +job)
* [Go](https://golang.org/) 1.18+
* [kana/vim-textobj-user](https://github.com/kana/vim-textobj-user)
* [mattn/vim-textobj-url](https://github.com/mattn/vim-textobj-url)## Settings
1. Create $HOME/.vim-mdlink file like the following. And input your github personal token.
let g:vim_mdlink = {
\ 'github_token': 'your personal token'
\}1. If using GHE, add optional settings about GHE.
let g:vim_mdlink = {
\ 'github_token': 'your personal token',
\ 'ghe_url': 'https://ghe.domain.name/',
\ 'ghe_api_url': 'https://ghe.domain.name/api/v3/repos/',
\ 'ghe_token': 'your personal token'
\}## Usage
### MarkdownLink
1. Put the cursor on the row existing URL. Or select multi rows by visual mode.
1. Enter command `:MarkdownLink`.### MarkdownLinkOnlyOnCursor
1. Put the cursor on the URL.
1. Enter command `:MarkdownLinkOnlyOnCursor`.### Convert all URL
1. Enter command `:%Markdownlink`.
### Map example
```
nnoremap ml :MarkdownLink
vnoremap ml :MarkdownLink
nnoremap mo :MarkdownLinkOnlyOnCursor
```## License
MIT
## Authors
[genkiroid](https://github.com/genkiroid)