module VER minor_mode :help do handler Methods::Help map :describe_key, 'k' end minor_mode :open do handler Methods::Open map :file_open_popup, '' handler Methods::Control map [:ex, :fuzzy], '', 'o' end minor_mode :save do map :save, '' map :save_as, '' end minor_mode :preview do map :eval_buffer, '' map :tags_tooltip, 't' handler Methods::Preview map :preview, '' end minor_mode :basic do inherits :help, :preview, :save handler Methods::Basic map :minibuf_eval, '', 'x' map :open_terminal, '' map :open_console, '' if defined?(::EM) end minor_mode :vim_layout do # map :quit!, ':q!' map :quit, 'q', '', ':q' map :close, 'c', ':clo' # map :close!, ':clo!' handler :window map :split_horizontal, 's', '', ':sh' map :split_vertical, 'v', '', ':sv' map :new_horizontal, 'n', '', ':n' map :only, 'o', '', ':on' map :go_below, 'j', '', '' map :go_above, 'k', '', '' map :go_left, 'h', '', '', '' map :go_right, 'l', '', '' end minor_mode :layout do inherits :basic handler Methods::Layout map :hide, '' map :create, 'c' map :close, 'w' map :peer, 'p' end minor_mode :layout_control do become :layout, 'r' handler Methods::Layout map :change, ['', :layout] end minor_mode :move do inherits :prefix map :ask_go_line, *(':'..':') handler Methods::Move map :prefix_arg_sol, '' map :percent, '%' handler :at_insert map :last_char, '$', '' map :first_line, 'gg' map :last_line, 'G' map :next_char, 'l', '', '' map :next_chunk, 'W' map :next_chunk_end, 'E' map :next_line, 'j', '', '', '' map :next_line_nonblank, '+', '', '' map :next_page, '', '' map :next_word, 'w' map :next_word_end, 'e' map :prev_char, 'h', '', '' map :prev_chunk, 'B' map :prev_line, 'k', '', '' map :prev_page, '', '' map :prev_word, 'b' map :start_of_line, '' # 0 map :home_of_line, '^' map :go_char, '|' map :down_nonblank, '_' map :prev_line_nonblank, '-' end minor_mode :prefix do # Sometimes Range really surprises me... map :update_prefix_arg, *(''..'') end minor_mode :search do handler Methods::Search map :char_left, 'F' map :till_char_left, 'T' map :char_right, 'f' map :till_char_right, 't' map :next, 'n' map :next_word_under_cursor, '*' map :prev, 'N' map :prev_word_under_cursor, '#' map :remove, 'g/' map :status_next, '/' map :status_prev, '?' map :again_char, ';' map :again_char_opposite, ',,' # ',' is used as prefix for ',c' ',u' end minor_mode :ctags do handler Methods::CTags map :find_current, '' # C-] map :prev, '' # C-[ end minor_mode :bookmark do handler Methods::Bookmark map :add_char, 'm' map :visit_char, '`' # vim also has quoteright to jump to the start of the line, but who # needs that *_* end minor_mode :complete do handler Methods::Completion map :aspell, '' map :contextual, '' map :file, '' map :line, '' map :snippet, '' map :word, '' map :smart_tab, '' end minor_mode :delete do handler :at_insert map :change_next_word_end, 'cw' map :change_line, 'cc', 'S' map :change, 's' map :changing, ['c', :move] map :kill_line, 'dd' map :killing, ['d', :move] map [:changing, :last_char], 'C' map [:killing, :last_char], 'D' map [:killing, :next_char], 'x', '' map [:killing, :prev_char], 'X' end minor_mode :clipboard do handler :at_insert map :copy_line, 'yy','Y' map :copying, ['y', :move] handler Methods::Clipboard map :paste_after, 'p' map :paste_before, 'P' map :paste_after_adjust, ']p' map :paste_before_adjust, '[p' map :paste_after_go_after, 'gp' map :paste_before_go_after, 'gP' end minor_mode :undo do handler Methods::Undo map :redo, '' map :undo, 'u' end minor_mode :macro do inherits :control become :control, 'q' handler Methods::Macro enter :enter leave :leave end minor_mode :control do inherits :basic, :move, :delete, :undo, :layout_control, :search, :ctags, :bookmark, :clipboard, :open become :insert, 'i', '' become :replace, 'R' become :replace_char, 'r' become :select_block, '' become :select_char, 'v' become :select_line, 'V' become :control, '' become :macro, *('a'..'z').map{|c| "q#{c}" } handler Methods::Macro map :repeat, '@@' ('a'..'z').each{|c| map [:play, c], "@#{c}" } handler nil # whatever the widget happens to be map :repeat_action, '.' map :quit, ':qa', 'ZZ' map :close, ':q', ':x' map [:touch!, '1.0', 'end'], '' map :save, ':w' map :save_as, ':w' map :save_all, ':wa' map :change_register, '"' handler RegisterList map :open, ':reg' map :show, ':reg' handler Methods::Open map :file_open_ask, ':o' handler :at_insert map :insert_newline_above, 'O' map :insert_newline_below, 'o' map :increase_number, '' map :decrease_number, '' map :toggle_case!, '~' map :toggle_casing, ['g~', :move] map :lower_casing, ['gu', :move] map :upper_casing, ['gU', :move] map :encoding_rot13, ['g?', :move] map [:change_at, :last_char], 'A' map [:change_at, :next_char], 'a' map [:change_at, :home_of_line], 'I' map [:change_at, :start_of_line], 'gI' handler Methods::Control enter :enter leave :leave map :chdir, 'gc' handler Methods::Control map :cursor_horizontal_center, 'gm' map :cursor_vertical_bottom, 'zb' map :cursor_vertical_bottom_sol, 'z-' map :cursor_vertical_center, 'zz' map :cursor_vertical_center_sol, 'z.' map :cursor_vertical_top, 'zt' map :cursor_vertical_top_sol, 'z' map :executor, '::' map [:ex, :buffer], ':bu', '', 'b' map [:ex, :edit], ':e' map [:ex, :encoding], ':en' map [:ex, :fuzzy], ':f' map [:ex, :grep], ':g' map [:ex, :grep_buffers], ':G' map [:ex, :locate], ':l' map [:ex, :method], ':m' map [:ex, :open], ':o' map [:ex, :syntax], ':s' map [:ex, :theme], ':t' # map [:ex, :write], ':w' map :wrap_line, 'gw' map :indent_line, '>' map :unindent_line, '<' map :join_forward, 'J' map :join_forward_nospace, 'gJ' map :open_file_under_cursor, 'gf' map :smart_evaluate, '', 'e' handler Methods::SearchAndReplace map :query, '' end minor_mode :readline do map :accept_line, '' map :last_char, '', '' map :insert_selection, '' map :insert_tab, '', '' map :kill_last_char, '' map :delete_next_char, '', '' map :delete_next_word, '' map :delete_prev_char, '' map :delete_prev_word, '' map :next_char, '', '' map :next_word, '', '' map :prev_char, '', '' map :prev_word, '', '' map :start_of_line, '', '' map :transpose_chars, '' map :paste, '' missing :insert_string end minor_mode :insert do inherits :basic, :layout_control, :complete become :control, '', '' handler Methods::AutoFill map :auto_fill_space, '' handler :at_insert map :insert_char_above, '' map :insert_char_below, '' map :insert_digraph, '' map :insert_newline, '', '', '' map :insert_selection, '', '' map :insert_tab, '' map :last_char, '' map :next_char, '' map :next_line, '', '' map :next_page, '', '', '' map :next_word, '', '' map :prev_char, '' map :prev_line, '', '' map :prev_page, '', '', '' map :prev_word, '', '' map :start_of_line, '', '' map [:killing, :next_char], '' map [:killing, :prev_char], '', '' map [:killing, :prev_word], '' handler Methods::Control map :smart_evaluate, '' map :temporary, ['', :control] map :indent_line, '' map :unindent_line, '' if x11? map :unindent_line, '' else map :unindent_line, '' end handler Methods::Insert map :literal, '', '' missing :string end minor_mode :replace do become :control, '', '' handler Methods::Insert enter :enter_replace leave :leave_replace map [:replace_string, "\n"], '' missing :replace_string end minor_mode :replace_char do become :control, '', '' handler Methods::Insert map [:replace_char, "\n"], '' missing :replace_char end minor_mode :search_and_replace do become :control, '', '', 'q' handler Methods::SearchAndReplace enter :enter leave :leave map :replace_all, 'a', '' map :replace_once, 'y' map :next, 'n', 's', 'j', '' map :prev, 'k', '' end minor_mode :select do inherits :basic, :move, :search handler nil map :change_register, '"' handler :at_sel map :comment, ',c' map :copy, 'y', 'Y' map :indent, '' map :kill, 'd', 'D', 'x', '', '' map :lower_case!, 'u' map :replace_string, 'c' map :replace_string_eol, 'C' map :toggle_case!, '~' map :upper_case!, 'U' map :uncomment, ',u' map :unindent, '' map :string_operation, '' map :array_operation, '' map :line_operation, '' map :encode_rot13!, 'g?' map [:join, ' '], 'J' map [:join, ''], 'gJ' map :change_linestart, 'I' map :change_lineend, 'A' handler Methods::Control map :smart_evaluate, '', '' handler Methods::Selection map :pipe, '' end minor_mode :select_char do inherits :select become :control, '', '' become :select_line, 'V' become :select_block, '' become :select_replace_char, 'r' handler :at_sel enter :enter leave :leave map :wrap, 'gw' map :change, 'c', 's' end minor_mode :select_line do inherits :select become :control, '', '' become :select_char, 'v' become :select_block, '' become :select_replace_char, 'r' handler :at_sel enter :enter leave :leave map :wrap, 'gw' map :change, 'c', 's' end minor_mode :select_block do inherits :select become :control, '', '' become :select_char, 'v' become :select_line, 'V' become :select_replace_char, 'r' handler :at_sel enter :enter leave :leave end minor_mode :select_replace_char do become :control, '', '' handler :at_sel map [:replace_char, "\n"], '' missing :replace_char end major_mode :HoverCompletion do inherits :basic map :cancel, '', '' map :continue_completion, '', 'l' map :go_down, '', 'j' map :go_up, '', 'k' map :submit, '' end minor_mode :snippet do inherits :readline handler Methods::Snippet map :cancel, '', '' map :jump, '' missing :on_insert end major_mode :Fundamental do use :control end major_mode :MiniBuffer do use :readline map :abort, '', '' map :attempt, '' map :complete_large, '' map :complete_small, '' map :next_history, '' map :prev_history, '' end major_mode :Completions do handler MiniBuffer # map :answer_from, '' end major_mode :Executor do use :executor_label end minor_mode :executor_entry do inherits :readline map :completion, '' map :cancel, '' map :next_line, '', '', '' map :prev_line, '', '', '' end minor_mode :executor_label do inherits :executor_entry map :speed_selection, '' missing :insert_string end end