I used to see an option when right-clicking on JSON text in the Output console, View as JSON, which would open the line of text in a JSON edit tab. A while ago I disabled some plugins I don't use and now that option is gone.
Which plugin provides "View as JSON?"
Most likely it's the Show as... plugin
A small plugin to display formatted data out of the debugger.
Uses IntelliJ's build-in formatting capabilities. No more need to
copy values from debugger to a file to format them there. Following
formats are supported:
Xml
JSON
Base64 encoded JSON
Base64 encoded text
Usage: While debugging, a new context menu item ("Show as") is
added to every variable, allowing you to display the value of this
variable formatted. The context menu item is available in debugger ->
variables, debugger -> watches and when evaluating expressions.
The "Show as" plugin didn't work for me.
Alternatively, you can create "Show Type Renderers" in the IntelliJ preferences as follows:
Uncheck On-demand if you want to render your object as JSON without clicking "View".
Related
A markdown file is opened under IntelliJ and from its preview if I do a left click on a link, it will follow it and open it the default browser.
But for my current work, it's not what I'm willing to do.
I need to copy its underlying URL to open it on another browser of my choice, that isn't the default one.
But whatever I attempt:
Right-clicking on the link with the mouse
Attempt to copy it by selecting its text and doing Ctrl-C or Ctrl-Ins
the underlying URL of that link isn't copied and I cannot paste it.
Of course, I can enter the .md definition and select that URL part that is between parenthesis, but it's not convenient.
* [COG 2021 : https://www.insee.fr/fr/information/5057840](https://www.insee.fr/fr/information/5057840)
And furthermore, I cannot copy any text content from that preview...
Is there a way to make IntelliJ preview window of a markdown file gaining the expected ability of copying to the clipboard ?
Use markdown editor for this. For example Typora.
PhpStorm (as of v2016.3.2) already allows editing the CSV format text files in a tabular view. I usually work with lot of INI files with syntax similar to
key_name_a="Value for Key A"
key_name_b="Value for Key B"
I tried looking for some plugin to achieve this but could not find one.
I found Ini4Idea
for IntelliJ IDEA
and Editing CSV and Similar Files in Table Format, but these do not solve my purpose.
You can actually use the CSV functionality of PhpStorm to edit INI files in tabular form, with little preparations. No additional plugin is required; the functionality is provided by the "Database Tools" plugin that is bundled with PhpStorm and enabled by default.
Open an INI file then run the command "Edit as Table..." from the "Edit" menu. It opens a dialog box where you can choose the "Value separator" (it defaults to Tab, you remove it and enter = instead) and check the option "First column is header". On the right side of the dialog box you can preview how PhpStorm renders your file as a table using the configuration you changed.
PhpStorm remembers the settings for the file (even across restarts) but unfortunately it seems there is no way to save a new set of parameters (other than modifying the two existing configurations) in order to apply it to a different file.
Is there a simple way to copy syntax-coloured code block as rtf in intellij IDEA?
UPDATE: there is now a new plug-in for this: 'Copy' on steroids that is maintained by JetBrains.
There is no way to copy colored code block from IDEA directly.
A workaround is to use File | Export to HTML, then open HTML in a browser, then copy from the browser window and paste into Wordpad or MS Word.
Another and more faster way is to install the Copy as HTML plug-in in Settings | Plugins:
Copies a snippet of code as html
Adds menu items "Copy as HTML" to main menu and editor popup. Will copy the current selection or the complete editor buffer. Currently only works if focus is in editor (for example won't work in project tree).
Preserves more formatting than the built-in HTML export.
HTML is only a snippet (without html and body tags) meant to be inserted into a complete HTML document.
Currently HTML format is fixed and uses CSS a lot.
Options: unindent, add border, padding, line numbers, tabs to spaces conversion, include editor's warning and error highlighting (see IDE Settings -> Copy as HTML).
Reuses the editor "Show Line Numbers" setting (see Idea's "View" menu).
IntelliJ IDEA 15
By default, you can copy rich text from IntelliJ to Microsoft Word (for example).
This feature can be found in File > Settings... > Editor > General > Rich-text copy > Copy as rich text by default
You can also change the color scheme only for the copy-paste operation (your current scheme won't be affected).
Go to https://gist.github.com/
Copy code from IntelliJ to the new private gist;
Save it, copy colorful code from the browser to wherever you want;
Delete the gist.
Use external tool notepad++
1) copy code snippet to notepad++
2) apply syntax highlighting
3) copy with nppexport plugin to clipboard as rtf
If you're on a mac and like TextMate, here's a great way to copy styled code from TextMate: https://github.com/bblimke/copy-with-style-tmbundle
It's not as convenient as doing it directly from IntelliJ, but it's a bit more convenient than using gist or pastebin. Also, unlike the Copy as HTML Plugin for IntelliJ, this solution actually works at the time of this writing.
I'm writing a custom editor plugin in Eclipse and I'm trying to figure out how to format certain character sequences with symbols. So in the editor view typing -> would be replaced with →. I don't want to modify the underlying document content, just how the characters are displayed. The TextAttribute class only allows me to change the style of the text, not what is actually displayed.
You would probably have to copy all of the Eclipse classes having to do with the editor into your own project so you could modify the method(s) that displays characters on the screen.
Is there a simple way to copy syntax-coloured code block as rtf in intellij IDEA?
UPDATE: there is now a new plug-in for this: 'Copy' on steroids that is maintained by JetBrains.
There is no way to copy colored code block from IDEA directly.
A workaround is to use File | Export to HTML, then open HTML in a browser, then copy from the browser window and paste into Wordpad or MS Word.
Another and more faster way is to install the Copy as HTML plug-in in Settings | Plugins:
Copies a snippet of code as html
Adds menu items "Copy as HTML" to main menu and editor popup. Will copy the current selection or the complete editor buffer. Currently only works if focus is in editor (for example won't work in project tree).
Preserves more formatting than the built-in HTML export.
HTML is only a snippet (without html and body tags) meant to be inserted into a complete HTML document.
Currently HTML format is fixed and uses CSS a lot.
Options: unindent, add border, padding, line numbers, tabs to spaces conversion, include editor's warning and error highlighting (see IDE Settings -> Copy as HTML).
Reuses the editor "Show Line Numbers" setting (see Idea's "View" menu).
IntelliJ IDEA 15
By default, you can copy rich text from IntelliJ to Microsoft Word (for example).
This feature can be found in File > Settings... > Editor > General > Rich-text copy > Copy as rich text by default
You can also change the color scheme only for the copy-paste operation (your current scheme won't be affected).
Go to https://gist.github.com/
Copy code from IntelliJ to the new private gist;
Save it, copy colorful code from the browser to wherever you want;
Delete the gist.
Use external tool notepad++
1) copy code snippet to notepad++
2) apply syntax highlighting
3) copy with nppexport plugin to clipboard as rtf
If you're on a mac and like TextMate, here's a great way to copy styled code from TextMate: https://github.com/bblimke/copy-with-style-tmbundle
It's not as convenient as doing it directly from IntelliJ, but it's a bit more convenient than using gist or pastebin. Also, unlike the Copy as HTML Plugin for IntelliJ, this solution actually works at the time of this writing.