I’m looking for an app for the Mac that will hold dynamic code snippets for me for multiple programming languages. I’d prefer to essentially be in a
.py file and when I insert a snippet with the
for keyword, it’s specifically for python. That way I could also have a
for for Java and other languages. The closest I’ve gotten to this is TeaCode from Apptorium but it doesn’t support all of the languages I’d like and doesn’t support cursor positioning.
I think there might be several different potential solutions to your problem.
One potential solution would be at the IDE level, I know that with sublime and visual studio code there are plugins for text completion and text shortcuts, and they tend to be language specific, there might be some preferences or you can roll your own.
I also found that breaking system shortcuts onto a seperate pad of buttons was a lifesaver for my hands, (side note, command-x, command-c suck to use for a prolonged period of time).
Hope it helps and good luck searching
I’m actually thinking about buying TeaCode via the 50% off deal of 2$ Tuesday: http://twodollartues.com/deals/teacode-over-50-off/
Have you thought about contacting the Dev of TeaCode and suggested the feature?
It seems like a pretty reasonable request.
Instead of setting up expanders in the form of “for-php”, “for-py” and “for-js” to have “for”-loops in those three languages it should be able to detect the language beased on the filetype or editor’s setting.
Actually after checking again… TeaCode already checks the filetype and picks the language specific one.
What languages are you missing in TeaCode?
Regarding the cursor positioning:
If you place a
# character it will position the cursor at that spot once the snippet has been pasted.