First of all, in case you don't know about it, Emacs has hexl-find-file
which opens up a file in hex editing mode. I know that it's not what you asked for, but if you're already using one, and you're comfortable with Emacs, then it's good to know about it for future needs.
Second, for this kind of "raw" editing of a file (which I tend to do often), find-file-literally
is really great. It does what you'd expect it to do, and pretends to be a pre-unicode version of itself and open the file with escapes showing up for non-ascii characters (and control chars etc). This is likely to do what you want, though it does have the obvious disadvantage of not being able to actually read the text if you have a lot of non-ascii content.
So going down further into primitive support, there's the enable-multibyte-characters
variable and the set-buffer-multibyte
function that is used to toggle it. The nice thing about this is that it changes the buffer presentation dynamically -- for example, try this:
(defun my-multi-toggle ()
(interactive)
(set-buffer-multibyte (not enable-multibyte-characters)))
(global-set-key (kbd "C-~") 'my-multi-toggle)
and you now have a key that toggles the raw mode dynamically. It also has the nice property of leaving the cursor in the same place. But this raw mode shows you the internal representation (which looks like UTF-8) and not whatever the file happens to be using as its encoding. It should be possible to do what you're talking about with some hack (for example, using find-file-literally
on an open file will ask you about revisiting it, but that resets the location and reloads the file too) -- but it sounds like the above is already fine. (That is, my guess is that you're trying to edit some text field in an otherwise binary file...)
vim
can easily do that:
ctrl+ws - Split windows
ctrl+ww - switch between windows
ctrl+wq - Quit a window
ctrl+wv - Split windows vertically
:sp filename
will open filename
in new buffer and split a window.
You can also do
vim -o file1 file2
To open the files in a split screen layout. Replace -o
with -O
for vertical split instead of horizontal.
Best Answer
As a general purpose editor, probably not, but as a way to get yourself out of a pinch, it's good to know a few basics. The good news is that if you know your way around
vim
, it's likely you can use that knowledge to blunder around ined
. The times are changing, but there are still systems that it might be your best editor or connection scenarios that call for it. I've used it from my super-slick smartphone logged into a modern linux box when the connection was bad enough that running a full editor was taking forever and I really needed to just change a line and get out.