Opening a Text file from a GUI File Manager

XUbuntu's file manager is Thunar. Thunar's default behaviour if you open a text file by double-clicking on it is to open a terminal with nano editing the file. I don't like nano. I'm also discovering I don't much like Thunar. So I've installed ROX Filer (which is weird enough that I don't generally recommend it to anyone else), and added a "Run Action" (as ROX refers to it) for "*.txt":

xterm +sb -fa 'Droid Sans Mono Slashed for Powerline' -fs 11 -e nvim -p "$@"
  • of all the dozens of text terminals available, xterm is probably both the oldest and the lightest weight. I find it quite usable most of the time, and this time I'm just using it to run an editor so extra functionality isn't called for.
  • +sb - tells xterm to not include a scroll bar
  • -fa - short for "font face," the font we want to use
  • Droid Sans Mono Slashed for Powerline - my preferred font. The best single source for programmer fonts for Linux is the Powerline Fonts repository - with the added advantage that the fonts are already patched for Airline/Powerline (see also my latest entry on Programmer Fonts)
  • -fs - "font size"
  • -e - tells xterm to execute a command
  • nvim - run the Neovim editor
  • -p - open all files in tabs (a matter of personal taste)
  • "$@" - open all the files that were selected in the file manager

Another option, probably more practical for most people, would be to run gvim - but I never install it because vim in an xterm serves my purposes just as well, and often better.