I have this shortcut in my vimrc:
map cmt :!start TortoiseProc.exe /command:commit /path:"%" /closeonend:3 <CR>
What this does is whenever I press 'cmt', vim will open the commit dialog for the file I'm currently editing with vim.
What I'd like to do is write this command in such a way that if I put a number in front of it, it will open the commit dialog for the n-th level directory.
Example to make things clearer:
Let's say I have this file structure project/logs/access.log
.
If I'm editing access.log
and
- press 'cmt' - I should get the dialog for committing
access.log
; - press '1cmt' - I should get the dialog for committing the
logs
directory; - press '2cmt' - I should get the dialog for committing the
project
directory;
... and so on.
Note: I'm using gvim on Windows 7
Hopefully someone can help me with this. Thanks.