File system operation plugins?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
CCRDude
Junior Member
Junior Member
Posts: 26
Joined: 2007-10-01, 10:51 UTC

File system operation plugins?

Post by *CCRDude »

I'm regularly working with code repositories, mostly Git and Bzr, some Svn.

Renaming files is part of my refactoring attempts to make my code better.

I can do this quickly by having F2 mapped to cm_RenameSingleFile, but then, all history of a file would be lost within a repository.

So I've set up Ctrl+F2 to use a user command:

Code: Select all

[em_gitrename]
button=c:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe,16
cmd=c:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
param=/command:rename /path:"%P\%N"
Which works quite fine right now, but has the downside that I would need a separate user command and shortcut for Bzr and possibly Svn.

My current workaround idea is to write a small tool called by a user command that detects whether the current folder is within a repository (check if in some folder going back to the root, there is a .git/.bzr/.svn folder), and if so, of which type, so I would simply use F2 and the logic would be depending on the location.

It would be even better though if there would be a plugin type where I could simply "overwrite" standard operations - e.g. for file renaming, act either with own code or call the original function. That would probably make it possible to do the above for more than one file at a time :)

Or is there some kind of hooking option already available that I'm simply missing?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

No, there is no such feature, you can't override standard file operations in regular folders.
Post Reply