vimwiki-backup / vimwiki

Automatically exported from code.google.com/p/vimwiki
1 stars 1 forks source link

Link shortener doesn't work for [[file:///user/loooooong/link with spaces/notes.txt]] #288

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Enter 
[[file:///user/loooooong/link with spaces/notes.txt]]
into vimwiki buffer.

Get the cursor out of the line.

The link should be shortened to:
file:///user/~/notes.txt

But it isn't.

It works if there are no spaces in a link.

Original issue reported on code.google.com by habamax on 14 Mar 2012 at 1:42

GoogleCodeExporter commented 8 years ago
While this could be done, and the example clearly shows that it would be 
practical, the question is whether it will not open up more serious issues. One 
would have to distinguish between URLs where spaces are allowed (further 
deviating towards "convenience" and away from internet standards), and those 
where they are not allowed. Currently, it would be a complete mess, since links 
with description where the "separator" is a space are still allowed.

Given that this link shortening is micro-feature at best, I would question any 
adding of code to try to "improve it", when what is needed most is to simplify 
the whole link-related code, remove as many hundreds lines of code as possible 
and make it more reliable.

The link shortening is another from the group of options that should be not on 
by default, and be there available only for those who somehow find it valuable 
enough to put up with its shortcomings.

Original comment by tpospi...@gmail.com on 24 Mar 2012 at 6:16

GoogleCodeExporter commented 8 years ago
An option for link shortening is a good idea.

Original comment by habamax on 25 Mar 2012 at 6:24