Live templates -> edit variable.
I can specify groovy file in variable settings: groovyScript("C:/test.groovy")
Where is "home" directory to store my script? i Want something like that:
groovyScript("test.groovy")
For easy export config to another PC.
groovyScript's argument can be either the script text itself or a filename. In the latter case the filename is relative to idea or idea/bin directory. It's probably better to use absolute paths.
In recent IDEA builds you can share live templates by copying them to clipboard (Ctrl+C, see https://youtrack.jetbrains.com/issue/IDEA-141077)
Related
I am using vue.js (2.6.5) and webpack (5.77.1), and I enabled the source map feature in development env, with simple config as below:
mode: 'development',
devtool: 'eval-cheap-module-source-map',
.....
Well, the source map feature indeed works, but what confuse me is when you search a file name, there will be multiple files with same file name listed, see as below:
Only one of them is the exact original file definition, other files are definitions of render function of vue.js and some others. Every time I need to click on each one of them to check which is the exact original file, this annoys me, does any one know how to only show the exact original file ?
I want to write a CSS file into the preference store instead of into a local file path and read back whenever it requires.
I am new to Eclipse, an example would be helpful for me...
The preference store is for fairly small values stored using a 'key' and a 'value'. You could put the contents of the file as a 'value' but this is probably not a good use of the store.
Eclipse plugins can use the 'state location' to save files. Use something like:
Bundle bundle = FrameworkUtil.getBundle(getClass());
IPath path = Platform.getStateLocation(bundle);
File dir = path.toFile();
to get the path to the state location directory. Your plugin can store anything it likes in this directory,
Platform is org.eclipse.core.runtime.Platform
The preference store is for key-value-pairs, not for files.
See Eclipse Preferences - Tutorial
I have modified an Intellij 'intention'. (I changed the initialization of the JUnit test class).
How do I make this available to other members of my organization? We are all working on the same Intellij 'project', but I believe that these changes are on a per-user, not per-project basis. (If there is a way to make the changes apply only to one project, I would prefer that).
File | Export Setting / File | Import Settings.
Are more robust way would be to use the Settings Repository plug-in.
Templates are stored in the %CONFIG% directory, fileTemplates subdirectory.
To export the file, you set the 'Schema:' pulldown in the upper right corner of 'Settings->Editor->File and Code Templates->Code tab' to 'Project' This will cause IDEA to create a folder PROJECT/.idea/fileTemplates/code, and put your modified file there. Details are in:
https://www.jetbrains.com/help/idea/2016.3/file-and-code-templates.html#d2040410e142
I see that there is no CPACK_xxx variable for changing the wizard image(s) in NSIS (like CPACK_PACKAGE_ICON).
So I copied the NSIS.template.in and modified it. I could do something like:
!define MUI_WELCOMEFINISHPAGE_BITMAP "C:\work\project\img\wizardInstall.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "C:\work\project\img\wizardUninstall.bmp"
and it will work. However, the source code goes in a repository where many developers colaborate, and it's not really good idea to keep absolute paths there.
I tried to find some way to get my source path, and somehow create the image path from that one, but to no avail.
So, if someone knows how can i set the wizard images in NSIS, or pass the source dir (and create the path from it) to my template file, please let me know.
Since you are already customizing the NSIS.template.in file, and it is a template presumably configured with the CONFIGURE_FILE() command, why not put the following in to your NSIS.template.in:
!define MUI_WELCOMEFINISHPAGE_BITMAP "#MY_CPACK_MUI_WELCOMEFINISHPAGE_BITMAP#"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "#MY_CPACK_MUI_UNWELCOMEFINISHPAGE_BITMAP#"
Then, in your CMakeLists.txt file where you set your other CPACK variables, add something like:
SET(MY_CPACK_MUI_WELCOMEFINISHPAGE_BITMAP
"${CMAKE_SOURCE_DIR)/path/to/wizardInstall.bmp")
SET(MY_CPACK_MUI_UNWELCOMEFINISHPAGE_BITMAP
"${CMAKE_SOURCE_DIR)/path/to/wizardUninstall.bmp")
You do not need to compile whole NSIS to use/change these images.
They are present on every machine which has NSIS installed in ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp
Use !define MUI_WELCOMEFINISHPAGE_BITMAP bmp_file in your .nsi script to change them.
The commands need absolute paths in slurping. So I need programmer-quotes, because of laziness to write long paths. How can I use them like:
^a :readbuf `pwd`/file
Your question seems to assume that it is possible to use backticks in this way. However, screen does not appear to support backticks in the :readbuf command. It also does not support other shell conventions such as ~ for home directory, or $XYZ for environment variable expansions.
When screen reads the file named in the :readbuf command, the file name is relative to the current directory where screen started, not the current directory of whatever is displayed in the active window. This might be why you found that absolute paths worked for you. Try using a filename relative to whatever directory you started screen from originally.
Update: For additional work on this answer, see: GNU Screen: Environment variables