Which tools exists for byte-level inspection of files? - ms-word

I have a partially corrupted MS-Word file which I'd like to inspect in the byte-level.

HexEdit is pretty nice (allows you to edit files too)

What you need is a hex editor. Some text editors can run in this mode. I always used PSPadfor this

As always there's emacs, hexl-mode allows you to view and edit hex-files.

I like the freeware hex editor xvi32 for this kind of task.

I'm sure there are many, but Ultraedit does this.

If you have Visual Studio installed, you can add the .dat extension to the file and open it in Visual Studio to get a hex/ASCII display.

010 Editor is nice for looking at files that follow some template, it'll try to turn the raw data into meaningful labeled values for you.

Take a gander at BeyondCompare for file comparisons; version 3 has comparisons for Word files as well. You'd be surprised at how often you'll use it once you have it.

Related

Formatting Scala files in Visual Studio code

I am working on a legacy code base where someone configured the tab to be 3 spaces and saved the files.
I want to reformat the files so that each file is indented with 4 spaces.
Can VSCode do that? When I select a file content and select format from edit menu it says no code formatter for .scala files
The accepted answer is deprecated! See vscode-scalafmt.
Use Metals instead.
Sounds like you might want to try the Scalafmt extension for Visual Studio Code.
EDIT:
I can't delete this answer as it is the accepted one, but the answer of #pme seems to be the correct one now.

Is there a diff tool that allows copy-paste

Is there a diff tool that allows you to paste two segments of text and get a diff? I can't use an online tool because I'm dealing with proprietary data, and I haven't found a tool that provides that feature.
Try WinMerge. It'll do that.
Steps:
Download and install winmerge
Open WinMerge & Create new <CTRL+N>
Paste into left & right, then refresh <F5>
In case anyone comes here looking for a tool for Macs that can do this, it seems that there are two tools that can do just this.
Beyond Compare, the Mac version is currently in beta.
Kaleidoscope app
Copy first text
File -> New from Clipboard
Copy second text
Edit -> Paste to comparison
Unfortunately, it doesn't seem to be possible to change the texts once they've been pasted.
There is also a similar (closed) question (the question itself was for a Mac tool, but at least one answer has an alternative diff tool for Windows):
Diff tool for Mac without saving text to files
For those who use Atom, there’s the split-diff package.
KDiff3 can do that too. On startup just Cancel the open dialog and than copy&paste snippets into the two panes. It immediately (re)computes their diff.
Notepad++ makes it really easy to do that: paste first text, open new tab, paste second text then Plugin > Compare > Compare.
Make sure you have the compare plugin installed.
Source: https://stackoverflow.com/a/15817384/965176
I think this might be what you're looking for - Line Diff - it's a online tool that takes as input two snippets of code/text, diff them and then render a nice github like html page (permanent or temporary stored) that you can then share with coworkers.
I used BBEdit (Mac OS X):
paste your snippets into 2 separate new documents (without saving)
go to search → find differences
using the clock icon, pick your new documents
The app has a subscription model, but this doesn't seem to be a premium feature.
You can try online tools
it's good
https://www.diffchecker.com/
Or you can try KDIFF3 its also a good tool
http://kdiff3.sourceforge.net/
also you can try online diff tool , maybe it's useful to you.

Large text file editor with compare feature?

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.

How do I open a .diff file on a mac?

I have a .diff file but I don't know how to open it. I trie using FileMerge but that doesn't give me an option to open a .diff file.
Any ideas? Thanks.
Diffs are just plain text. You should be able to open it with TextEdit or any other text editor. If you want syntax highlighting probably many of the fancier editors could do that. I just used Aquamacs Emacs to load a diff file and it provided some highlighting.
And if you want to ‘apply’ the diff to a file, use the patch command, like in SanHolo's answer.
Use patch from the command line, like you would on a Linux box.
patch original_file.c diff_file.diff
Edit:
I'm assuming that with "open" you mean to apply the diff file to the original. If you just want to take a look at the file, see Chris' answer.
Vim offers coloration for diff files. If you'd rather go graphical, use MacVim (which is free) or TextMate (not free).
TextMate
MacVim
Vim
Kompare opens .diff in convenient view

Lightweight editor for web.config files

I'm looking for a lightweight text editor for web.config files which has colour syntax highlighting (like in visual studio).
Any suggestions?
You can use Notepad++. When you work with web.config select XML language to get color syntax highlighting. It looks like this.
Well obviously you can use any editor (e.g. EditPlus or Notepad++) but if you're looking for a light weight editor client that "knows" what a web.config is have a look at ASPhere
http://blogs.msdn.com/publicsector/archive/2007/12/07/free-utility-web-config-editor-with-a-great-ui.aspx
I use ASPhere. It's great!
About ASPhere ...
ASPhere is a freeware utility
primarily intended for creating and
modifying configuration files for
ASP.NET. But they are not only
web.config files ASPhere can work
with, you can use it for viewing and
editing normal XML files and plain
text files as well.
http://www.asphere.cz/en/index.html
I use Notepad2 for that and many other editing purposes. Freeware, totally usable, quick and light - all you can ask for. Highly recommended.
Marc
in the notepad++
Settings -> Style Configuration -> in the left Listbox select XML -> at bottom the "User ext.:" textbox set "config".
Done
The Scintilla SciTE is ultra lightweight, and does XML syntax coloring.
SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs.
The download page says:
A single file executable called Sc1 (530K) does not need any DLL or properties files as these are linked into the executable.