vimwiki-backup / vimwiki

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

Links to arbitrary VIm commands? #359

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am not sure this is currently possible, but it would be a sweet feature.

I could have a list of projects I am current working on in a wiki page. When I 
activate a link, the command ':Exp /path/to/project' is executed (or any Vim 
command the user wishes).

Cheers

Original issue reported on code.google.com by vex...@gmail.com on 16 Aug 2012 at 10:42

GoogleCodeExporter commented 8 years ago
Perhaps this could be integrated with the filetype mechanism proposed in #360.

So for example:

cmd(Exp %):///path/to/project

Not really sure. Thoughts?

Original comment by vex...@gmail.com on 16 Aug 2012 at 10:53

GoogleCodeExporter commented 8 years ago
Could :h VimwikiLinkHandler be used here?

Original comment by habamax on 17 Aug 2012 at 4:17

GoogleCodeExporter commented 8 years ago
A general solution (defining new schemes vfile & vlocal) is described in the 
help section referenced above.

If you want a link that opens a directory contents view within vim, and the 
path can be specified relative to your wiki root, simply add the trailing slash 
to the path, e.g.

[[relative/path/to/project/]]

This behavior is customized with :h g:vimwiki_dir_link

Original comment by stu.andrews on 18 Aug 2012 at 3:24

GoogleCodeExporter commented 8 years ago
The directory is not within my wiki root.

Original comment by vex...@gmail.com on 21 Aug 2012 at 10:25

GoogleCodeExporter commented 8 years ago
Please try the vfile: scheme described at :h VimwikiLinkHandler.

I am able to link to a directory view using the following :

 * [[vfile:~/path/to/directory/]]

Original comment by stu.andrews on 21 Aug 2012 at 3:52