Well, when you enter you can automatically switch to the git view mode, so any sub dirs you enter will have to that view as well - only when you leave a source folder (level above) you would have to change it - you can assign an easy shortcut to the default view e.g. F1 or something -
Or put all your sources on a virtual folder/drive e.g. s:\ - you can use a tool such as XSubst ( see https://www.ghisler.com/tools.htm#other ) or do it yourself https://winaero.com/create-virtual-drive-from-a-folder-in-windows-10/ - now you can use "L: with drive letter" as rule)
Edit: statement was incorrect, "path" might be better, see below
Plugin - Git Commander - Git and total commander!
Moderators: Hacker, petermad, Stefan2, white
Re: Plugin - Git Commander - Git and total commander!
Last edited by hi5 on 2021-06-27, 07:50 UTC, edited 1 time in total.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Plugin - Git Commander - Git and total commander!
2jmwap
2hi5
Something like this should do it for both top level and subfolders: https://madsenworld.dk/tcmd/gitview.pngthat would work, but now that I think of it, only for the git top level folder.
2hi5
That is not true if the rule is based on filenames and not on directory nameso any sub dirs you enter will have to that view as well
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Plugin - Git Commander - Git and total commander!
You're correct, I hadn't tried it but was thinking about "Autorun commands" so you could use the "|cm_SrcViewMode??" and keep the view set.petermad wrote: 2021-06-26, 15:32 UTCThat is not true if the rule is based on filenames and not on directory nameso any sub dirs you enter will have to that view as well
I don't think your solution does the trick either. The folder structure for .git is like this
so when I enter the "F4MiniMenu\lib\" sub-folder of my source folder it no longer matches a criteria. (no .git* files and no .git in path)F4MiniMenu\.git
F4MiniMenu\lib\
F4MiniMenu\res\
F4MiniMenu\F4MiniMenu.ahk
F4MiniMenu\changelog.md
F4MiniMenu\.gitignore
F4MiniMenu\.gitattributes
.git is a folder you simply don't "go to" as there is little to do there (and it doesn't hold any git commit data for the files and folders in .git so the view columns would be empty as far as I know)
So the solution would be:
* move all sources on a separate (virtual) drive - see above, or:
* all sources must be moved to a subfolder e.g. c:\MySources\source1, c:\MySources\source2 etc so you can use use *\MySources\* as a filter and it should work (if all sources have a common "part" in their path already that can be used as well of course eg. "-src" as in c:\data\proj-src\ and z:\newproject\work-src)
So as usual, the simple solution might be best

F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Plugin - Git Commander - Git and total commander!
2hi5
Sure, if the folder structure for git it like you describe, my solution will not work for other subfolders than the .git folder.
Sure, if the folder structure for git it like you describe, my solution will not work for other subfolders than the .git folder.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Plugin - Git Commander - Git and total commander!
petermad wrote: 2021-06-26, 15:32 UTC 2jmwapSomething like this should do it for both top level and subfolders: https://madsenworld.dk/tcmd/gitview.pngthat would work, but now that I think of it, only for the git top level folder.
2hi5That is not true if the rule is based on filenames and not on directory nameso any sub dirs you enter will have to that view as well
thanks petermad.
That works when entering the top level one (one that has .git), but if I enter directly one below that (from instance from the history etc, without going through top level git dir first), it does not work for me.
I have a bunch of different soure directories, so mapping something to a letter etc does not work, I want to create an automatic way to move to git view whenever I am inside (or below) a git repo, and to the normal view otherwise (so I need a rule that moves me to the normal view, one that is run any other time than the git one, and with fewer priority, do we have the concept of 'priority'? or does a rule being lower do that already?)
Re: Plugin - Git Commander - Git and total commander!
I realize thta, see above, my solution only works if you go into the .git subfolder, but not into other folders. You would need a rule for each of those other folders.That works when entering the top level one (one that has .git), but if I enter directly one below that (from instance from the history etc, without going through top level git dir first), it does not work for me.
The only way is to put all your folders with git stuff in a common base folder (like c:\mygit\ ), and then make a rule for that base folder ( *\mygit\* in the Directory field).
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar