GitSavvy
GitSavvy copied to clipboard
Auto complete available when writing commit comments
Would it be possible/how difficult would it be, to have some of the Sublime Text 3 functionality when writing comments for the commit? Mainly the autocomplete? I often need to reference function/variable names and having auto complete would save a few key presses ! (One day I'll learn python, but at the moment there's no point me being given the outline of how to do it, not yet anyway, so am fairly helpless/useless !) I use this plugin almost everyday, great stuff ! Thank you
I actually have/wrote a plugin that restores the autocomplete functionality from Sublime Text 3 completely. It's not even very difficult, but unpublished atm.
Doing this just for the GitSavvy commit message view is maybe overkill. I don't think it should be part of the GitSavvy suite as taking over the tab
key is somewhat hostile.
Oh, that's a pity. It would be really helpful for me though (I realise I'm being totally selfish here) could I see the code maybe? could you point me in the right direction if the code is somewhere? (Like on github?) I have quite detailed commit messages things like: myclass::Variable renamed to otherClass::otherVar etc etc. Often all this info is below this banner
##To make a commit, type your commit message and press CTRL-ENTER.
##To cancel the commit, close the window. To sign off on the commit,
##press CTRL-S.
##"
but it still means I've got to scroll down, copy paste etc, esp if the function names are complicated eg AssignBlank_toSmallTexture().
Unless there's a better way I'm not understanding, which maybe true, I'm a noob.
It would save me a few seconds every commit, it all mounts up ! Thanks for betting back to me, I appreciate you've probably got a lot on, bon courage !
I've found a really easy solution for this: In Sublime Text 3 in the Settings under Preferences just change:
"auto_complete_selector": "meta.tag - punctuation.definition.tag.begin, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
to:
"auto_complete_selector": "",
and voilà auto complete works for ST3 commit messages. As yet (I implemented this change about 6 months ago, but forgot about this post) there hasn't been any bad side effects. Also I don't know about ST4..
Hm, autocomplete always worked on ST3 for me. ST4 dropped that so I had to reimplement it which was really disappointing at that time. The plugin is at https://github.com/kaste/abbrev-autocomplete Just uploaded, but it is as I said for ST4 and requires python 3.8.