Atom is running slow when edit a file which is over 500 lines - editor

when I use Atom to edit javascript files there has some performance issues, if the js script lines is over a number of amount, e.g, 500, to scroll the file or move cursor will be stuck. It should not because hardware problems and 500 lines is also not a big amount. Is there something I can do to make Atom to run smoothly when I edit a big size file? Thanks,

As you can read in this article, this is an ongoing issue with Atom and is currently being dealt with by the team. I don't believe it has anything to do with computer performance.
I currently run an i7 machine and, when opening large (typically minified) files, the editor will run extremely slow and, in some instances, crash completely.
Hopefully we can see a resolution soon.

Finally I found the problem occurs is because a plugin -- linter-jscs, 500 lines is not big amount, after disable this plugin, editing is on right way.

Have you considered the possibility that your machine may just be slow?
I understand this doesn't directly address your question, but if you're not bound to Atom you could experiment with other text editors. I personally recommend Visual Studio Code. Have a look:
https://code.visualstudio.com/download

Although you've posted a solution, it may be worth considering using a package such as Timecop, which displays information about where time is spent while Atom loads. You can also check similar information in the Settings > Packages view, which will list how much time each installed package will add to the startup time (see the Flight Manual section on packages).

Related

How to print a file from VsCode?

I want to send the file I'm currently editing to a printer, like I did in Notepad++ for example.
I havn't found any hint on a print command. Is it not possible ?
It is not yet available, but I found an issue report for that feature.
It's currently in the backlog, so we can expect it soon.
https://github.com/Microsoft/vscode/issues/5953
Edit:
In the meantime:
https://marketplace.visualstudio.com/items?itemName=nobuhito.printcode
https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print
Now you can install addon for VS Code - search "PrintCode".
Note that the repository for this extension was last updated in February 2018 with numerous issues outstanding.
I found the PrintCode extension inspiring but unfinished and with a number of flaws. In particular it depends on a specific paper size to wrap and as a result does not respond well if you change paper size or orientation in the print dialog.
It's open source so I looked at the code and didn't like that either. No programmer ever likes another's coding style. So I pinched the idea of using a web-browser as platform driver for HTML printing -- my hat is off to the PrintCode author for that cunning insight -- and wrote my own.
In the process I fixed all the known bugs, added everything on my wishlist and a couple of things suggested by others. The biggest thing was figuring out the CSS required to respect print dialog paper size and orientation. This also sorts out the mysterious disappearing line numbers problem, although I'm not sure why. The next biggest thing was learning to probe for an unused port, a problem that also afflicts PrintCode causing the browser to open showing no content.
Major issues
PrintCode depends on a web service. You can't use it offline.
Many people want to be able to open a file, select a portion and print just the selection.
The print dialog supports changing paper size and orientation. This clashes with the way PrintCode works.
Some people like to run multiple VS Code windows.
When you print a markdown file, you probably don't want it printed like a text file when it can be rendered with fonts and proper headings and bullets etc.
Support is required for remote workspaces.
Because each instance of VS Code needs a different port for its embedded webserver, you can't just use a setting. Dynamic port allocation is necessary.
Remote workspaces weren't even a thing until two years after maintenance ceased on PrintCode.
If you want to survey your options, get onto https://marketplace.visualstudio.com, choose the Visual Studio Code tab and search for printing.
If you just want a link to my version, it's here http://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print.
If you like what you see but need something I haven't thought of, the marketplace page has a link to the repo on github. Create an issue and tell me what you need -- or write it yourself and submit a PR.
Now there is an extension available for printing from the VS Code Editor.
It's called VS Code Printing Free.
I've tried it for a couple of days and it works fine.
Poor man's answer: Copy code to Notepad2 or Notepad++ and print from there.
The colour coding will be different though
You can use an Extension of VS Code: PrintCode
Install extension PrintCode
On Mac: command + shift + P
choose command> PrintCode
I have modified the https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print. If you change the values that I have marked in the picture in the extension settings a browser tab opens with the you can then print this also works on the Ipad. It works also with the code-server Version inside a Docker Container.
I put the file on github https://github.com/chrishdx/vsc-print
enter image description here

not enough space for environment appears when executing ".exe" file

I am trying to use an application called CLUT.exe which is an old application for MS-DOS that can be used to reindex NTX files for DBF databases.
(This is not the main topic, but I am just writing this if someone wants to test the app and don't trust at all about the content).
The problem starts when trying to run the command line version through console (cmd.exe) and this error appears:
C:\>CLUT.exe [arg1] [arg2] [arg3]
run-time error R6009
- not enough space for environment
So, according to what I've searched, this could be a possible solution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;230205
but it doesn't work and every alternative that I found to solve this over the internet is the same.
Another alternative could be to make right-click in the .exe file, go to Properties then Memory tab and increase the Initial environment memory from Auto to the max value but it doesn't work too.
Well, I am stuck and no "possible" solution is working for me. If someone is interested, knows more about this issue and want to test, you can download the application from here (click "Free Download" green button):
http://www.filebasket.com/free/Development-Clipper-programming-language/clut-exe/13996.html
or directly from my DropBox:
https://dl.dropbox.com/u/15208254/stackoverflow/clut_214.rar
Just to know, I am using Windows 7 and the CLUT.exe application is a Clipper based app (old programming language) that may run under windows console (cmd.exe).
Wikipedia does mention other dos emulators but, oddly, doesn't mention BOCHS.
Reindexing NTX files is not a difficult thing to do, and can be done with tools other than CLUT. For example, many of the utilities listed on this part of Download32 could be used. Otherwise, you could write your own using Harbour Project or xHarbour. Or contact me off list and I'll cook up something in Clipper 5.3.
LATER
If I read the README correctly for CLUT, it's a replacement for the DBU utility that comes with Clipper 5.x. I can supply you with a build of that if you're unsuccessful with other approaches.

Delphi7 - How can i find where my project is hanging the compiler?

I have a project in Delphi7. Its is rather large consisting of 40 odd forms and frames.
Recently, the compiler only allows me to compile the project once so i can run it, then every re-compile the IDE hangs and i have to end the Delphi process. Before this occurs, my CPU goes to 50% (on dual core machine) so my deduction is the compilation process has gone into an infinite loop. The Executable it produces is not runnable and usually at a fixed size after it hangs.
I was wondering how i can go about finding where this inconsistency in my project is. Other projects do not suffer from this same issue.
You can use Process Explorer to discover what compiler is doing (reading a file, or ...).
Check the QC 3807 issue.
Check the system resources - free disk space, memory. Clean the temp folder. Check the disk for errors. Do you have antivirus running ? If yes, then try to turn it off.
Use "process of elimination", to see if it's something in your code.
First, make a backup of where you are, or save to your CVS (you ARE using version control, right? RIGHT? good.) Revert your branch to an earlier version where it worked. See if that works. If so, merge half of the changes from the present-day version. If that works, try the other half. Keep cutting things in half, and you'll find the code that causes the problem, by process of elimination.
Or, it may turn out to be something in the configuration. Carbonite may be your friend here.
You can either:
Enable "Compilation progress display" in the "Environment Options" window, in the "Preferences" tab.
Use the command line compiler bcc32.exe to have a detailed console output.
Both will let you know which file is hanging the compiler.
Take a look at the great Delphi Speed Up tool, which allows e.g. to abort CodeCompletion and HelpInsight by ESC/mouse move.

Sampling Large Data Files

I currently work in the position of Data Warehouse programmer and as such have to put numerous flat files through ETL process. Of course prior to loading the file I have to be aware of its content, the problem is that majority of the files are > 1 GB large and I can not open them using my dear old friend "notepad". Kidding. I usually use VIM or Notepad++ but it still takes a while to open the file. Could I perform a "partial" read of the file using VIM or some other editor?
P.S. I know that I could write a 10 liner script to "data sample" the file, but it would be simpler to convince team members to use a feature of an editor than a script that I wrote.
Thank you for any insight you might have.
If you want to stick with using vim, you could have a look at the LargeFile script.
Alternatively, I've always found that UltraEdit opens large files extremely quickly.
You said you had VIM, that makes me wonder if you have a unix environment as well?
If you like, you can pipe the input through unix utility top and display the raw imput on your screen. Like this:
EDIT: (thanks Honk)
terminal$> head -N 15 file.csv
(Where that 15 indicates you want to see 15 lines only).
Pretty sure there are loads of similar questions, but hey, Textpad is a good choice for this.
use the head command.
Use the 'less' on solaris ... use the same through cygwin on windows. On mainframes this problem doesn't appear, ISPF editor handles it pretty well.
UltraEdit claims to handle files over 4GB...

Whatever happened to jEdit [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm not sure if many people know about this text-editor?
jEdit was kinda big in 2004, but now, Notepad++ seems to have taken the lead(on Windows)
Many of the plugins haven't been updated since 2003 and the overal layout and usage is confusing...
I'm sure jEdit has many nifty features, but I'll be damned if I can find out where to find them and how to use them. Reading that manual is a fulltime job on it's own.
I've been using jEdit for a few years now, mainly on windows, but also on Ubuntu.
I use it for: SQL, awk, batch files, html, xml, javascript...
Just about everything except .NET stuff (for which I use Visual Studio).
I love it.
summary
I use jEdit because it has the right balance for me of ease of setting up vs. features and customisability. For me, no other editor strikes quite as good a balance.
cons
It can be a bit hard to make it do the things you want.
pros
I love the plugins
Being able to define my own syntax highlighting etc. is just what I want from a text editor.
The manual is very good and quite readable. I strongly suggest reading it through to get an idea of what jEdit can do for you. (In fact, I suggest this for any software you use)
It's cross-platform. I used it just on windows for a long time, but now I also use Ubuntu, and it works there: I can even copy the configuration files over from my windows machine, and everything works. Nice.
other editors
In the past I did take a look at Notepad++, but that was a while ago, and it didn't have a nice way to define your own syntax highlighting, which is important for me. I also paid for Textmate and UltraEdit at different times (both very good), but in the end, jEdit comes out on top for me.
I also used Eclipse for a year or so. It's fantastic, and it'll do anything you want, but you have to be really into Eclipse to get the most out of it.
I've occasionally wondered about the same thing (what happened to jEdit - though I'm not sure if that was your main question).
Apparently, the main developer, Slava Pestov, left the project in 2006 (to focus on Factor, and his studies), and the jEdit development has never really picked up again after that. Which is a shame. :/ (I haven't actually followed closely, but I guess it's telling that there has not been a major release of jEdit in the last 4 and half years.)
Now, while googling around, I found some info written by Slava himself. It seems at that time he not only gave up jEdit, but developing in Java altogether, after becoming "increasingly frustrated" with the language.
I've been using jEdit since 2003ish. I use it on my Ubuntu 8.04 box at home, however it does have a few bugs: sometimes when you click on a button which opens a dialog, such as "Open File", the dialog will be completely blank.
This could be a Java thing, but it seems a strange issue.
Other than that, I'm quite happy with jEdit - it's the best general editor I've found (so far) for Linux (ducks as hordes of Vi and Emacs users light up their flame cannons)
I like the XML Editor plugin: auto-completion when you close XML (including HTML) tags, plus if you specify a DOCTYPE it gives you auto completion.
There is also a handy plugin for visually viewing diffs between two files.
jEdit is by far, my prefered editor since 2010. It has a unique set of features that I didn't found in any other:
Multi OS: Win, Linux, Mac.
Portable: Just copy a folder and it is ready to use. All settings are kept in .XML and .properties files inside jEdit subfolder. This is crucial if you don't have admin rights on your enterprise workstation.
Search-Replace: The most enhanced I've seen in a text editor: Full Regex specification with Bean Shell scripting capabilities for back references. For instance: Let's say you want to apply an increment on every number found in your text (replace 1 by 2, 10 by 11 and so on). Just search for regex "(\d+)" and replace by a Java expression "Integer.parseInt(_1) + 1". It's just a simple example, but enough to show how powerful it is.
Database: Just select your SQL statement, press a button and get the resultset from MySQL, MsSql, Oracle, Teradata and any other Jdbc compatible RDBMS. Export results to csv. Works like a multi-database command line tool. Browse and navigate on your database schema. (SQL plugin).
Customization: Here is where jEdit shines. There are tons of features. The highlight is the ability to use any java API to expand it! Access them from your Beanshell scripting macros. Example: I needed a function that decode selected text from/to mime64. No problem! I Just downloaded a library from commons.apache.org and accessed it from a jEdit macro. It's just unbeliveable how expandable jEdit can be with this feature.
Highlight: Select a word or phrase and it is highlighted right away in the entire text. The mini-map of ocurrences is shown in the scrollbar. It allows quickly find, for example, a respective css style in separated file just using the mouse. No need for Ctrl+F or type anything. It works even on ordinary txt files. (Highlight Plugin)
Plugins: FTP, XML, Text Diff, Themes, Text Tabs, Highlighter, character map, Mail, Whitespaces, Abbrevs, Minimap...there are hundreds of them.
There are dozens of other nice features that I won't describe here in order to keep this answer not too long. The complete article can be found here and the mime64 example here.
At first glance, jEdit is just another text editor. The full capabilities come into light when you start playing with it's endless customization/expansion power. My initial reluctance of accepting a java-written text editor disappeared when I realize that only a java text-editor could be so extensible. Its initial drawback turned into it's main advantage.
I have been using jEdit for the last five years. And I agree with Mr. Mahan's comment above, jEdit has reached the "just works stage" and does not really need anymore development.
I mainly use it for PHP web development and have tried everything from commercial IDEs (DreamWeaver) to php designer, NetBeans, Eclipse, Apanta and Notepad++. And nothing comes close for customization possibilities. If the plugin does not exist, chances you can whip something together with a BeanShell Macro (assuming you want to dig into Java).
On Windows I use Notepad++ as well, but mainly as a Notepad replacement (I even renamed the notepad.exe)
At the end of the day it comes down to taste. What is important to you and what will make you more productive. A distracting GUI and fluffy features can take you away from what you should be focusing on.
And to boot I have converted a few developers to jEdit along the way.
At the risk of performing necromancy:
Because of the way it's been released the last decade or so, major Linux distributions usually lag quite far behind the latest stable version. The good news is that there are repositories to install and upgrade it automatically on Ubuntu and more.
For a couple years I shared configuration files between Windows, FreeBSD and Linux without problems. That's more than I can say about any other application I've ever used.
The only issue I've heard about is that it used to be slow back in the dawn of time. Now it's really fast.
Encodings and line endings are handled more seamlessly than any other editor except IntelliJ IDEA.
Vertical editing. Just hold down Ctrl and drag to create a rectangular (or even a zero-width vertical) selection.
Better search and replace than any other editor ever except IntelliJ IDEA. I just started writing a list, but it has to be seen to be believed. Just Ctrl-f and see for yourself.
I had to use during my vocational education for XML and XSLT. It had a lot of bugs and didn't work always. I couldn't get to like it, but if I had to test some XSLT I'd give it another shot. I found Notepad++ and I am more than happy with it for what I need.
To your question: Did you take a look at jEdit's plugin list? There are some plugins released 2008 and the latest version was released on 8th August 2008.
Myeah, I just installed the 4.3pre15(latest) and it does look a bit better.
Super feature is the automatic XML DTD creation you can get from one of the plugins.
Now THAT is awsome, especially for big files
After many years, jEdit remains my favorite free validating XML editor. I love the seamless combination of XML validation with plain-text editing features such as regex search-and-replace across multiple files.
I have used jEdit for a number of years, both on PC and Mac (a bit funky on the Mac).
Currently I use it primarily as a folding editor for a number of on-going documentation notes. I have use the folding at the text indent levels - an easy way to collapse and expand file sections, without any work to set up each section.
The feature I really like are the command shortcut alternatives you can set up, the tool bar icon control, and the the abbreviation expansions. The Plugins I especially favor are the BufferTabs to display rows of file/buffer names, and the Whitespace and TextTools.
I recently loaded the GroovyScriptEngine, in part because of the syntax coloring and control for groovy. I set up 2 seperate jEdit versions, in part to maintain seperate history lists, as I update a few dozen files repeatedly.
I loved Notepad++ on windows, but when I made the switch to Mac I was left behind. Since then I have been in tune with utilities that work across multiple platforms so that is why I switched to JEdit over 2 years ago and I have been loving it ever since. It works flawlessly on my Mac, never crashes, is fast, and has many many add-ons. It is based on Java so it works on many different platforms. I think Jedit is equal to or better than Notepad++
My favorite plug-in is the FTP module. I can open, edit and save files on my FTP server just as easily as if they were local.

Resources