Roamer: A Plain-Text File Manager
github.com
github.com
https://www.gnu.org/software/emacs/manual/html_node/emacs/Wd...
I actually don't tend to use emacs as a file manager for whatever reason. I find shell file utility commands along with sed, awk, xargs to be adequate.
I liked that roamer has a similar idea, the name/hash lines seems very straightforward. Also a bit of acme in it where text as a bit of meaning.
Maybe it will give wdired ideas too.
Emacs also has bindat, a nice DSL to create bytes structures (for network packets or FFI)
And that's just the vanilla distribution.. Anyway lisp.
For many other file-related operations in my terminal I use Midnight Commander.[2]
I've tried emacs' dired-mode, but I didn't see it being particularly useful compared to Midnight Commander without a ton of time spent on configuring it to work the way I like. I might do that sometime, but until then, Midnight Commander already has so many useful features without any of the time commitment or pain of virtually rewriting much of the same functionality in emacs.
$ mv path/to/{orig,dest}.foo
# expands into
$ mv path/to/orig.foo path/to/dest.fooYou could, for instance, rename by regular expressions, easily do block selections and substitutions, use complex macros, etc. The sky is really the limit.
Then there are unlimited undo features of modern editors, and even branching undo histories where you can get back to a state that would be unreachable with linear undos.
Finally, tools like qmv do sanity checking on your renaming plan, so that if you (for example) wind up renaming two files to the same name, it'll warn you and safely let you rename the original files and try again.
As a result of the power and safety these tools provide, I no longer rename directly using my shell's renaming features (like the ones you describe) except for the absolute simplest and foolproof situations. For anything more complex, I use qmv.
I can certainly recognize the power of what you are describing. Perhaps I'll give it a try in the future.
Out of curiosity: what do you find are your most compelling use cases for the tool(s)?
autoload -U zmv # or put this line in your ~/.zshrc
zmv -w 'src/**/*.jade' 'src/$1$2.pug'
You can do a dry run by using the `-n` flag too. for a in **/*.jade; do echo mv "$a" "${a%jade}pug"; done
If I'm not wrong it should work in Bash and Ksh too (bar the double * expansion), this when I don't have an Emacs at hand.In the first invocation I prefer to do a "dry run", if it looks good I proceed removing the echo.
P.S. Your example above should use double quote instead of single quote, otherwise the content is not expanded by Zsh
P.P.S. One recall the pre/post operator looking at the symbols on a US keyboard, the post follows the variable symbol...
I've used zmv to also reorganize the directory structure of files too, something that seems easier to do with its glob/variable replace syntax.
Nice to have a cross platform option for usage in scripts though.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Wd...
Let's say I do:
qmv a.txt
And I get this in qmv: a.txt a.txt
This does not work: a.txt foo/a.txt
I was expecting qmv to create the foo/ directory if it does not exist. Even if it exists, it does not work.Do you know if this works? If it does, how do I do it?
And staunch FAR Commander supporter for Windows. I sometimes call mc from FAR and back and forth (okay, very rarely :))
Long time ago there was PC Tools, and a program called.. yes "File Manager" for DOS - both were single-column, yet very powerful - browsing megabytes of text files effortless on 286 :)
back then, there was a tool that allowed direct directory manipulation - renaming, copying, but nothing like the tool demonstrated. Thank you!
For example, if I need to run one exe, not in my PATH over some file, I have them both in left and right window. I go to the left, type "Ctrl+F" - e.g. get me the full name (in this case executable), then go to the other window, type "Ctrl+F" again - get me the file to become first argument on the executable and run.
Ctrl+O (in midnight commander too), switches to almost fullscreen command-line - so in a way it's always better than just a command-line.
Search in Files, compare dirs, and many other features (there are tons of plugins).
Also checking SMB shares, FTP, System Processes (though I prefer SysInternals ProcExp.exe there)
I use the Windows Explorer (the file manager) only for very few things - certain context menu items, some forms of preview. It's always there by typing "explorer ." from the current folder.
full list of features: https://github.com/FedeDP/ncursesFM/wiki/Getting-Started
just to name a few advanced ones:
* Search support: it will search your string in current directory tree. It can search your string inside archives too.
* Basic print support through libcups.
* Extract/compress files/folders through libarchive.
* Powermanagement inhibition while processing a job (eg: while pasting a file) to avoid data loss.
* Internal udisks2 monitor, to poll for new devices. It can automount new connected devices too. Device monitor will list only mountable devices, eg: dvd reader will not be listed until a cd/dvd is inserted.
* Drives/usb sticks/ISO files (un)mount through udisks2.
* Distro package files installation through packagekit.
https://github.com/trapd00r/vidir
Seems like the main difference compared to Roamer is that it just uses numbered lines instead of hashes.
What happens if I copypaste some random text into the file and press save, by mistake? Are there mechanisms to limit the damage?
Also, when I remove a hash and save, the file is gone permanently, even if I paste it elsewhere, right?
http://dnr.im/tech/articles/mvdir/
(for renaming and deleting only)
Renaming a lot of files is something I do on a regular basis, so this is another piece I can ditch the trackpad for.
try EDITOR="code -w". It'll open a new instance, in the foreground