Toggle links #2

Open
opened 2022-05-14 00:25:55 +03:00 by i · 1 comment

Wanted wrap the word under the cursor or a visual selection in an empty markdown link.

Visual selection will help when you need to create a link with several words.

  • If the word is a filename with an extension, then the link must contain that word.

  • If the word is a code from YouTrack (eg DV-34970), the link must contain full path to issue (eg https://youtrack.dv.team/issue/DV-34970). Regex for code and full path mast be set though the settings.
    Setting names: g:issue_regex, g:issue_tracker_path

Mapping: <leader>ln

Wanted wrap the word under the cursor or a visual selection in an empty markdown link. Visual selection will help when you need to create a link with several words. - If the word is a filename with an extension, then the link must contain that word. - If the word is a code from YouTrack (eg DV-34970), the link must contain full path to issue (eg https://youtrack.dv.team/issue/DV-34970). Regex for code and full path mast be set though the settings. Setting names: `g:issue_regex`, `g:issue_tracker_path` Mapping: `<leader>ln`
i added this to the v0.2.0 milestone 2022-05-14 00:25:55 +03:00
i added the
feature:request
label 2022-05-14 00:25:55 +03:00
Poster
Owner

Select in visual mode issue nubmer and press <leader> l:

vmap <leader>l y:'<,'>s/<c-r>"/[<c-r>"](https:\/\/youtrack.dv.team\/issue\/<c-r>")/<CR>
Select in visual mode issue nubmer and press `<leader>` `l`: ``` vmap <leader>l y:'<,'>s/<c-r>"/[<c-r>"](https:\/\/youtrack.dv.team\/issue\/<c-r>")/<CR> ```
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: i/vim-md#2
There is no content yet.