Tag Archives: editor

ht: High marks, even if it’s lost on me

This little adventure of the past two years has run me up against more than one tool that I like a lot, but haven’t a single use for. ht is one of those, for reasons that are probably obvious just in these screenshots.

2014-12-22-jsgqk71-hte-01 2014-12-22-jsgqk71-hte-02

ht, a/k/a hte or the HT Editor, has a perfect interface with lots of color, a drop-down menu approach, an adjustable two-pane layout, on-screen function keys and a mess of other goodies.

My only problem is, I can’t say that I’ve ever needed a disassembler and executable editor. 😦

I see where it can double as a hex editor though, so perhaps I should just accept it as that, since I might be able to put it to that use … maybe once, sometime in the next two or three years. πŸ™„ It probably wouldn’t be fair to just call it a hex editor though, since it’s obviously prepared to do a lot more.

I’ll give ht high marks for its style and presentation, even if the purpose of the program is completely over my head. That puts it in good company though, with things like tig, txt2regex and others. 😦

ht is in Debian as well as Arch’s community, and probably for good reason. I’d be pleased to think I could put ht to use some time — heck, I might even settle for watching over someone’s shoulder while they use it. 😐

P.S.: Argh, there’s that red-on-blue effect again. … 😑

bashtagger: Joining the coalition party

I eagerly await the arrival of the console tool that replaces EasyTag on my system — even more so now than I have for the past five or six years, because EasyTag took it upon itself to make the leap to GTK3, and now splatters my screen with all kinds of ungodly ugliness. 😳

I’ve come close, with both stag and cursetag, and my hope is that the prophet appears soon who will herald the arrival of the chosen one. I did get another tip from hakerdefo that bashtagger might be close, but I’m withholding my endorsement until the miracles can be verified. πŸ˜‰


bashtagger works in a menu format, allowing you access to tag information in flac or ogg files (no mp3, which suits me fine). You can set and erase tags over single or multiple files at once, and most every interaction is done through a line-editing prompt.

Color use is good, and the menus are exceptionally easy to navigate. In fact, the only difficulty that I had with bashtagger was its preference to run from the same directory as its target files. I am not sure why my attempts to feed it a target directory were turned down, but it was easily sidestepped by moving the script to the same folder as the files.

bashtagger does allow for a configuration file, and apparently that’s where the options to rename files based on their tags must reside. I tried once or twice to rename music files according to their internal tags, but the results I got were different from what I expected. I will take responsibility for those errors though.

By my experience, bashtagger lacks the one small feature that might rank it with things like stag or cursetag — the ability to reverse the rename function, and fill tag data based on the file name.

It’s a bit of an oddball feature, but it’s the one I look for as a sign of a true believer. I looked long and hard at bashtagger, but I don’t think it includes that feature, which makes me sad. If I have overlooked it, please help me.

bashtagger does seem to streamline the omnipresent console tools that can fill data or erase tags via command-line flags, which I count as an improvement. I’d like for it to make the last remaining steps toward the few features it doesn’t yet have, but I am patient.

The collective irony is that between these three — stag, cursetag and bashtagger — and the built-in tagging tool in ncmpcpp, EasyTag might no longer be needed. … πŸ˜•

vbindiff: Red and blue

Is it time for a hex editor? It’s time for a hex editor … of sorts.

I have to admit a small amount of surprise in seeing a program as venerable yet well-maintained as vbindiff that seems to have skipped a few small steps in its presentation.


Going by the home page, the first “release” of vbindiff was for the OS/2, way back in 1996. Through the years it appears to have shifted more towards the Windows environment, but added *nix support less than 10 years ago, and for what it’s worth, is packaged in both Arch and Debian.

And my fleeting interactions with vbindiff suggest it is a workable, usable program at the very least. It wisely uses a horizontal split-screen arrangement and a strong white-on-blue backdrop, and keeps almost all its key commands on the screen, when they are relevant.

You can edit a file as well, making it a practical hex editor as well as diff tool. It’s not as graceful or elegant as some, and not nearly as splashy as others, but it fills both needs without tripping up.

Except for two or three small things, and this is where my surprise comes in. First, as you can see in the screenshots, vbindiff is apparently comfortable stretching to a depth of at least 42 lines, and possibly a lot more. That I can guess from my terminal depth.

But I don’t see a flag or any option that will stretch it horizontally, which means that there’s a huge, huge gap of wasted space off to the right. Yes, I know 120×42 is unconventional, and I respect that 80×24 is the standard that reaches back to the 1980s. But it’s a bit of an omission — a giant glaring omission, really — given the tiling window manager trend, and the prevalence of terminal emulators.

Second, vbindiff is slanted toward picking out differences between files, but there’s no visual indicator — and by that, I mean color difference or even just a difference in bolding — to highlight changes. Perhaps that’s intentional, or perhaps there’s a way to set that in a configuration file, but I see no note of it in the man page or onboard help.

Add to that the use of red on blue, which would horrify my secondary school art teacher for the shimmering side effect it has for most viewers. I forget the name of that effect or I’d link to it, but it’s not that critical. White on blue is very good, but red on blue is going to offend Miss Crawley, wherever she is now. Maybe she is responsible for my preference for color at the console. … 😐

I should mention that by its own admission, vbindiff can’t handle files greater than 4Gb in size. Of course, if you really need a diff tool for files that are bigger than 4Gb, then I think you have bigger problems than just color choice.

vbindiff does a few things I like — the aforementioned on-screen help is always good, and it allows navigation with arrow keys. It also uses the Enter key as a quick jump to the next difference between files, which will make some of your diff quests easier.

But I don’t think this stands up to things like dhex or some others. It has potential, but really needs to be brought up to date.

tweak: The word processor of hex editors

Is it time for a hex editor? It’s time for a hex editor. Or maybe it’s time for a word processor. O_o

I saved tweak for later in the game, because I could see by the home page that it was intended to run with emacs-style key commands. That always takes me a little bit to re-learn.

It’s not as bad as I make it sound though. The majority of tweak’s controls and commands are fairly straightforward, and some are quite useful.


After working with tweak for a few minutes, I came to the realization that tweak behaves less like a hex editor than some of its counterparts, and behaves more like a word processor than I expected.

For example, it has an insert mode and an overwrite mode, meaning you can press ENTER and jump to the ASCII side of the screen, and just start typing. Overwritten text will behave much as you might expect, but inserted text will cause the entire remainder of the display to shuffle out to the right as you go.

tweak has a copy-and-paste function too, and you can see that at work in the screenshot. Highlight a section with CTRL+@, then write it to a buffer with ALT+W. Move to a new spot, and remembering to either insert or overwrite, drop it into place with CTRL+Y.

If you’re in insert mode after you highlight a passage, CTRL+W will cut that section from the section, so you have a hex cut-and-paste-slash-cut-and-delete function too.

tweak borrows more from the word processor field with forward and back search functions, hotkeys to go to the start and end of the file, a jump-to-address command and a few more little bonuses.

Perhaps best of all, you can tell tweak to adjust its display on-the-fly, with the CTRL+X+w combination. So if you want to take advantage of every one of your precious 280 columns :roll:, tweak will accommodate.

Commands can be customized in tweak, and the easiest way to do that would be

tweak -D > ~/.tweakrc

tweak will write its default configuration to STDOUT; send that into a configuration file and you can edit it to fit your personal preferences. You could even conceivably edit it with tweak. How meta. … 😐

The tweak home page suggests tweak can handle massive cut-and-pastes and will run reasonably light by “lazy loading.” But if I feed tweak a zero-byte file, ps_mem.py still says it’s taking up over 2Mb of space. So likely if you’re working in a big file or making very big edits, you might need more.

I like tweak for taking the word processor route instead of just assuming the standard hex editor role. It doesn’t have some of the on-screen features that the others offer, but if you squint at the screen while you’re editing, you can almost imagine it’s 1986, and you’re using WordStar. πŸ˜‰

hexe: In the flyweight competition

I’ve been holding off on the next hex editor because the last one, dhex, was so impressive that I knew whatever came next wouldn’t stand much of a chance.

Today I’m comfortable showing hexe though, because I think hexe’s claim to fame isn’t split-panel diff viewing with four-directional panning effects. I think it has other praises worth singing.


hexe by default will confine itself to a narrow vertical band that is obviously intended to fit comfortably in an 80×24 terminal space. It does, however, allow you to set the number of columns of hex code, so you can, with a little trial-and-error, stretch hexe to fit your terminal width.

hexe also adopts a very readable color scheme, wisely putting whites on blue and sometimes reversing text for selections. Perhaps that was intentional, or perhaps the author just likes white and blue. πŸ˜‰

Size is where hexe tends to shine. As you can see on the home page, the code files that make up hexe are barely 4Kb in the Arch version I cobbled together, and the packaged tar.xz file costs me a mere 11Kb of disk space. Installed, yaourt -Qi says it’s 34Kb. I’m comfortable allowing hexe 34K of my hard-earned X-gigabytes, for some fundamental hex editing capabilities.

Memorywise, I notice that the amount reported by ps_mem.py tends to vary with the size of the file that’s loaded. I don’t expect that’s uncommon. Just to be fair, opening hexe with no file in an 80×24 terminal emulator shows up as 550Kb on a machine with a gigabyte available. The image you see above required 2.2Mb, and that was a thousand-line file of random words.

So if you are exceptionally tight on memory — exceptionally, like this tight — you might find it more comfortable to fall back on hexe, as opposed to the Cadillac hex editors we’ve seen in past weeks.

hexe keeps most of its key commands on screen. CTRL+T will switch between display modes, if you need another number system to get the job done. I should mention that insert mode occasionally gave me screen artifacts, where columns and data were smudged, even if the file output was clean.

hexe is in AUR, but the source files have been updated and the md5sums in the PKGBUILD are no longer correct. I don’t see hexe in Debian.

And if you think this is the last hex editor I have stashed away, you are sadly mistaken. … πŸ˜‰

stag: A good find, and a good tool

I got an e-mail from hakerdefo last week with a link to stag, which is an mp3/ogg/flac tag editor for the console, and this one is quite interesting.


I sense a lot of potential here. It seems to have all the requisite parts — a tree browser, a list of files to edit and a panel of tag data, all connected via the TAB key.

To get you started with stag, remember that the directory panel in the upper left only shows folders. I was stuck for a little while wondering why stag couldn’t “see” the files in a folder, until I realized it was expecting me to press the spacebar over a folder to add all the files in it.

Do that, and the files will appear in the right panel, as candidates for editing. Press TAB to bounce to the right, and you can again navigate up and down again with the arrow keys.

Now pressing the spacebar marks a file for editing, and you jump straight to the bottom panel and the available tag info with ENTER. If you press ENTER on a selected tag, you’ll be able to edit it along the lowest line of the screen, and press ENTER to submit it to that file.

You’re not done yet. Press TAB twice more to navigate back to the file window, and press “s” to save one file, or “w” to write them all to disk. And your work should be done.

I am thrilled with stag because it can handle editing more than one tag at a time. If you use the spacebar to highlight more than one file — or use the slash with a regex string for more control — then enter the info panel, differing tag info will disappear, and matching tag info will remain in the display.

Edit anything you like down there, and the information is held for all the files that are selected. Tags marked with an asterisk need saving. Write the files all out again, and you have multi-tag editing, in a nutshell. πŸ˜€

From there it becomes a quick matter to mass-correct or mass-fill music tags, correct dates or misspellings, or just about anything you could want to do.

There are a couple of things I’d like stag to do, and hakerdefo mentioned one or two of these as well:

  • Mass-erase specific fields, or even erase an entire tag, down to nothing. Sometimes that’s necessary. πŸ™„
  • Read tags from filenames and apply them as tag data. Some CLI tools will do this, and it doesn’t seem like a huge task.
  • Read tag data and apply it as filenames. Again, some CLI tools can do this, so it can’t be too preposterous.
  • An acknowledgment that files have been written to disk. As it is the cursor jiggles over a little, but no other visual cue that your changes have been applied.
  • Offer some sort controls over the file panel. If you were to open a giant folder of mixed files, you’d never find what you were looking for. Similarly, I have a tendency to look for particular things in order, and it’s weird to see things scattered out of sequence, like they are in that screenshot.
  • Color, and this time it just makes sense to me. You have three panels with a selection bar that bounces between all three. Adding color to each panel would make things easier to spot, and make the selection bar stand out dramatically.

I’m very pleased with stag, mostly because I think it has the potential to fill the gap at the Linux console for a proper, fullscreen tag editor application. It has a little way to go before it stands up to something like EasyTag, but I sense the Force is strong with this one. πŸ˜‰

dhex: A hex editor with a diff … erence

Is it time for a hex editor? It’s time for a hex editor. Of course, the last hex editor we looked at was quite impressive. It’s going to take some serious advances in the art of hex editing to impress us. Or at least a lot more color.


Holy schmoly! Is that a hex editor, or a gene sequencer?! Is that a hex editor, or a military-grade electromagnetic noise generator?! Is that a hex editor, or a cryptographic cracker for infiltrating alien spaceship defenses?!

It’s none of those things — it’s dhex, a hex editor that adds a diff mode so you can compare more than one file at a time, or variations on the same file. And look at all that wonderful color. I am in heaven.

And going by the list of good things that were present in hexcurse, dhex has also hit it out of the park: uses the full screen, lots of color, neatly divided and arranged, labeled function key legend, and so forth.

But as you can see above, dhex adds its own categories that some (most?) other hex editors haven’t quite approached yet. Themes. Custom key configuration. Split-screen diff mode. Color-coded comparison between files. And perhaps even wilder, synchronized vertical and horizontal panning. Ooh-la-la! πŸ˜€

So the next time you need a brain massage, I recommend firing up dhex with two similar files, and gently scrolling left and right, and up and down. Guaranteed stress reliever. You’ll feel at least as good as a dog getting its belly scratched.

Eye therapy aside, dhex seems like one of your better options for hex editing, and since it’s kind enough to build a configuration for you the first time you run it, I have absolutely nothing to complain about.

Of course that means the next hex editor we stumble across is really going have a difficult time. dhex will be a hard act to follow. … 😐

ncmpcpp: Once more, for the tag editor

It’s been roughly two years since I took a look at ncmpcpp, and I’ve promised more than once since then to take another gander at it.

Not because it has changed that much — in fact, after a quick glance, it seems not much has changed at all. This time though, I promised I’d take a spin past the tag editor.

2014-11-04-6m47421-ncmpcpp-01 2014-11-04-6m47421-ncmpcpp-02

Of course, this comes in the wake of finding cursetag, which was almost a viable tag editor when last I tried it. It has its share of small eccentricities, but could probably step in (and actually has, if I must be honest) for EasyTag when I need to do some tag editing.

ncmpcpp has a good grip on the task too though, and I can see where this would be very useful in managing trees of files that need correction. Folders are listed along the left, categories listed down the center and their contents shown on the right. Use arrow keys to navigate, plus the enter key to select certain options or filters, like capitalization tools.

Select a field’s contents at the right, and you’ll get an editing tool across the bottom of the screen. Update, enter, repeat an save. There may be more commands available, but those seem to be the major ones. Navigate away from that folder, and ncmpcpp will remind you that you need to save your changes.

I like the arrangement; it’s a good step away from some other tools, and adds in the direct ability to edit the filename. I also like that you can reset your changes, if you realize you’ve gone and ruined things.

Two things that seem to be missing, from my perspective: First, I don’t seem to be able to mass-set tags, although it’s possible that I’m overlooking it. I can select multiple files with the spacebar, but if I press enter to edit the field, it only changes the highlighted entry. Perhaps I have overlooked it?

And comparatively, what ncmpcpp’s tag editor lacks when compared to EasyTag or some other graphical tagging tools, is a way to mass-set tags that are read from the filename, or vice-versa. Those two features are unfortunately, what keep me installing the huge bulk of GTK3-based EasyTag, which is rather daunting for my decade-old Pentium 4.

Second, and this is partly my fault, but I’m coming up suspiciously empty-handed when it comes to instructions, tutorials or howtos for working the tag editor. I’ve seen the man page, and I inferred most of the major commands. But … isn’t there a blog (gasp) or something out there that explains in better detail than what I’ve cobbled together here? Is there no extended documentation on the web site?

I’m terrifically surprised if there isn’t. But Google couldn’t find me one, even with “ncmpcpp tag editor” as a start.

All told, I like this feature, and if I could make a request, it would be to have some talented coder split that entire business out of ncmpcpp, and make it a standalone application. Given that most id3 tag tools are really just mass-set utilities, and given that the only other competition is cursetag as a proper full-screen id3 tag editor, you have the potential to make a name for yourself.

Because ultimately as it stands, I’m a moc fan, and I’m unlikely to keep both ncmpcpp and mpd installed and configured, just to take advantage of the tag editor function. It’s something I could use, but not so frequently that it would warrant keeping on my machine for roughly a 20 minutes out of an entire month. Carve this out and make it stand on its own, and I’m on board.

No matter: This is a worthy addition, if you already use mpd or ncmpcpp or both, and given ncmpcpp’s other masterful features (like the vertical lines!), it wins big points from K.Mandla. πŸ˜‰

hexcurse: So many things done right

Is it time for another hex editor? It’s time for another hex editor. Here’s hexcurse, which by most accounts does everything right.


Let’s see if I can get a list going here:

  • Framed panels on the left and right
  • One key (TAB) switches between hex and ASCII panels
  • Corresponding cursor position is displayed in color in opposite panel
  • Scroll bar shows position in the file
  • Takes advantage of full screen dimensions
  • Allows you to resize the panel output to a specific width
  • On-screen F-key legend with corresponding CTRL key sequences
  • Pop-up help page
  • Warning to save changes on exit
  • Display options for decimal addresses and EBCDIC display

And a few more smaller options. And no, I swear I did not coach the hexcurse developers on how to make a great text-based program. But it is very, very well done.

What more could I tell you about a program that does so many things right? I could give you my standard disclaimer about never really needing hex editors, but you know that already.

I can find only one fault in hexcurse, and it’s rather nitpicky: If you ask for a specific width for the panel output, the function key reminders at the bottom of the screen still span the entire width. I’m not sure when that would be useful, so it seems like an oversight to me.

But hexcurse is doing quite well if that’s the only thing I can find wrong with it. Plain and simple, this as an example of a text-based tool with an excellent interface. Up-and-coming text-based software developers, take heed: hexcurse does it right.

slap: Intuitive and colorful

I got a note a little less than a month ago from pouet, pointing out a text editor called slap. pouet said I might like it, if I wasn’t fond of bizarre double-control-key command sequences or arcane letter combinations for controls.


It certainly grabs your eye. And considering its default keystrokes are enough to get me working without traumatic tutorials or A3-sized posters of cryptic letter combinations, it has already won points from me.

slap (I’m not sure about the evolution of the name) also does me the favor of having a simple file browser on the left side of the screen, and the open file command (CTRL+O by default, hallelujah) jumps the cursor across the divider bar and allows me to select.

That I really like. I tried NERD Tree as an extension to vim once, a long time ago, but it wasn’t nearly as fluid and obvious as slap’s simple browser.

slap also does some fundamental syntax highlighting, has customizable behavior via a .slaprc file, and will give you a pop-up help screen if you need it. Most of the keypresses you probably know already though — even things like “jump to the end of the document” are present as CTRL+End, and “select back one letter” as SHIFT+Left Arrow.

Best of all, highlight something and start typing, and slap eats up whatever you highlighted, and begins your new text exactly where you left it. Just like a real word processor. πŸ˜‰

I understand from the home page that mouse support is also a big feature, although I don’t know if I would use it much. I keep to the keyboard when I can.

The only thing I can think of to “complain” about is that the file selector might be a little cumbersome if you have to work through trees of documents. I looked, but I don’t see a way to bring up a path entry dialogue, or some other vehicle for typing out “/usr/share/kbd/keymaps/i386/qwerty/”, other than browsing up and down through the dozen directories. That’s a fairly minor complaint though. slap is good stuff, and definitely has a grip on decent editor behavior.

So the next time you curse vim because you can’t figure out how to delete from the current position to the end of the next occurrence of the “n” character (d then slash then n, by the way), or can’t figure out how to get out of emacs (CTRL+X or something … I forget), remember slap, and the other thousand-plus text editors that don’t need to brainwash you to get the job done. πŸ˜‰

P.S.: Not in Arch or Debian. I installed it by installing nodejs in Arch, and then using sudo npm -g slap … just so you know. πŸ˜‰