Closed kristijanhusak closed 6 years ago
No, that is pretty much the antithesis of the plugin :)
Did you try x
, :Shdo
, Z!
etc.?
Yeah, of course i did, and i used it until now, but i think it requires much more effort than it should. Ok, i guess i'll create it only for myself, or as a separate plugin. Thanks.
Most of the work in renaming/moving a file(s) is typing the new name. And for bulk operations, nerdtree/netrw are basically useless.
Creating a new folder/file is actually less work in dirvish than nerdtree or netrw:
:Dirvish foo
:e %bar
For the bulk actions, i agree completely, but most of the time that's not used. I'm missing few things that do not exist out of the box in vim or sh:
mkdir -p my/sub/path && touch my/sub/path/myfile.txt
Shdo
requires me to write the whole file name.Z!
mapping is really hard to press on English keyboard (shift + z + 1)These are definitely not a big issues, i even consider it nitpicking, but it's still nice to have if someone wants it.
Creating file in non existing nested folder.
I use this autocmd: https://github.com/justinmk/config/blob/91c792a4f75d9200944f8e21863ea03eaee4e3c1/.config/nvim/init.vim#L1180
Then this works automatically, even if foo/bar/
path doesn't exist:
:e foo/bar/baz.txt
:w
Shdo requires me to write the whole file name.
x
prefills the command, and {}
substitutes the filename.
x
:Shdo mv {} {}<CR>
<use normal-mode commands to edit the target name>
Z!
No menus, no wizards, full control.
Or use :Rename
from https://github.com/tpope/vim-eunuch .
Z! mapping is really hard to press on English keyboard
I use US layout, it's quite easy. Hold the right-hand shift key... (and learn to touch-type the number row :)
The mnemonic for Z!
is Vi's ZZ
/ ZQ
commands, which are also much easier to type than :w<CR>
/ :q<cr>
.
Didn't know about that autocmd, really nice.
Yeah that works too. Most of the time i'm not doing anything in the confirmation window.
Were there any other requests like this? I already wrote something that is functional, and i will probably create a separate repo for it. Would you link it in the readme?
Nevermind, i won't create it. Thanks for your help!
Hi, would you be interested in adding a context menu that helps executing most common tasks? Similar to NERDTree menu when you press M. Maybe something like this:
Selection option: Enter: Confirm:
I made a prototype (from screenshots), but i would make a PR with more robust and extendable solution.