Every time i open a file with jedit text editor, large buffer warning pops up - jedit

I use jEdit very often to open my xml files. It so happened that once i tried opening a huge file(around 900MB file size, say xyz.xml) with jEdit, which failed.
From then on, every time i open any file(file size< 1MB) with jedit text editor, large buffer warning pops up:
The buffer is very large and jEdit may become unresponsive.
Can anybody help me how to resolve this problem. Is the only way out for this is to reinstall the editor?

JEdit doesn't support very large files very well. You can increase the size that JEdit is allowed to use inside of Java by changing java's heap size when you launch jedit like this:
java -Xmx512m -jar /FOO/BAR/jedit.jar
If increasing the memory size doesn't work for your largest files, you should try another editor. vim performs very well with very large files.

Related

I accidentally enabled tokenization for a large file, how can I disable it?

I was opening a large .csv file and then a popup appeared saying: "tokenization, wrapping and folding have been turned off for this large file in order to reduce memory usage and avoid freezing or crashing."
I didn't think much of it and enabled it, but now everytime I try to open the file the window freezes. Is there a way to disable tokenization for this file?
I tried decreasing the max tokenization line length to disable tokenization for the .csv file. But, despite that nothing changed and it still kept crashing everytime I try to open it.

IntelliJ text looks HUGE after update to 2019.2

I updated IntelliJ to 2019.2 this morning. After the update, all the fonts (actually, fonts and widgets) on the window look absolutely HUGE (even the splashscreen is much bigger when it starts). Main window has the look (in terms of the size of widgets) as being in presentation mode, more or less.
I tried decreasing the size of the fonts in Settings -> Appearance & Behavior - > Appearance (set it to 8) and in Settings -> Font (also set to 8). And the font in the text editor now is back to almost usable (still a little bigger that I'd like) and the menu text as well.... but everything else still looks too big (buttons, tabs, text on the tabs that are on the left side)... so, it's CRAZY. How can I get it back to normal?
I'm on ubuntu 19.04 (actually running KDE) and using OpenJDK.
PS I just downloaded 2019.1 and tried starting it. It looks normal, the way I expect it to. I'm downloading 2019.2 now and let's see what happens what I start it (not from the updated IDE directory).
Just checked starting 2019.2. It looks the way it looked when I started from the updated one. Will stick to using 2019.1 for the time being.
Please refer to the HiDPI configuration document, there were some changes in handling HiDPI on Linux with the move to JetBrains Runtime 11.
It may help if you switch to the IDE-managed HiDPI mode (legacy mode) by adding
-Dsun.java2d.uiScale.enabled=false
in Help | Edit Custom VM Options and restarting the IDE.

Issues with IntelliJ on a 4K screen

I splurged and bought one of those high definition 4K screens. More specifically, the Dell UltraSharp 4k UP3216Q 31.5", combined with a new PC running Windows 10.
When the computer occasionally reboots, it goes into a mode where when I load IntelliJ, it shows the following error message:
8:16 PM You may need to manually configure the HiDPI mode to prevent UI scaling issues. See the troubleshooting guide.
The interesting thing is that when it's running in this mode, I actually like the way IntelliJ looks. I like it because it's running in true sharp 4K mode, and at the same time, all the fonts are large enough to be legible, and not require a magnetic resonance microscope or a monocle to make out the letters.
However, other times, when the system boots up, I do not get that error, meaning everything is functioning normally, but in that case, all the fonts are so tiny as to be illegible. It literally hurts my eyes to look at it, and the only alternatives I have left at that point is to either drop down from 3840x2160 into 1920x1080, or to go into the settings, and start increasing the font sizes, which is annoying. Not to mention that if I drop down into 1920x1080 mode, then the quality of what I am looking at degrades, everything starts looking pixelated...
Is there anything that can be done to stabilize the situation on these new 4K screens so that IntelliJ looks normal?
Try this:
Help > Edit Custom VM Options:
-Dsun.java2d.uiScale.enabled=true
More information can be found here:
https://intellij-support.jetbrains.com/hc/en-us/articles/115001260010-Troubleshooting-IDE-scaling-DPI-issues-on-Windows
If that does not help create a ticket in the JetBrains issue tracker: https://youtrack.jetbrains.com/
They are usually very responsive.
Another possibility is that you have the Windows UI scaling value for the screen set to a non-integral value in display settings. This messed me up, I had the setting to 175%, while the default is 200%. Intellij (and many other applications) will not scale properly if that is set to a non-integral scaling value.
As soon as I switch this back to 200% Intellij scales perfectly.
I fix this problem after setted env variable IDEA_JDK_64 to jdk path in windows 10

PDF to PostScript Using Ghostscript: large files having issues printing

I'm currently using Ghostscript to convert 500 page PDF files into PostScript.
I'm using Windows 7, Ghostscript x64 v 9.16, and a Kodak Digimaster Commercial Printer.
I use the following arguments for GhostScript to convert a PDF into PS:
C:\Program Files\gs\gs9.16\bin\gswin64c.exe"
-dCompressFonts=true
-dSubsetFonts=true
-dEmbedAllFonts=true
-sFONTPATH=C:\Windows\Fonts\
-dNOPAUSE
-dBATCH
-sDEVICE=ps2write
-sOutputFile="PostScript.ps"
"MyPdf.pdf"
I then add %KDK (proprietary) commands to dictate which pages need to print on which paper by using the %KDKSlip command based on the Printer documentation.
The example below would print all pages on Letter duplex except for pages 1/2 and 5/6. Pages 1/2 would print on a paper defined under the name of "YellowPerf", while 5/6 would print on "TriPerf":
%!PS-Adobe-3.0
%%BoundingBox: 0 0 612 792
%%HiResBoundingBox: 0 0 612.00 792.00
%%Creator: GPL Ghostscript 916 (ps2write)
%%LanguageLevel: 2
%%CreationDate: D:20150506143059-05'00'
%%Pages: 8
%%DocumentMedia: Letter 612 792 0 white ()
%%+ YellowPerf 612 792 0 yellow ()
%%+ TriPerf 612 792 0 white ()
%KDKRequirements: duplex
%KDKSlip: YellowPerf duplex 1
%%+ TriPerf duplex 5
%%EndComments
%%BeginProlog
This is then sent to a Kodak Digimaster printer using a Windows command:
> COPY PostScript.ps PrinterName
This has worked fine with smaller documents, but I'm having issues with larger page sets.
When I attempted to print to the Digimaster using a 500 page PDF to Postscript file, it had errors occur: "Busy, do not reset the RIP".
File size of those that didn't work:
PostScript File Size: 52 MB
PDF File Size: 41 MB
File sizes of those that did work:
PostScript File Size 1MB
PDF File Size: .8 MB
Why does this work fine with smaller files but get hosed on larger files?
Would anyone have any advice?
It is not necessarily the filesize of the PostScript that causes your problem:
It could be the PostScript itself, or
it could be that you made a mistake with your editing of the PS files when you inserted the (proprietary) %KDK-comments.
Are you sure your text editor doesn't silently change your linefeed characters?! This could also change the binary parts of the PostScript!
Also, I'm not sure if the copy command does handle print jobs like it should. I would prefer the lpr command (ah... is that even still available on your version of Windows?!)
To debug this and to explore a few different roads to successful printing, I would try a few different steps:
To debug
Send the original PostScript, without the added %%KDK DSC header comments, to the printer.
That printer model has a nice feature you can utilize: you can check if its RIP processes the input file completely and successfully without needing to output your 500 pages on (wrong) paper and waste it therefore (you'd also need to discard it afterwards -- too much work too). Just click the red "Stop" button on its user interface monitor.
Does that one complete the RIP process successfully?
Yes? Now you can now even print it. Before you do so you can even modify the job settings to select a particular paper tray, by clicking on some button on the interface (can't recall the exact button label though). Then "release" the job and it will print.
If it worked, you can again turn your attention to get your %%KDK lines right.
If it didn't you have to try another route.
Check if a different PDF-to-PS converter is working
Create a PostScript file with the help of pdftops (see here for the pdftops.exe version -- read the README to see which options are available).
Proceed analog to above: first see if it completes the RIP process. Then continue with your %KDK manipulations....
Check if the direct PDF printing is working
The Digimaster model can consume PDF directly. (Well, internally it uses its own PDF-to-PS converter, but that isn't visible to the outside -- so it doesn't really count as a PDF RIP...)
If that works, you can even prepend your appropriate %KDK comments to the PDF file, similar to the lines below (don't rely on me getting the details right, it's from the top of my head, and memory is decades old!):
%!PS-Adobe-3.0
%%.........................
%%DocumentMedia: ..........
%KDKRequirements: .........
%KDKInserts: ..............
%KDKSlip: .................
%KDKBody: .................
%KDKCovers: ...............
%KDKPDFPrintAnnotations: on
%KDKPDFFitToPage: on
%KDKBinaryOK: on
<esc>%-12345X
%%Emulation: pdf
%PDF-1.5
%...here follow the lines of the original PDF file...
...
Send jobs via "Kodak Printfile Downloader" (KPD)
For Windows there used to be the so-called 'Kodak Print File Downloader' (KPD). The KPD is an application, not a printer driver. Not sure if it is still available.
You could open its GUI, then load a PS, PDF, PCL or TIFF file into its to-be-printed-list of jobs. Then select a few job options (like trays, stapling, sorting etc.). Lastly, send the job off to the Digimaster...
The KPD essentially does the same thing, as you want to achieve: insert %KDK commands into the file header. But you want to do it with a script or an editor (and possibly automatically via a batch process, once it works).
The KPD requires interactive user activity and cannot be scripted.
But you can (ab-)use it to intercept the files it creates from the Windows spooling system, study them and then adapt your scripted efforts so that they also work....
Update
(I had wanted to add this already in my initial answer. But time ran out, so I skipped it for the time being..)
Observe the RIP processing directly at the printer UI
Digimaster printers have their own built-in touchscreen or flatscreen or tube monitor (depending on the age of the model). They also typically have a full-time operator who knows the machine and its tweaks and peculiarities quite will. The machine may be quite a distance from the user sending a job.
So the following should be done when debugging a print problem:
Ask the operator to set the printer to "stop printing", but still "receiving new jobs".
Submit any job(s) you want.
Walk up to the printer and its operator.
Release the job for RIP-ping and observe what happens:
You may see everything going alright and completing until the last page (you know how many pages you submitted, right?)
Or you may see the job aborting at a certain page number.
Or you may see the printer RIP chewing extremely long on a certain page (or several pages), but finally completing the job.
Or you may see the printer RIP hanging with a certain page forever.
Or...
In any case, the details which are observable here may give important clues about where to look next...

Why is the font in the new IntelliJ IDEA 14.1 not rendering properly?

I've just upgraded IntelliJ IDEA (ultimate) to Version 14.1 and the font used in the Project View, Menus and Dialogs seems not to be rendering correctly. I exported the same settings from my 14.0.3 version just in case, although they seem identical, but it still remained the same. I didn't do any changes to the JDK or anything, and if I run the old version the font changes back to the nice and crisp one. I am using Ubuntu 14.04. This problem does not happen on Windows 7.
Under IntelliJ IDEA 14.0.3:
Under IntelliJ IDEA 14.1:
In the new one the font seems to be a bit larger (even though in both cases I they are set to Font Size 22, and I imported the settings from the previous IntelliJ IDEA installation). Notice how for example the 'g' is cut off underneath. There are also other problems where the text is misaligned on the buttons, or not fully visible in dialog boxes.
Usually this doesn't happen when I upgrade. Is there some way to make the font look like before? Did something changed in this latest version and I need to do some JVM switch in the startup script or something?
Update: 5/11/2015
Just updated to IntelliJ 15, and the problem is still there.
Attached new screenshot. Notice how the text is cut out at the bottom where there are letters like p and y, and the button text is offset.
Seconding an earlier response to this question, I have also have had great luck fixing font rendering issues on IntelliJ using tuxjdk. Tuxjdk is a JDK for the IDE, while any applications you're coding on runs in their own project configured JDK such as Oracle or OpenJDK. Here are the instructions:
The following fetches, unpacks, and moves the version you need to /usr/lib, then cleans up the archive. Modify /usr/lib to wherever you like to keep your JDKs.
wget http://urshulyak.com:85/jdk-8u5-tuxjdk-b08.tar.gz
tar -zxvf jdk-8u5-tuxjdk-b08.tar.gz
sudo mv jdk-8u5-tuxjdk-b08 /usr/lib
rm jdk-8u5-tuxjdk-b08.tar.gz
Open up idea.sh in your IntelliJ application folder /idea-IU-141.*/bin. Change the following line at the bottom of the script from
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" \
to
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "/usr/lib/jdk-8u5-tuxjdk-b08/bin/java" \
That's it. This made huge font improvements for me in Ubuntu 14.04.
UPDATE (by OP)
This solution is the best so far (until JetBrains decide to fix it properly).
I would just add the line: IDEA_JDK="/usr/lib/jdk-8u25-tuxjdk/" to the top of idea.sh, which the script checks before resorting to JDK_HOME etc. (so is probably the recommended way) rather than messing with the LD_LIBRARY_PATH.
In my case I got nicely rendered but huge fonts with this solution. In order to fix it I had to do an extra fix from Appearance & Behaviour -> Appearance
I chose the 'not recommended' option to Override default fonts by Arial size 12. This was the best effect I got so far.
I am using OSX. It may not help.
Double tap shift and search for 'Switch IDE boot JDK'. Try different JDKs if there are.
This might not be the answer you are looking for - but ever since I've started using tuxjdk, I haven't had problems any more with font rendering & intellij on ubuntu. Maybe give it a try?
If you're willing to use the IntelliJ 15 EAP, there is an option for antialiasing (default is checked for me) that appears to match how it was rendered in 14. The option is under Appearance & Behavior -> Appearance:
I have tried all of the command-line arguments to try to get this behavior in 14.1, but was unsuccessful.