dotnetic Posted September 20, 2022 Share Posted September 20, 2022 Coming to an IntelliJ IDE (like PHPStorm) near you soon. Live Templates or snippets provide a short way to write repeating code. You enter an abbrevitation and the editor completes the code for you. Here is one example when I want to setup a new module: phpstorm64_aT7Nj2gxSv.mp4 @bernhard Has snippets for VSCode in his great RockMigrations module also, be sure to check them out, if you use VSCode. As I use RockMigrations in every PW installation I also add snippets for migrations: phpstorm64_fAD9MoUJLE.mp4 9 Link to comment Share on other sites More sharing options...
bernhard Posted September 21, 2022 Share Posted September 21, 2022 Nice ? How does this work? Can you reuse my snippets? Link to comment Share on other sites More sharing options...
dotnetic Posted September 21, 2022 Author Share Posted September 21, 2022 17 minutes ago, bernhard said: How does this work? Can you reuse my snippets? Just the ProcessWire Code, I have to transform everything manually. Sadly IntelliJ has a weird format for the live templates which are stored in an XML file. Sharing and importing isn't also as easy as copying the files to the root directory. Instead you have to import them as settings for the IDE and restart the IDE afterwards. 21 minutes ago, bernhard said: How does this work? Live templates are a native function of PHPStorm, I think they were a thing before they existed in VSCode. It is somewhat similar to snippets in VSCode. You have your code and then enter $myvariable$ for inserting user text, or things like $boolean$ or $enum$ and can define values for that. 1 Link to comment Share on other sites More sharing options...
zoeck Posted September 21, 2022 Share Posted September 21, 2022 Oh yeah, finally ? I just prefer to use PHPStorm than VSCode ? 1 Link to comment Share on other sites More sharing options...
MarkE Posted September 21, 2022 Share Posted September 21, 2022 12 hours ago, dotnetic said: Coming to an IntelliJ IDE (like PHPStorm) near you soon. That’s great @dotnetic. Look forward to seeing it! Link to comment Share on other sites More sharing options...
gs-df Posted October 7, 2022 Share Posted October 7, 2022 Any updates @dotnetic? Can't wait... ? Link to comment Share on other sites More sharing options...
dotnetic Posted October 7, 2022 Author Share Posted October 7, 2022 6 hours ago, gs-df said: Any updates @dotnetic? Can't wait... ? You can import the attached file into your IDE. See instructions here https://www.jetbrains.com/help/phpstorm/sharing-your-ide-settings.html#import-settings-from-a-zip-archive I don't have much time atm and so I can not provide full instructions and the file not in a repo. Please note, that if you use settings sync, the import will not work and you have to put the "template" folder of the zip file into your PHPStorm settings folder which is depending on your OS somewhat like C:\Users\username\AppData\Roaming\JetBrains\PhpStorm2022.2 (Windows) paste it here! settings.zip 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now