How to run a MarkFar build in Far Manager while it is being developed. A release installs the same way: unpack the zip from GitHub Releases into that folder.
Far 3 loads plugins from two folders, each plugin in its own subfolder
(FarEng.hlf, topic "Plugins"):
Pluginsnext toFar.exe—C:\Program Files\Far Manager\Plugins. Writing there needs administrator rights.Pluginsin the user profile —%APPDATA%\Far Manager\Profile\Plugins. No administrator rights needed.
Development builds go to the second folder:
%APPDATA%\Far Manager\Profile\Plugins\MarkFar\
MarkFar.dll
MarkFarEng.lng MarkFarRus.lng MarkFarLit.lng
MarkFarEng.hlf MarkFarRus.hlf MarkFarLit.hlf
hrc\markfar.hrc
Far 3 has no setting for an extra plugin folder; the -p command-line switch
replaces the plugin folders instead of adding one, so it is not used here.
The build runs under WSL with llvm-mingw (see
002-stack-and-colorer for why not MSVC). Unpack
the Linux x86_64 archive from https://github.com/mstorsjo/llvm-mingw/releases
into ~/.local/opt:
mkdir -p ~/.local/opt && cd ~/.local/opt
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20261006/llvm-mingw-20261006-ucrt-ubuntu-22.04-x86_64.tar.xz
tar -xJf llvm-mingw-20261006-ucrt-ubuntu-22.04-x86_64.tar.xz && rm llvm-mingw-*.tar.xz
build.sh finds it there; putting its bin folder on PATH works as well.
-
Close Far Manager. Far keeps
MarkFar.dllloaded, so a running Far blocks the copy. (Not needed for the very first install.) -
In the repository folder, under WSL, run:
./build.shIt compiles
out/MarkFar/MarkFar.dlland copies theout/MarkFarfolder to%APPDATA%\Far Manager\Profile\Plugins\MarkFar. For a Far that loads plugins from elsewhere (a portable Far), setMARKFAR_DESTto the target folder as a WSL path../build.sh noinstallonly builds. -
Start Far. On the first start after a new or changed plugin, Far finds it and adds it to its plugin cache.
Check: F11 shows "MarkFar" in the plugin menu;
F9 → Options → Plugins configuration lists it.
markfar.hrc colours code blocks in the preview through Colorer (see
002-stack-and-colorer). Point Colorer at it:
F9 → Options → Plugins configuration → FarColorer.- "Custom schemas folder (hrc)":
%APPDATA%\Far Manager\Profile\Plugins\MarkFar\hrcwritten out in full, for exampleC:\Users\<name>\AppData\Roaming\Far Manager\Profile\Plugins\MarkFar\hrc. - Save. Colorer reloads its schemes.
F3 reaches MarkFar through a Far file association
(003-v1-scope):
F9 → Commands → File associations,Insto add.- Mask:
*.md - Command for view (
F3):markfar:!\!.! - Leave the other commands empty.
Delete the association to get the plain viewer back.
Close Far and delete %APPDATA%\Far Manager\Profile\Plugins\MarkFar. Delete
the *.md file association if one was added.