I am trying open a very large file in Emacs and it fails to load. Is there a way to open only a portion of this very large file? I don't need to open the whole thing.
You may want to try vlf.el which basically runs head for you. It's still pretty crude, sadly.
You can use head command, store its output in file and read that file
http://unixhelp.ed.ac.uk/CGI/man-cgi?head
Windows equivalent is here:
Windows equivalent of the 'tail' command
If all you want is to read parts of a monster file then use this tool http://www.readfileonline.com/. It rapidly cracked open anything I fed it with.
Related
Following this similar question, it's possible to open a specific file from the integrated terminal via:
code -r <filename>
However, what if, in order to be more organized, I wished to open certain files in certain editors? This would be very useful for quickly creating certain types of boilerplate setups...
I'm guessing it could be something like this?
code -r --editor 1 <filename>
It's not possible yet, but it could be, you just need to upvote this issue I've created.
I have a large folder of DWG files and want to convert them to DXF files, using Solid Edge. After opening the documents, is it possible to "Save As" from the command line or powershell?
Is this a program by program line of code or is it universal for all programs?
So if I wanted to save a .docx document open in Microsoft Word as a .pdf (for want of a better example) can I use that same line of code?
Any help appreciated...
Well since you want to convert from one Autocad format to another, you could do it using Autocad's command line.
https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autodesk-customization-conversion-tools.html?_ga=2.88877275.1703552679.1574826072-7420195.1574826072
This does require you writing all of the scripting of course.
Alternatively, there is this handy scripted mass converter someone wrote using lisp and they wrote a custom script executor wrapper thingy but their scripting supposedly requires the full version of autocat (at least version 2010 to accomplish this.)
https://www.cadtutor.net/forum/topic/51941-autocad-mass-convert-dwg-to-dxf-batch-convert-dwg-to-dxf-mas-dwg-convert/
That said the official AutocCAD conversion command-line utilities are also going to use LISP scripting, so you might want to just take the second script, and work through it manually testing against the normal AutoCAD utilities until you can get it working for your needs to sort of jump start you.
If you do that I would suggest re-posting with tags for LISP and AutoCAD and give them a sample of what you have got if you end up going the official tools and your own or jump-started script route.
Hope that will be helpful to you and others in the future! :)
As commented beneath my question,
No, it would not be universal
So, no, there is no way of using a single command "save as" on every single program, and as Solid Edge doesn't have a command line API, that I know of, I would have to write a program for it.
Rather than having the contents of a long help() call to a function print in the ipython shell buffer, is it possible to specify that the contents should be opened in a separate buffer?
I don't know of a direct way to do what you're asking. As an alternative, you may be able to use pylookup, which will open python help docs in your browser.
I'm trying to compare 2 large text files around 500MB each, I've tried to use Notepad++, Textpad, VIM etc and couldn't get them to even open the text file. Either that, or the editors that DO work don't have the compare feature.
I need to see what changes are made in those 2 text files, that's why I need to compare them. Does anyone have any suggestions?
diff file1 file2
Are the files supposed to be very similar? Use a diff program instead of an editor; since they specialize in showing the differences, they are often more capable of handling large files.
The page at http://drupal.org/node/324 has a list of diff programs for Windows. If you are using Unix or Linux, you probably already have diff installed.
If you need an editor, I know that Emacs can be configured for files as large as this, but I haven't tried it myself. More info at http://www.emacswiki.org/emacs/EmacsFileSizeLimit
Winmerge at http://winmerge.org/
exactly what you want.
Using UNIX/LINUX diff file1 file2 is not practical with large text files.I spent some time looking into solutions today and i wanted to share my finding with you. There is Open Source Project Meld http://meldmerge.org/. It is available on OS X, Linux and Windows platform as well.
If you prefer using notepad++ there is plugin available to download:
Open notepad++ -> Plugins -> Plugin Manager -> Show Plugin Manager -> Find plugin named "Compare".
JujuEdit opens large file and it does not load them into memory. It does not compare features.
I opened a file 1G byte in 2 seconds or less.
It has binary mode.
I was digging through the header files for SDL in Linux when I tried to open the file from the SDL library called "SDL_opengl.h" in Emacs. For some reason, it always causes it to crash. It opens just fine in Vim and in gedit.
Has anyone else had an issue with Emacs just plain refusing to open a particular file? What sort of things should I look for to find what is causing the problem? Mind you, I was able to open every other "SDL_*.h" file in that directory; just that one gives me trouble.
Much appreciated in advance!
I would be interested to see the exact error message, and stack trace if possible.
I suspect file encoding, special characters, file size, cc-mode parsing, or something like that to be the culprit. (emacs 22 and libsdl1.2 on ubuntu 9 with utf-8 screen works fine for me)
Converting my comment into an answer b/c the comments get cut off.
Try loading the file with
M-x find-file-literally
Since this (appears to) resolve the issue for giogadi, I think that points to perhaps the colorization of the buffer. cc-mode does its own colorization...
Oh goodness, I'm a dunce.
So I apparently underestimated both the size of the file AND the speed of Emacs in opening said large files.
I decided to sit and wait to see if it dies completely on its own (as opposed to me xkill-ing it), and after a whole minute, the file is loaded.
So that solves one problem - the file is being loaded. However, why would Emacs take so long to do it? I have no strange settings enabled that should cause it to lag more than usual.
have you hilit-mode on?
with hilit-auto-highlight-maxout and a great value?
I have had the same problem with header-files, so reduce that value.
maybe it is hs-mode (hideshow-mode)?