How convert native code to ASCII in Intellij IDEA (not in *.properties)? - intellij-idea

Intellij IDEA has setting Transarent native-to-ascii conversion, that display native codes as readable symbols in *.properties files. How make similar behavior in file with other extensions (ex. *.ru).

Just need bundle .ru with Properties types:
Settings->File Types->Properties - add ".ru" (or ext that needed you)

Related

IntelliJ syntax highlighting for jinja files (.jinja, .j2)

Question is pretty much in the title. Does IntelliJ have native syntax highlighting for .jinja and .j2 files?
If not is there a plugin?
This plugin: https://plugins.jetbrains.com/plugin/7792-yaml-ansible-support offers some support for jinja files.
To ensure that this plugin is associated with jinja files:
Go to File > Preferences > Editor > File Types
Under Recognized File Types scroll down to YAML/Ansible and select it
Under Registered Patterns click the + icon and enter *.jinja.
With this configuration in place your jinja files will open into this plugin. If they do not, then jinja files must be already associated with one of the other Recognized File Types in which case you'll need to scroll through them to find the culprit and remove *.jinja from its Registered Patterns.
Try the Python plugin with IntelliJ IDEA Ultimate, that has support for Jinja2 Templates.
With recent version of Intellij, you don't need any plugin any more.
Go to File > Settings > Editor > File Types
Under Recognized Files Types, choose Jinja 2 Template
Under File Name Patterns add *.j2 for jinja2, and/or *.jinja for jinja
For Ansible yaml jinja 2 templates:
Under Recognized Files Types, choose YAML/Ansible
Under File Name Patterns add *.yaml.j2 and *yml.j2
Just for sanity sake. I found my solution in a combination of both answers previously posted.
Besides the Python plugin as #Andrei states it is needed that the file extension is recognized as explained above by #glytching: File > Preferences > Editor > File Types, for me the pattern *.j2 was missing.
As a good thing to do also would be to mark the directory as Template as described in section To define template directories on the referenced templates link given by #Andrei:
1. In the Settings/Preferences dialog, click the Project Structure page.
2. Choose the directory to be marked as a template root.
3. Do one of the following:
* Click Templates on the toolbar of the Content roots pane.
* Choose Templates on the directory's context menu.

IntelliJ does not recognize kotlin file after deleting it and recreate with the same name

I am currently having a problem with IntelliJ. I am using Kotlin in my project. I have deleted a file (let's say test.kt), and now, I want to create a new file with the same name. IntelliJ does not recognize the kotlin syntaxe and show it as a text file.
When I have deleted I have unchecked "safe delete" and "Search in comment and strings"
Can anyone help me in this matter ?
Edit : I tried to delete .idea and .iml file, restart intelliJ. It does not change anything.
"Overrid File Type" to Kotlin would work.
Expanding on a comment:
Is test.kt listed in Preferences > Editor > File Types > Text, under the Registered Patterns? An entry there may override the default Kotlin filetype
I had a class, MyProxy.kt, that as the question implies was not being picked up as a Kotlin class in IntelliJ. I scrolled through my list of file associations and did not find anything that could match MyProxy.kt except for the Kotlin extension, *.kt (it is entirely possible I missed something.)
Most regex matching will apply the most specific rule, though. On the off chance my class was being picked up by another association, I explicitly declared it as a Kotlin file pattern. It is a little hacky, but it did work! My Kotlin file name patterns are now:
*.kt
*.kts
*.main.kts
MyProxy.kt
Note: IntelliJ did complain that *.kt would already catch MyProxy.kt, but I overrode it.
Ctrl+alt+s, Editor, File Types, under recognized filetypes,
Under Filetype auto-detected by file content...
remove Main.kt

How do I turn on syntax highlighting for StringTemplate templates (*.st) in intellij?

I have a string template file (.st) in IntelliJ that I would like to see syntax highlighting on. How can I turn this on? I can't seem to find it anywhere.
The best solution is to use HTML syntax for *.st files. You can set this in Preference > File types > HTML.
Short answer is - you can't.
Someone must first implement a syntax highlighter plugin for the format.
The StringTemplate author, Terrence Parr, has begun work on such a plugin for String Template 4 but it does not support the older .st file format.
I tried the plugin. Even on .stg files it is not ideal if you use a dark editor theme.

Replace Glyphicons with Font Awesome in CSS using LESS and Grunt

Short version: I would like to use a font set to REPLACE Glyphicons without also including Glyphicons CSS, and without modifying the source bootstrap.less file.
Long version:
Using Bootstrap's own Grunt file and source files as a base, by default a build process will include Glyphicons in the compiled CSS file.
Since I do not plan to use Glyphicons at all, the "lowest hanging fruit" for me is to go ahead and compile this way, but also include the font I will be using (for example, Font Awesome).
However, the more "elegant" way will be to only include the replacement font.
I can modify bootstrap.less, which includes this line:
#import "glyphicons.less";
such that the Font Awesome less file is used instead. However, the problem with this is that I am using Bootstrap as an "untouchable library" not as a modifiable source file. I want to be able to drop in new versions of Bootstrap at a moment's notice without the need to remember to change this modified line.
Does Grunt have the concept of "replace string A with string B in memory before the compile runs"? Or is there another way to accomplish my goal? Or should I just not worry about it and include both sets of compiled CSS?
I think you can use grunt-string-replace
https://github.com/erickrdch/grunt-string-replace

how to open an apple unsupported file in our ipad app

i need to open an Apple unsupported file in my ipad app using "Open In" feature. The file extension in ".lasso" . I said that file is unsupported by Apple, because i cant find it description in Apple System-Declared Uniform Type Identifiers.
I was try to solved that using CFBundleDocumentTypes in info.plist, but i still can not open it. i was write this in my plist :
but when i try to open a .lasso file from another apps, there always show an alert "Can not open this file in another apps".
do somebody know how to solved it?
You need to create your own UTI for your file type, something like com.yourcompany.lasso. Your Info.plist is claiming to export the public.plain-text UTI which of course already exists. You would also list the pre-existing UTIs that your new UTI conforms to. You don't show what's under the "Conforms to UTIs" key in the screenshot, but it should apparently be public.plain-text if .lasso files are indeed plain text. (If there's a specific encoding for .lasso files, such as UTF-8, you should consider something more specific, such as public.utf8-plain-text.)
Also, you should either have a custom MIME type or not use one at all. You don't want to redefine the "text" MIME type to suggest that all data streams of that type are Lasso files, do you?
And why are you using all-caps for "LASSO". I assume that, in real use, files will have an extension in lowercase like ".lasso". Right?