id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4588	Improved Keymap for MC: Convenience for Vim Users	krekhov	zaytsev	"Hi, I really like '''mc''' and '''vim''', but I don't like the hotkeys in '''mc''' (like many '''vim''' users):
''/etc/mc/mc.default.keymap
/etc/mc/mc.emacs.keymap''
I think they are inconvenient and have some ugly hotkeys, for example:
{{{
SplitMore = alt-shift-right
SplitLess = alt-shift-left
}}}
{{{
CdChild = ctrl-pgdn
CdParent = ctrl-pgup
}}}
{{{
History = alt-shift-h
}}}
{{{
HistoryPrev = ...; ctrl-down
HistoryNext = ...; ctrl-up
}}}
{{{
PageUp = ...; alt-v
PageDown = ...; ctrl-v
}}}
etc.

I wrote '''mc.vim.keymap''' file, which may be interesting and convenient for vim users (simplified some hotkeys and added more convenient hotkeys - this opens up a new experience for mc user).

I suggest adding this to the upstream, do you think it will be useful ? I tested this patch, hotkeys work, very convenient. Users can use it like this:
{{{
$ mc --keymap=/etc/mc/mc.vim.keymap
}}}

or directly add this command to your '''~/.bashrc''':
{{{
alias mc='mc --keymap=/etc/mc/mc.vim.keymap'
}}}

or:
{{{
export MC_KEYMAP=/etc/mc/mc.vim.keymap
}}}

or any other method described in mc -> F1 -> contents -> Keys -> Redefine hotkey bindings

I know that Linux has a tool called '''vifm''', I was thinking of using it, but I noticed that '''mc''' is much more powerful (which is cool!).

You can see the new changes in the '''diff-mc.default.keymap-mc.vim.keymap.txt''' file.

I tested '''mc.vim.keymap''' with this version:
GNU Midnight Commander 4.8.29
Built with GLib 2.74.5
Built with S-Lang 2.3.3 with terminfo database
Built with libssh2 1.10.0
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;"	enhancement	closed	minor	4.8.33	mc-key-bindings	master	fixed					merged	committed-master
