Ctrl+T opens a new tab in the Vi keybindings that I’m using, and when I looked for Ctrl+T in Default.kkf to see what Ctrl+T was bound to by default… it’s cmd_newTab there as well. I don’t see anything with an obvious name like ‘expand’ or ‘abbrev’, or ‘snippet’.
@jfondren you’re searching for the “Insert Abbreviation Snippet by name” key binding.
You can set this in you’re preferences (preferences > key bindings > Insert Abbreviation Snippet by name).
OK. I set that to Ctrl-\ , saving it in a new key binding scheme.
I then opened a new file and typed ‘main’ (sans quotes) and hit that key, and got the error “No ‘main’ abbreviation was found.” I see a ‘main’ under Abbreviations/General.
I then set the file language to Perl and typed ‘hash’ and then hit Ctrl-, and got the error “No ‘hash’ abbreviation was found.”
Are those not abbreviations? Or are those not their real names?
The Abbreviations should work as you described.
If I create a new Perl file or create a new file (php) and set the language to perl:
If I than type hash and hit my Ctrl + \ shortcut, the hash abbreviation is inserted:
The only criteria you have to meet, is that the a abbreviation language should match the sub language of the file you’re in ( for example a php file can contain html, php, or javascript ).
To test in witch sub language you are, you can run the following snippet in you’re console.
It should, but it doesn’t. I am always told that the abbreviation I want to use doesn’t exist, by name. Some random preference I’ve changed may have broken it, because other than changing some global preferences and creating a few projects I haven’t done much with this 5-day installation. I was using VI keybindings, but it fails as well when I add the key to Default.
So this is a bug rather than my doing things wrong. Is there a way I can package up what’s distinct about by installation, to include it in a bug report?
Hi, you can try restarting in Safe Mode (Help > Troubleshooting > Restart in Safe Mode) in order to determine whether or not you altered “some random preference” that affects abbreviation insertion.
There is no main Abbreviation in the default install so unless you added it and enabled Auto-Abbreviation option in it then it won’t work.
The hash abbreviation in the toolbox folder Abbreviations > Perl has the Auto-Abbreviation turned off, as do most if not all of the abbreviations that come with Komodo. We ended up doing this as many people complain about Komodo injecting random code into their files constantly which is a reasonable complaint. Long story short, you won’t be able to trigger that abbreviation unless you right click it > Properties: Enable Auto-Abbrivation.
Apologize for the outdated docs. That’s frustrating for you. I thought I had fixed that ages ago. I’ll make sure that gets up dated. Also note that you can trigger Auto-Abbreviation using Tab or any other key you specify under Edit menu > Preferences > Editor > Smart Editing: Auto-Abbreviations.
To add more information about the main snippet.
I think I might have imported it somehow, did a global search in my profile folder for the main.ktf snippet and found these results:
Noticed there are some pointing to a custom folder of mine ‘php-everywhere’ and the ‘php_new_tags/php-everywhere’.
These are still a left over from a older folder structure I imported, I copied over the old “Abbreviations” folder.
And customized it to my own needs.
But noticed the “General” folder is still inside them, with the same main.ktf snippet.
How the “General” folder ended up in my main “Abbreviations” folder I don’t know.
It’s a three-minute video that’s 3MB in size, showing:
my installing Komodo IDE onto Linux from the tarball
Komodo starting up without finding any existing settings
A demonstration that the General/main and Perl/hash abbreviations both work when you click on them, and that these abbreviations are supplied with Komodo IDE itself.
A demonstration that neither can be invoked via the Insert Abbreviation Snippet by Name hotkey that is defined, which claims that ‘main’ and ‘hash’ do not exist, the latter not even after the file type is switched to Perl.
This is causing the “Insert Abbreviation Snippet by name” command to fail.
As a work around you will have to set the language manually.
Then the “Insert Abbreviation Snippet by name” will work correctly.
@careyh I was testing out the following work around I think should work, but it doesn’t.
Download the latest Komodo Edit Source from here
Download the zip and unzip it:
Remove the old samples folder.
And use the import function to import the new Abbreviations folder from you’re latest Komodo Edit download: