use utf8;

'' => {
	desc => "emacs mode",

	'+<' => ["history start", 'co'],
	'+=' => '+?', #TODO: new # emacs, not in v2.0
	'+>' => ["history end", 'co'],
	'^?' => '^h',
	'+?' => ["list complet$sign{_}ion$sign{_}s", 'ci'],
	'^@' => ["set mark", 'mv new'], # not in v2.0

	'+#' => ["prefix comm$sign{_}en$sign{_}t", 'mi new'], # not in v2.0
	'+&' => ["tilde expand", 'mi'],
	'+*' => ["complet$sign{_}e all", 'mi new'], # not in v2.0
	'+.' => ["insert last", 'co'],
	'+~' => '+&', # emacs

	'^[' => ["meta", 'mv'],
	'^+['=> '^i',
	'+\\'=> ["delete whitesp$sign{_}ace", 'mo'],
	'^]' => ["find char", 'pm arg new'], # not in v2.0
	'^+]'=> ["rev find char", 'pm arg new'], # not in v2.0
	'^_' => ["undo", 'co'],
	'+_' => '+.',

	'+~' => ["user$sign{_}name exp$sign{_}and", 'mi ext'], # common emacs => '+&'
	'+!' => ["cmd expand", 'mi ext'],
	'+@' => ["host$sign{_}name exp$sign{_}and", 'mi ext'],
	'+$' => ["variable expand", 'mi ext'],
	'+^' => ["history expand", 'co ext'],
	'+/' => ["filename expand", 'ci ext'],

	'^a' => ["begin of line", 'pm'],
	'^b' => ["char back$sign{_}w$sign{_}ard$sign{_}s", 'pm'],
	'+b' => ["word back$sign{_}w$sign{_}ard$sign{_}s", 'pm'],
	'+c' => ["capital$sign{_}ise word", 'mi'],
	'^d' => ["delete char", 'mo'],
	'+d' => ["delete word rem$sign{_}ain$sign{_}der", 'mo ring'],
#	'^e' => ["emacs mode", 'me'],
	'^e' => ["end of line", 'pm'],
	'^f' => ["char forward", 'pm'],
	'+f' => ["word forward", 'pm'],
	'^g' => ["abort cmd, bell", 'mv'],
	'^+g'=> '^g',
	'^h' => ["back$sign{_}space", 'mo'],
	'^+h'=> ["delete bound word", 'mo ring'], #TODO
	'^i' => ["auto$sign{_}complet$sign{_}e", 'mi', '(tab)'],
	'^+i'=> '^v^i',
	'^j' => '^m',
	'^+j'=> ["vim mode", 'me'], #TODO: mode^+j
	'^k' => ["delete till eol", 'mo ring'],
	'^l' => ["clear screen", 'ci'],
	'+l' => ["lowcase word", 'mi'],
	'^m' => ["enter line", 'co', '(enter)'],
	'^+m'=> '^+j',
	'^n' => ["history next", 'co'],
	'+n' => ["match history", 'co'],
	'^o' => ["enter and next", 'co ext'],
	'^p' => ["history back", 'co'],
	'+p' => ["rev match history", 'co'],
	'^q' => '^v', # Quote
	'^r' => ["reverse history", 'co'],
	'+r' => ["full undo", 'co', 'Revert'],
	'^+r'=> '+r',
	'^s' => ["search history", 'co'],
	'^t' => ["move char forw$sign{_}ard", 'mi', 'Transpose char'],
	'+t' => ["move word forw$sign{_}ard", 'mi', 'Transpose word'],
	'^u' => ["delete till bol", 'mo ring'], # unix
	'+u' => ["upcase word", 'mi'],
	'^v' => ["verbatim char", 'mv'],
	'^w' => ["delete word", 'mo ring'], # unix
	'^x' => ["extend$sign{_}ed", 'me arg mode^x'],
	'^y' => ["yank top", 'co'],
	'+y' => ["rotate yank", 'co ring'],
	'^+y'=> ["yank arg"],
},

'^x' => {
	lead => $ascii ? "'x"  : "x̂",
	desc => 'emacs ctrl-x bindings',

	'('  => ["start macro", 'mv'],
	')'  => ["end macro", 'mv'],
	'e'  => ["run macro", 'mv', 'Execute'],
	'^e' => ["editor", 'mi ext linkvim'],
	'^g' => '^g',
	'^h' => '^u',
	'^r' => ["reload inputrc", 'mv'],
	'^u' => '^_',
	'^x' => ["swap cursor", 'pm new', 'eXchange'], # not in v2.0
	'^v' => ["shell version", 'ci ext'],
	'^?' => '^x^h',
},

