dcvim icon indicating copy to clipboard operation
dcvim copied to clipboard

DC built-in commands update

Open JonnyTech opened this issue 5 years ago • 9 comments

Maybe this will help simplify the plugin:

https://doublecmd.sourceforge.io/forum/viewtopic.php?p=29538#p29538

Added cm_GoToNextEntry, cm_GoToPrevEntry commands.

Commit r9291

JonnyTech avatar Mar 11 '20 23:03 JonnyTech

Thanks for pointing out. It seems that these new functions are currently available in DC nightly build only, and I couldn't install it on my Ubuntu 19.10 (broken dependencies). Since I am not using DC any more, I am not going to fix it right now, but if someone notifies me when these functions become available in DC stable release, I might update the dcvim code.

Galicarnax avatar Mar 24 '20 09:03 Galicarnax

Out of interest, what are you using to replace DC?

JonnyTech avatar Mar 24 '20 11:03 JonnyTech

Currently I am using ranger, but will probably switch to nnn (or use both). I still think doublecmd is a nice choice if you have to work with several platforms (like with MS Windows and Linux). But recently I had switched to Linux completely, so I decided to use smth more natural in this environment (e.g., that might be used remotely). In fact, with bash/zsh scripting and some command-line utilities (like fzf) I find myself less and less in a need for a file manager at all.

Galicarnax avatar Mar 24 '20 13:03 Galicarnax

Nice. Thanks for the recommendations.

JonnyTech avatar Mar 24 '20 13:03 JonnyTech

Thanks for pointing out. It seems that these new functions are currently available in DC nightly build only, and I couldn't install it on my Ubuntu 19.10 (broken dependencies). Since I am not using DC any more, I am not going to fix it right now, but if someone notifies me when these functions become available in DC stable release, I might update the dcvim code.

image

@Galicarnax Since I know you no longer use DC, I haven't had the heart to ask for it, but I can't really find a replacement for dcvim, so I'm asking if you'll update dcvim when you have time?

photkey avatar Apr 02 '22 08:04 photkey

I've added these new commands for j/k and few other navigations. Check the new branch: https://github.com/Galicarnax/dcvim/tree/native_navigation

(key emulation is still requred for other actions like navigating by page up/down, as I found no corresponding built-in commands in DC).

Galicarnax avatar Apr 03 '22 05:04 Galicarnax

I've added these new commands for j/k and few other navigations. Check the new branch: https://github.com/Galicarnax/dcvim/tree/native_navigation

(key emulation is still requred for other actions like navigating by page up/down, as I found no corresponding built-in commands in DC).

Thank you so much for all your help! If DC supports the new command, would it be possible to add it in like below, without keystroke emulation?

    elseif key == "j" then
        DC.ExecuteCommand("cm_GoToNextEntry")

photkey avatar Apr 03 '22 05:04 photkey

Sure. Just be sure to make it in the appropriate "mode" section. E.g., nvaigating by page is done with double keys, e.g. gj for page down, so you'll need to add a command for the "j"-key in the code section corresponding to the "g"-mode. Of course, ideally, the actual keys should not be hard-written in the plugin. If someone will take over, it is possible to make a separate config with key maps, and use only map values in the plugin, so that a user could customize key binding to his/her wishes.

Galicarnax avatar Apr 03 '22 05:04 Galicarnax

Thanks, I understand. unfortunately I can't write plugins, dcvim is already the ideal one I found, thanks for your outstanding contribution.

photkey avatar Apr 03 '22 05:04 photkey