Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new global command :TaskWiki < project > #43

Closed
linuxcaffe opened this issue Mar 26, 2015 · 7 comments
Closed

new global command :TaskWiki < project > #43

linuxcaffe opened this issue Mar 26, 2015 · 7 comments

Comments

@linuxcaffe
Copy link
Contributor

This command makes it easy to open/ create project.wiki files.
Using the configurations;

let g:taskwiki_project_dir = '~/.task/project'
let g:taskwiki_project_ext = '.project.wiki'

and entering

:TaskWiki foo

or using

:TaskWiki(space)(TAB)

completion, should offer all top-level projects.
Enter a name or select a project and hit < enter > and the "~/.task/project/foo.project.wiki" file is opened for editing.

@linuxcaffe
Copy link
Contributor Author

This, of course, has the bonus effect of allowing a user to go

:Tas (TAB) M (TAB)

to invoke TaskWikiMod, instead of

:Tas (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB) (TAB)

@tbabej
Copy link
Collaborator

tbabej commented Mar 26, 2015

Well, user can just set:

set wildmode=longest,list

if he wants partial completion of the commands.

@tbabej
Copy link
Collaborator

tbabej commented Mar 26, 2015

Not sure if we want to implement this. Seems too specific to @linuxcaffe workflow. Not closing yet, I'll let it go over my head.

@linuxcaffe
Copy link
Contributor Author

Ok, completion is the smallest part (wildmode is an excellent solution) and while the example paths may be somewhat linuxcaffe-centric, the idea itself is quite generic, at least to the idea that a group of tasks is called a "project". It presumes that actual "projects" are a central organizational unit, a core tw attribute, and need much more description, for most users, than taskwarrior presently delivers.

To take this idea from generic to universal, so that other atribute could be handled, the concept could be extended to;

:TaskWiki FIELD  VALUE

as in

:TaskWiki project foo 

(creates or opens .../foo.project.wiki)
or

:TaskWiki area family

(creates or opens .../family.area.wiki)
or

:TaskWiki tag bar

(creates or opens .../bar.tag.wiki)

The caveat: for a field to be valid, it needs to be configured with

let g:taskwiki_area_dir = '~/.task/area'
let g:taskwiki_area_ext = '.area.wiki'
et g:taskwiki_tag_dir = '~/.task/tags'
let g:taskwiki_tag_ext = '.tag.wiki'
etc..

Very flexible, although considerably more complex than the project-only solution. imho, project-only is the way to go.

@tbabej
Copy link
Collaborator

tbabej commented Mar 27, 2015

So what you're trying to solve here is the problem of filesystem navigation. Different users might have different ideas about how to store their wiki files - whether flat in one directory, whether use subdirectories and how exactly the heirarchy should look like.

Imho these problems are easier solved by a dedicated plugin, like NERDTree. For example, I have:

map <C-n> :NERDTree /home/tbabej/.wiki/ <CR>

in my .vimrc, which fires up the wiki tree immediately, which can be then navigated efficiently, i.e using bookmarks

@linuxcaffe
Copy link
Contributor Author

Don't completely "hang up" on this one yet. Yes, it is a wiki navigation thing, but it is also a taskwarrior-specific thing, and it's totally user-configurable, so it will fit into whatever file-scheme. The desired outcome is a very fast and very consistent way to navigate from vim to a given project wiki. Yes, you could use a correctly invoked NERDtree, but nothings going to be as fast as

:TaskWiki foo

to get to ~/.task/project/foo.project.wiki (or whatever/wherever)

And it doesn't interfere with any other navigation options.

@linuxcaffe linuxcaffe changed the title new command :TaskWiki < project > new global command :TaskWiki < project > Mar 27, 2015
@linuxcaffe
Copy link
Contributor Author

Taking it a step further (cause that's what I do) in my grand imaginings, with no other arguments,

TaskWiki

could/ should (using the example configs, at the top) open ~/.task/project/index.project.wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants