Skip to content

Instantly share code, notes, and snippets.

@mlabrkic
Last active April 11, 2022 08:19
Show Gist options
  • Save mlabrkic/3f2e7e9c11b8a6cb8ad87fe61f8159f0 to your computer and use it in GitHub Desktop.
Save mlabrkic/3f2e7e9c11b8a6cb8ad87fe61f8159f0 to your computer and use it in GitHub Desktop.
"Multi Commander" script: Run Neovim (+ MultiScript info to get started), http://multicommander.com/
"Multi Commander"
http://multicommander.com
File manager / OS: Windows 10
Multi Commander is a multi-tabbed file manager and is an alternative to the standard Windows "File Explorer".
It uses the very popular and efficient dual-panel layout.
Note: "File Explorer", previously known as "Windows Explorer", is a file manager application
that is included with releases of the Microsoft Windows operating system from Windows 95 onwards.
------------------------------------------------------------
(from the past):
MS-DOS: Norton Commander
https://en.wikipedia.org/wiki/Norton_Commander
------------------------------
https://midnight-commander.org/
https://github.com/MidnightCommander/mc.git
Midnight Commander for Unix-like systems including macOS and Windows
It was started by Miguel de Icaza in 1994[1] as a clone of the then-popular Norton Commander.
------------------------------------------------------------
Installing:
http://multicommander.com/downloads
Download and use Multi Commander free of charge.
MultiCommander_x64_Portable.zip
-->
C:\UTILS\MultiCommander\MultiCommander.exe
------------------------------------------------------------
SETTINGS:
Open "File Explorer" (Win-E):
press the Windows logo key + E on your keyboard
C:\UTILS\MultiCommander\MultiCommander.exe
Right Click on file, chose
"Pin to taskbar"
Move icon to first place!
If you want to start "Multi Commander" you need to press:
Win-1 (because it is the first application)
------------------------------
My Windows taskbar settings:
Win-1 (Multi Commander)
Win-2 (Neovim)
Win-3 (web browser)
...
------------------------------------------------------------
http://multicommander.com/support
1) This first!
http://multicommander.com/FAQ
2)
http://multicommander.com/docs/
"Search the Online Documentation" (it is better than pdf)
3)
If you want faster response, visit the online support forum first:
http://forum.multicommander.com/forum
------------------------------------------------------------
Scripting
Then this first!
http://multicommander.com/FAQ/Scripting/LaunchFileInsideFolder
"Multi Commander"
Configuration (ALT-C):
ALT-C, u (User Defined Commands)
ALT-C, k (Keyboard customization)
Module: User Defined Commands
------------------------------------------------------------
User Defined Commands - MultiScript
MultiScript commands are the most advanced type of User Defined Commands
that can be created in Multi Commander.
User Defined Commands - MultiScript:
http://multicommander.com/docs/UDC_multiscript
MultiScript Language Syntax:
http://multicommander.com/docs/multiscript/languagesyntax
Docs:
http://multicommander.com/docs/multiscript/functions/misc
http://multicommander.com/docs/multiscript/functions/filesystem
http://multicommander.com/docs/multiscript/functions/string
http://multicommander.com/docs/multiscript/functions/array
http://multicommander.com/docs/multiscript/functions/getfilefromview
Scripts (examples of scripts):
Multi Commander Support Forum »Multi Commander »Script
Discuss Multi Commander Scripting and Exchange script, and tips
http://forum.multicommander.com/forum/index.php/board,7.0.html
------------------------------------------------------------
Escape Sequence, Special Path Operator:
http://multicommander.com/docs/multiscript/languagesyntax
------------------------------
http://forum.multicommander.com/forum/index.php/topic,1694.0.html
$args += ' "' + $a + '"';
Is would also be possible to write " \"" but using ' instead is easier,
becuse you do not have to escape the "
------------------------------
http://forum.multicommander.com/forum/index.php/topic,2218.0.html
If you not really sure if you have the slash that separate the folder and name there or not..
you can use the "path append" operator ^
//instead of
@var $link = $linkpath + $linkname;
//you can use
@var $link = $linkpath ^ $linkname;
^ Will check if any of the side have a \ or / if not, then it will add a \
------------------------------
http://forum.multicommander.com/forum/index.php/topic,2079.0.html
Create folder and move selected files
// Ask user for folder name
@var $answer = AskText("Type name of the new folder to create and move selected files.", "New folder", 0);
############################################################
Command Type: Multi-Script
------------------------------
No_ 0):
CMD_prompt
@var $selectedFile = GetSelectedPaths();
@var $fileDir = PathGetPathPart($selectedFile, 1);
@var $app = "cmd.exe";
MC.Run CMD={$app} STARTIN={$fileDir}
------------------------------
My scripts:
------------------------------
No_ 1):
CMD_prompt_alias, F9
@var $selectedFile = GetSelectedPaths();
@var $fileDir = PathGetPathPart($selectedFile, 1);
@var $alias_doskey = "/k C:\\UTILS\\BATCH\\alias_doskey.bat & dir /B";
@var $app = "cmd.exe";
MC.Run CMD={$app} ARG={$alias_doskey} STARTIN={$fileDir}
------------------------------
No_ 2):
Neovim, F10
@var $selectedFile = GetSelectedPaths();
@var $fileDir = PathGetPathPart($selectedFile, 1);
@var $app = "C:\\UTILS\\Neovim\\bin\\nvim-qt.exe";
MC.Run CMD={$app} ARG={$selectedFile} STARTIN={$fileDir}
------------------------------
No_ 3):
Neovim-temp, Shift-F10
http://forum.multicommander.com/forum/index.php/topic,4094.0.html
@var $selectedFile = GetSelectedPaths();
@var $fileDir = PathGetPathPart($selectedFile, 1);
@var $env = TranslateEnvString("%USERPROFILE%");
@var $app = "C:\\UTILS\\Neovim\\bin\\nvim-qt.exe --";
@var $init_lua = " -u " + $env ^ "\\AppData\\Local\\nvim\\init.lua -- ";
MC.Run CMD={$app} ARG={$init_lua}{$selectedFile} STARTIN={$fileDir}
------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment