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

Auto complete available when writing commit comments #1501

Open
LozmindaSnr opened this issue Aug 23, 2021 · 4 comments
Open

Auto complete available when writing commit comments #1501

LozmindaSnr opened this issue Aug 23, 2021 · 4 comments

Comments

@LozmindaSnr
Copy link

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

@kaste
Copy link
Collaborator

kaste commented Oct 8, 2021

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.

@LozmindaSnr
Copy link
Author

LozmindaSnr commented Oct 14, 2021

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.
##"" at the very first char to see the recent log
##"fixup" to create a fixup subject (short: "fix")
## "squash to create a squash subject (short: "sq")
##"#" to reference a GitHub issue (or: "owner/repo#")
##In the diff below, [o] will open the file under the cursor. )

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 !

@LozmindaSnr
Copy link
Author

LozmindaSnr commented Nov 6, 2023

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..

@kaste
Copy link
Collaborator

kaste commented Nov 6, 2023

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.

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

No branches or pull requests

2 participants