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

Allow users to customize do/ado-file headers #2

Open
pschumm opened this issue Mar 24, 2013 · 5 comments
Open

Allow users to customize do/ado-file headers #2

pschumm opened this issue Mar 24, 2013 · 5 comments

Comments

@pschumm
Copy link

pschumm commented Mar 24, 2013

Users are likely to have very different preferences for the headers of their do/ado-files, and it would be nice if we could accommodate this via a user-configurable setting. I don't currently know the best way to do that.

@briatte
Copy link

briatte commented Mar 26, 2013

A minimal way to do this would be to replace "Author" in the current header with the value of the TM_FULLNAME variable that the user can set in his TextMate preferences.

@pschumm
Copy link
Author

pschumm commented Mar 26, 2013

Indeed, though it would be nice to have somewhat more flexibility than this if possible.

@briatte
Copy link

briatte commented Mar 26, 2013

A solution might be to do as latex.tmbundle and have a preferences window, where you might be able to record a user-defined header (as well as other things, like workflow-specific settings). But if you take a look at the code from latex.tmbundle, it seems like a lot of work.

@pschumm
Copy link
Author

pschumm commented Mar 26, 2013

Actually I just looked at that, and it seems fairly straightforward (the TODO bundle also provides a good example, though I'd personally prefer to work in Python rather than Ruby). The basic approach seems to be to call $DIALOG with a custom nib file. Help is available via ctrl-R when on a line containing

"$DIALOG" help

in a TextMate window. The result can then be written to

com.macromates.textmate.plist

and subsequently queried with tm_query.

That said, I wonder whether this is in fact the best way to handle automatic do/ado-file headers. Should we instead be handling these as templates that the user can create/modify?

@pschumm pschumm closed this as completed Mar 27, 2013
@pschumm pschumm reopened this Mar 27, 2013
@briatte
Copy link

briatte commented Mar 27, 2013

I believe that heavy coders will already have their favourite header saved as a code snippet. Coding one into the bundle would rather be, IMHO, a way to help users who are not using such a system -- as your current do/ado header command does.

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