ExtendScript plugin for Webstorm or PhPstorm? - phpstorm

when scripting for after effects I often use ExtendScript.
There is an extendscript package available for sublime text out there.
https://sublime.wbond.net/packages/ExtendScript
(this makes it possible to run your script directly from sublime text into after effects)
I was wondering if there is also something like this out there for any JetBrains IDEs (like WebStorm or PhpStorm etc.). I do know it has several plugins in it, but i don't know if there was ever one made for Expendscript like the one for sublime text.

I'm not aware of any... Please see http://devnet.jetbrains.com/message/5496889#5496889 for some hints
To be able to run adobe scripts from WebStorm, you can use external tools (Settings/External tools):
create a new external tool
specify a full path to Adobe tool capable of executing .jsx ("C:\Program Files (x86)\Adobe\Adobe Photoshop CS5\Photoshop.exe", for example) as a 'Program'
add $FileName$ as parameters
set a working directory to $FileDir$
make sure to check Show in/Project views and Editor menu to be able to run your tool from file right-click menu in Project view/Editor
then you'll be able to run your tool from a right-click menu of your .jsx file - the file will be passed to Photoshop as an argument

Related

How to view column-aligned CSV files in Visual Studio editor

Opening a .csv file in Visual Studio produces an unreadable jumbled mess. Is there any way to set up Visual Studio to automatically format these files in columns (a "grid-view", so to speak) so I can edit them directly in the IDE? Are there any tricks or workarounds or extensions that could make these files more easily readable?
(VSCode has what looks to be a fantastic extension for this sort of thing, but alas, it won't work in Visual Studio Pro/Enterprise. Also, BeyondCompare4 does this automatically, and Notepad++ has the TextFX plugin which supports this as well. Has no one ever produced such a plugin for VS?)
(UPDATE: I have created a feature request here. Please vote for it if you upvote this ticket.)
You can install csv-viewer extensions by searching for them in the search tool in the VSCode "Extensions" menu.
Some good ones are 'Excel Viewer' by GrapeCity, or 'Edit csv' by janisdd.
Both of these (and many more) allow you to view excel files in columns inside VScode, not just text files as is default.
Without extension, VSCode 1.44 (March 2020) might bring a native answer with:
Custom Text Editors
With custom text editors, extensions can now replace VS Code's standard editor with a custom webview based view for specific text based resources. Potential use case include:
Previewing assets, such as shaders or .obj files.
Creating WYSIWYG editors for markup languages such as XAML.
Providing alternative, interactive views of data files such as json or csv.
The custom editors documentation covers how to use the new custom text editor API and how to make sure your new editor works well with VS Code. Also be sure to check out the custom editors extension sample.
And that comes with:
workbench.editorAssociations setting
Also for custom editor, the new workbench.editorAssociations setting lets you configure which editor is used for a specific resource.
The example below configures all files ending in .catScratch to open using the example custom text editor from our extension samples.
"workbench.editorAssociations": [
{
"viewType": "catCustoms.catScratch",
"filenamePattern": "*.catScratch"
}
]
And:
View: Reopen with
The new View: Reopen with command lets you reopen the currently active file using a different custom editor.
You can use this command to switch between VS Code's standard text editor and the custom editor, or to switch between multiple custom editors for a resource.

Pass file name to build script in PhpStorm

I have the next configuration for a build system in PhpStorm:
And it works ok, but I have a problem... my build script needs to receive the name of the file I'm running it on, so, if I build a PHP file, it will run phpcs on it, but if I'm building a CSS or JS file, it will run gulp... with Sublime Text that is possible, is it possible with PhpStorm?
There are no macros support for Run/Debug Configurations -- they are made so they do not depend on a context (currently opened file in editor). In other words -- they are pretty static and all file names/paths are basically hard coded.
For what you are describing (build script).. you need to use External Tools functionality (which can have all of that and made specifically for such tasks). Once created, you can assign custom shortcut to any External Tools entry (check Settings/Preferences | Keymap for that) so it's more convenient to use it.
If you want such script to be called on every file save automatically -- then use File Watchers -- pretty much external tools that will be called for you automatically (once per each file modified).
Since you are doing this for a build script -- maybe you should try to use dedicated (and therefore more appropriate in general) tools? For example: Gulp / Grunt .. or even Phing.
Create external tool:
https://www.jetbrains.com/phpstorm/help/external-tools.html
You can assign hotkey to execute your build command.

Finding file location of snippets

I have a bunch of snippets installed. Some of them are intrusive and I would like to change their tab insertion code. Is there any way to quickly open the edit file of a snippet that I find from the Control+Shift+P directory?
For Sublime Text 2, in a word, no. The Command Palette does not have that functionality built-in. However, if you select Preferences -> Browse Packages... your OS will open up an Explorer/Finder/Nautilus/whatever window of the Packages directory. All packages/plugins are in (hopefully clearly-named) subdirectories, so if you don't like some Rails snippets, for example, look in the Rails directory for a likely file with a .sublime-snippet extension. These files are XML-based, and can be opened right in Sublime for editing.
Please note that this method only works in this straightforward manner with Sublime Text 2. In ST3, unless otherwise specified by the package author, all packages are in .sublime-package zipfiles, and are stored in a few different locations. To ease things, my good friend #skuroda wrote the PackageResourceViewer plugin, which allows the user to navigate through ST3 packages, view/edit files contained therein, and expand whole packages to the aforementioned Packages directory for editing of any file.

How to change the load path in Octave

I have a problem with loading images and editing scripts in Octave. I think Octave has the wrong path or something. When I say 'edit', it says:
sh: 1: emacs: not found
What does that mean?
I'm pretty new to both Octave and MATLAB, but when I'm at school using MATLAB, for example, writing the command 'edit' works...
How do I know where to put files I want to load in Octave, and how do I change the path?
The problem is not with your path, the problem is that you didn't set up EDITOR (see help EDITOR and the editor option at help edit). As you have no environmental variable for it, it defaults to emacs so when you run edit, it tries to open the file in emacs and fails because you don't have it installed. Set up EDITOR for your text editor of choice at .octaverc file (If I remember correctly, the text editor to use is set as a persistent variable inside edit.m so you'll have to restart octave) or an environmental variable (I'd recommend this one).
It works in matlab because they made their own text editor. Octave is not a text editor, it's a programming language, it would be a waste of time to reinvent the wheel, and you should be able to choose whatever you are comfortable to code with.

How to edit preference file for Notepad++?

My open source project uses spaces, not tabs, in its code.
A contributor to the project has his own website which uses tabs, not spaces.
He uses Notepad++ in Windows to edit files for both projects, and is frustrated when he forgets to manually set the Preferences correctly and thus inserts tabs into my project's files.
Is there a way to edit this Preference via a script? That way he could click one icon to start Notepad++ in mode 1 (running a batch script to modify the Preferences file and then start the program) or click another to start in mode 2.
Or if there's any other way to make him not have to remember this chore, that would work too. Maybe having a Preferences setting that depends on what folder the edited file is inside of?
Any help would be appreciated. Thanks!
The notepad++ setting for replacing tabs with spaces is stored in following xml file
%USERPROFILE%\Application Data\Notepad++\config.xml
The following is the line that needs to be changed
<GUIConfig name="TabSetting" size="4" replaceBySpace="yes" />
Now I don't know how we can edit a file by batch script in windows, but if it is not possible, then he can keep two config files config-tabs.xml and config-spaces.xml. And in the script you can copy appropriate file depending on what he needs to work on.