blindFS / vim-taskwarrior

vim interface for taskwarrior
Other
517 stars 42 forks source link

alias vitw= #57

Closed linuxcaffe closed 10 years ago

linuxcaffe commented 10 years ago

In my .bashrc, I have the command alias;

alias vitw='vi -c ":TW"'

and it allows me to run vim-taskwarrior directly from the command-prompt, without having to start vim first. It's very handy and makes it more like it's own app, than just a vim plugin.

but I want MORE! ;-)

I want to be able to pass any arguments to :TW args. It seems that that will require a function, as part of the alias.. not sure how that works..

I'm also not sure if this is possible, but if the vitw command were issued, and an instance of vim-taskwarrior was already running somewhere, then I think it would be better to switch to that instance, rather than start a new one. Wondering if that's built into vim somewhere..

This alias, once working, would make a nice inclusion to the CUSTOMIZATION part of the docs.

linuxcaffe commented 10 years ago

and I've been schooled that aliases and functions are two different things, and function is what we need!

blindFS commented 10 years ago
#!/bin/bash

vim -c "TW $@"

Something like that in your $PATH.

linuxcaffe commented 10 years ago

ok, I tried that in ~/bin/vitw, and cleared out the .bashrc attempt, and the only (seeming) effect on running it, is if if I enter $ vitw proj:vitw it puts "proj:vitw" in the very top-left corner of the screen, in the tagbar (?), but it doesn't filter the list, yet.

blindFS commented 10 years ago

That works for me. I don't know your configurations. You should solve it yourself.

linuxcaffe commented 10 years ago

k, thanks!