kakoune
kakoune copied to clipboard
Improved links in man pages
Problem
Sometimes in man pages links to other man pages would get wrapped over multiple lines. Previously, only the second part of the link (the section with the brackets) would be highlighted, and upon pressing <ret>
this part would not be included and you would get an error about invalid man pages.
Solution
I modified the regex so that it would recognise these multiline links. I also changed the man_jump
function so that these multiline links will be recognised, and therefore you can quickly browse the man pages. An example of the changes to the regex is below:
The links now work and upon pressing ret
it will take you to the respective man page.
I agree with you the previous solution was too complex. I have made a couple of changes:
- Support for letters in the brackets.
- Pipes to perl instead of trying to 'unwrap' the newline within the kakoune.
- Removes some of the weird changes, these happened because instead of basing my changes of the one is the kakoune repo, i based them of the one which comes in arch linux which I think has been slightly modified/was old.
- Made it so if you press enter on something other than a link it doesn't completely freak out.
Using sed instead of perl now, just to remove an added dependency :).