alt + hjkl movement system

This commit is contained in:
Allen Webster 2018-11-27 10:50:39 -08:00
parent c3ef63934f
commit 7406ff78e3
3 changed files with 102 additions and 36 deletions

View File

@ -827,8 +827,8 @@ get_bindings(void *data, int32_t size){
// begin_map to clear everything that was in the map and
// bind new things instead.
begin_map(context, mapid_file);
bind(context, 'k', MDFR_ALT, kill_rect);
bind(context, ' ', MDFR_ALT | MDFR_CTRL, multi_line_edit);
bind(context, key_back, MDFR_ALT|MDFR_CTRL, kill_rect);
bind(context, ' ', MDFR_ALT|MDFR_CTRL, multi_line_edit);
bind(context, key_page_up, MDFR_ALT, miblo_increment_time_stamp);
bind(context, key_page_down, MDFR_ALT, miblo_decrement_time_stamp);

View File

@ -59,6 +59,10 @@ bind(context, key_up, MDFR_SHIFT, move_up);
bind(context, key_down, MDFR_SHIFT, move_down);
bind(context, key_left, MDFR_SHIFT, move_left);
bind(context, key_right, MDFR_SHIFT, move_right);
bind(context, 'k', MDFR_ALT, move_up);
bind(context, 'j', MDFR_ALT, move_down);
bind(context, 'h', MDFR_ALT, move_left);
bind(context, 'l', MDFR_ALT, move_right);
bind(context, key_end, MDFR_NONE, seek_end_of_line);
bind(context, key_home, MDFR_NONE, seek_beginning_of_line);
bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file);
@ -73,14 +77,20 @@ bind(context, key_page_up, MDFR_SHIFT, page_up);
bind(context, key_page_down, MDFR_SHIFT, page_down);
bind(context, key_up, MDFR_CTRL, seek_whitespace_up_end_line);
bind(context, key_down, MDFR_CTRL, seek_whitespace_down_end_line);
bind(context, key_right, MDFR_CTRL, seek_whitespace_right);
bind(context, key_left, MDFR_CTRL, seek_whitespace_left);
bind(context, key_right, MDFR_CTRL, seek_whitespace_right);
bind(context, key_up, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_up_end_line);
bind(context, key_down, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_down_end_line);
bind(context, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
bind(context, key_left, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_left);
bind(context, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
bind(context, 'k', MDFR_CTRL|MDFR_ALT, seek_whitespace_up_end_line);
bind(context, 'j', MDFR_CTRL|MDFR_ALT, seek_whitespace_down_end_line);
bind(context, 'h', MDFR_CTRL|MDFR_ALT, seek_whitespace_left);
bind(context, 'l', MDFR_CTRL|MDFR_ALT, seek_whitespace_right);
bind(context, key_up, MDFR_ALT, move_line_up);
bind(context, key_down, MDFR_ALT, move_line_down);
bind(context, 'K', MDFR_ALT, move_line_up);
bind(context, 'J', MDFR_ALT, move_line_down);
bind(context, key_back, MDFR_CTRL, backspace_word);
bind(context, key_del, MDFR_CTRL, delete_word);
bind(context, key_back, MDFR_ALT, snipe_token_or_word);
@ -135,7 +145,6 @@ bind(context, '#', MDFR_NONE, write_and_auto_tab);
bind(context, '\t', MDFR_NONE, word_complete);
bind(context, '\t', MDFR_CTRL, auto_tab_range);
bind(context, '\t', MDFR_SHIFT, auto_tab_line_at_cursor);
bind(context, 'h', MDFR_ALT, write_hack);
bind(context, 'r', MDFR_ALT, write_block);
bind(context, 't', MDFR_ALT, write_todo);
bind(context, 'y', MDFR_ALT, write_note);
@ -149,7 +158,7 @@ bind(context, ']', MDFR_ALT, select_prev_scope_absolute);
bind(context, '\'', MDFR_ALT, select_next_scope_absolute);
bind(context, '/', MDFR_ALT, place_in_scope);
bind(context, '-', MDFR_ALT, delete_current_scope);
bind(context, 'j', MDFR_ALT, scope_absorb_down);
bind(context, '}', MDFR_ALT, scope_absorb_down);
bind(context, 'i', MDFR_ALT, if0_off);
bind(context, '1', MDFR_ALT, open_file_in_quotes);
bind(context, '2', MDFR_ALT, open_matching_file_cpp);
@ -162,8 +171,10 @@ bind(context, '\n', MDFR_NONE, lister__activate);
bind(context, '\t', MDFR_NONE, lister__activate);
bind(context, key_back, MDFR_NONE, lister__backspace_text_field);
bind(context, key_up, MDFR_NONE, lister__move_up);
bind(context, 'k', MDFR_ALT, lister__move_up);
bind(context, key_page_up, MDFR_NONE, lister__move_up);
bind(context, key_down, MDFR_NONE, lister__move_down);
bind(context, 'j', MDFR_ALT, lister__move_up);
bind(context, key_page_down, MDFR_NONE, lister__move_down);
bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll);
bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press);
@ -233,6 +244,10 @@ bind(context, key_up, MDFR_SHIFT, move_up);
bind(context, key_down, MDFR_SHIFT, move_down);
bind(context, key_left, MDFR_SHIFT, move_left);
bind(context, key_right, MDFR_SHIFT, move_right);
bind(context, 'k', MDFR_ALT, move_up);
bind(context, 'j', MDFR_ALT, move_down);
bind(context, 'h', MDFR_ALT, move_left);
bind(context, 'l', MDFR_ALT, move_right);
bind(context, key_end, MDFR_NONE, seek_end_of_line);
bind(context, key_home, MDFR_NONE, seek_beginning_of_line);
bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file);
@ -247,14 +262,20 @@ bind(context, key_page_up, MDFR_SHIFT, page_up);
bind(context, key_page_down, MDFR_SHIFT, page_down);
bind(context, key_up, MDFR_CMND, seek_whitespace_up_end_line);
bind(context, key_down, MDFR_CMND, seek_whitespace_down_end_line);
bind(context, key_right, MDFR_CMND, seek_whitespace_right);
bind(context, key_left, MDFR_CMND, seek_whitespace_left);
bind(context, key_right, MDFR_CMND, seek_whitespace_right);
bind(context, key_up, MDFR_CMND|MDFR_SHIFT, seek_whitespace_up_end_line);
bind(context, key_down, MDFR_CMND|MDFR_SHIFT, seek_whitespace_down_end_line);
bind(context, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
bind(context, key_left, MDFR_CMND|MDFR_SHIFT, seek_whitespace_left);
bind(context, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
bind(context, 'k', MDFR_CTRL|MDFR_CMND, seek_whitespace_up_end_line);
bind(context, 'j', MDFR_CTRL|MDFR_CMND, seek_whitespace_down_end_line);
bind(context, 'h', MDFR_CTRL|MDFR_CMND, seek_whitespace_left);
bind(context, 'l', MDFR_CTRL|MDFR_CMND, seek_whitespace_right);
bind(context, key_up, MDFR_ALT, move_line_up);
bind(context, key_down, MDFR_ALT, move_line_down);
bind(context, 'k', MDFR_CTRL|MDFR_ALT, move_line_up);
bind(context, 'j', MDFR_CTRL|MDFR_ALT, move_line_down);
bind(context, key_back, MDFR_CMND, backspace_word);
bind(context, key_del, MDFR_CMND, delete_word);
bind(context, key_back, MDFR_CTRL, snipe_token_or_word);
@ -307,7 +328,6 @@ bind(context, '#', MDFR_NONE, write_and_auto_tab);
bind(context, '\t', MDFR_NONE, word_complete);
bind(context, '\t', MDFR_CMND, auto_tab_range);
bind(context, '\t', MDFR_SHIFT, auto_tab_line_at_cursor);
bind(context, 'h', MDFR_CTRL, write_hack);
bind(context, 'r', MDFR_CTRL, write_block);
bind(context, 't', MDFR_CTRL, write_todo);
bind(context, 'y', MDFR_CTRL, write_note);
@ -321,7 +341,7 @@ bind(context, ']', MDFR_CTRL, select_prev_scope_absolute);
bind(context, '\'', MDFR_CTRL, select_next_scope_absolute);
bind(context, '/', MDFR_CTRL, place_in_scope);
bind(context, '-', MDFR_CTRL, delete_current_scope);
bind(context, 'j', MDFR_CTRL, scope_absorb_down);
bind(context, '}', MDFR_CTRL, scope_absorb_down);
bind(context, 'i', MDFR_CTRL, if0_off);
bind(context, '1', MDFR_CTRL, open_file_in_quotes);
bind(context, '2', MDFR_CTRL, open_matching_file_cpp);
@ -418,7 +438,7 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_global[39] = {
{0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
{0, 55312, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)},
};
static Meta_Key_Bind fcoder_binds_for_default_mapid_file[78] = {
static Meta_Key_Bind fcoder_binds_for_default_mapid_file[88] = {
{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)},
{0, 55308, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)},
{0, 55315, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)},
@ -436,6 +456,10 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_file[78] = {
{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)},
{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)},
{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)},
{0, 107, 2, "move_up", 7, LINK_PROCS(move_up)},
{0, 106, 2, "move_down", 9, LINK_PROCS(move_down)},
{0, 104, 2, "move_left", 9, LINK_PROCS(move_left)},
{0, 108, 2, "move_right", 10, LINK_PROCS(move_right)},
{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
@ -450,14 +474,20 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_file[78] = {
{0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)},
{0, 55297, 1, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
{0, 55298, 1, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
{0, 55300, 1, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55299, 1, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
{0, 55300, 1, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55297, 9, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
{0, 55298, 9, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
{0, 55300, 9, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55299, 9, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
{0, 55300, 9, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 107, 3, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
{0, 106, 3, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
{0, 104, 3, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
{0, 108, 3, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
{0, 75, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
{0, 74, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
{0, 55296, 1, "backspace_word", 14, LINK_PROCS(backspace_word)},
{0, 55301, 1, "delete_word", 11, LINK_PROCS(delete_word)},
{0, 55296, 2, "snipe_token_or_word", 19, LINK_PROCS(snipe_token_or_word)},
@ -498,7 +528,7 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_file[78] = {
{0, 62, 1, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)},
{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)},
};
static Meta_Key_Bind fcoder_binds_for_default_default_code_map[31] = {
static Meta_Key_Bind fcoder_binds_for_default_default_code_map[30] = {
{0, 55300, 1, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
{0, 55299, 1, "seek_alphanumeric_or_camel_left", 31, LINK_PROCS(seek_alphanumeric_or_camel_left)},
{0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
@ -511,7 +541,6 @@ static Meta_Key_Bind fcoder_binds_for_default_default_code_map[31] = {
{0, 9, 0, "word_complete", 13, LINK_PROCS(word_complete)},
{0, 9, 1, "auto_tab_range", 14, LINK_PROCS(auto_tab_range)},
{0, 9, 8, "auto_tab_line_at_cursor", 23, LINK_PROCS(auto_tab_line_at_cursor)},
{0, 104, 2, "write_hack", 10, LINK_PROCS(write_hack)},
{0, 114, 2, "write_block", 11, LINK_PROCS(write_block)},
{0, 116, 2, "write_todo", 10, LINK_PROCS(write_todo)},
{0, 121, 2, "write_note", 10, LINK_PROCS(write_note)},
@ -525,21 +554,23 @@ static Meta_Key_Bind fcoder_binds_for_default_default_code_map[31] = {
{0, 39, 2, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)},
{0, 47, 2, "place_in_scope", 14, LINK_PROCS(place_in_scope)},
{0, 45, 2, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)},
{0, 106, 2, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)},
{0, 125, 2, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)},
{0, 105, 2, "if0_off", 7, LINK_PROCS(if0_off)},
{0, 49, 2, "open_file_in_quotes", 19, LINK_PROCS(open_file_in_quotes)},
{0, 50, 2, "open_matching_file_cpp", 22, LINK_PROCS(open_matching_file_cpp)},
{0, 48, 1, "write_zero_struct", 17, LINK_PROCS(write_zero_struct)},
};
static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[14] = {
static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[16] = {
{1, 0, 0, "lister__write_character", 23, LINK_PROCS(lister__write_character)},
{0, 55307, 0, "lister__quit", 12, LINK_PROCS(lister__quit)},
{0, 10, 0, "lister__activate", 16, LINK_PROCS(lister__activate)},
{0, 9, 0, "lister__activate", 16, LINK_PROCS(lister__activate)},
{0, 55296, 0, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)},
{0, 55297, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)},
{0, 107, 2, "lister__move_up", 15, LINK_PROCS(lister__move_up)},
{0, 55305, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)},
{0, 55298, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)},
{0, 106, 2, "lister__move_up", 15, LINK_PROCS(lister__move_up)},
{0, 55306, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)},
{0, 55312, 0, "lister__wheel_scroll", 20, LINK_PROCS(lister__wheel_scroll)},
{0, 55308, 0, "lister__mouse_press", 19, LINK_PROCS(lister__mouse_press)},
@ -549,9 +580,9 @@ static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[14] = {
};
static Meta_Sub_Map fcoder_submaps_for_default[4] = {
{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_default_mapid_global, 39},
{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_default_mapid_file, 78},
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 31},
{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_default_default_lister_ui_map, 14},
{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_default_mapid_file, 88},
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 30},
{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_default_default_lister_ui_map, 16},
};
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[39] = {
{0, 44, 4, "change_active_panel", 19, LINK_PROCS(change_active_panel)},
@ -594,7 +625,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[39] = {
{0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
{0, 55312, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)},
};
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[77] = {
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[87] = {
{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)},
{1, 0, 2, "write_character", 15, LINK_PROCS(write_character)},
{0, 55308, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)},
@ -613,6 +644,10 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[77] = {
{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)},
{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)},
{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)},
{0, 107, 2, "move_up", 7, LINK_PROCS(move_up)},
{0, 106, 2, "move_down", 9, LINK_PROCS(move_down)},
{0, 104, 2, "move_left", 9, LINK_PROCS(move_left)},
{0, 108, 2, "move_right", 10, LINK_PROCS(move_right)},
{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
@ -627,14 +662,20 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[77] = {
{0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)},
{0, 55297, 4, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
{0, 55298, 4, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
{0, 55300, 4, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55299, 4, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
{0, 55300, 4, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55297, 12, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
{0, 55298, 12, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
{0, 55300, 12, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55299, 12, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
{0, 55300, 12, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 107, 5, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
{0, 106, 5, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
{0, 104, 5, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
{0, 108, 5, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
{0, 107, 3, "move_line_up", 12, LINK_PROCS(move_line_up)},
{0, 106, 3, "move_line_down", 14, LINK_PROCS(move_line_down)},
{0, 55296, 4, "backspace_word", 14, LINK_PROCS(backspace_word)},
{0, 55301, 4, "delete_word", 11, LINK_PROCS(delete_word)},
{0, 55296, 1, "snipe_token_or_word", 19, LINK_PROCS(snipe_token_or_word)},
@ -673,7 +714,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[77] = {
{0, 62, 4, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)},
{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)},
};
static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[31] = {
static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[30] = {
{0, 55300, 4, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
{0, 55299, 4, "seek_alphanumeric_or_camel_left", 31, LINK_PROCS(seek_alphanumeric_or_camel_left)},
{0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
@ -686,7 +727,6 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[31] = {
{0, 9, 0, "word_complete", 13, LINK_PROCS(word_complete)},
{0, 9, 4, "auto_tab_range", 14, LINK_PROCS(auto_tab_range)},
{0, 9, 8, "auto_tab_line_at_cursor", 23, LINK_PROCS(auto_tab_line_at_cursor)},
{0, 104, 1, "write_hack", 10, LINK_PROCS(write_hack)},
{0, 114, 1, "write_block", 11, LINK_PROCS(write_block)},
{0, 116, 1, "write_todo", 10, LINK_PROCS(write_todo)},
{0, 121, 1, "write_note", 10, LINK_PROCS(write_note)},
@ -700,7 +740,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[31] = {
{0, 39, 1, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)},
{0, 47, 1, "place_in_scope", 14, LINK_PROCS(place_in_scope)},
{0, 45, 1, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)},
{0, 106, 1, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)},
{0, 125, 1, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)},
{0, 105, 1, "if0_off", 7, LINK_PROCS(if0_off)},
{0, 49, 1, "open_file_in_quotes", 19, LINK_PROCS(open_file_in_quotes)},
{0, 50, 1, "open_matching_file_cpp", 22, LINK_PROCS(open_matching_file_cpp)},
@ -724,8 +764,8 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_lister_ui_map[14] = {
};
static Meta_Sub_Map fcoder_submaps_for_mac_default[4] = {
{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_mac_default_mapid_global, 39},
{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_mac_default_mapid_file, 77},
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 31},
{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_mac_default_mapid_file, 87},
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 30},
{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_mac_default_default_lister_ui_map, 14},
};
static Meta_Mapping fcoder_meta_maps[2] = {

View File

@ -482,6 +482,11 @@ generate_remapping_code_and_data(){
bind(mappings, key_left, MDFR_SHIFT, move_left);
bind(mappings, key_right, MDFR_SHIFT, move_right);
bind(mappings, 'k', MDFR_ALT, move_up);
bind(mappings, 'j', MDFR_ALT, move_down);
bind(mappings, 'h', MDFR_ALT, move_left);
bind(mappings, 'l', MDFR_ALT, move_right);
bind(mappings, key_end, MDFR_NONE, seek_end_of_line);
bind(mappings, key_home, MDFR_NONE, seek_beginning_of_line);
bind(mappings, key_page_up, MDFR_CTRL, goto_beginning_of_file);
@ -497,16 +502,24 @@ generate_remapping_code_and_data(){
bind(mappings, key_up, MDFR_CTRL, seek_whitespace_up_end_line);
bind(mappings, key_down, MDFR_CTRL, seek_whitespace_down_end_line);
bind(mappings, key_right, MDFR_CTRL, seek_whitespace_right);
bind(mappings, key_left, MDFR_CTRL, seek_whitespace_left);
bind(mappings, key_right, MDFR_CTRL, seek_whitespace_right);
bind(mappings, key_up, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_up_end_line);
bind(mappings, key_down, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_down_end_line);
bind(mappings, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
bind(mappings, key_left, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_left);
bind(mappings, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
bind(mappings, 'k', MDFR_ALT|MDFR_CTRL, seek_whitespace_up_end_line);
bind(mappings, 'j', MDFR_ALT|MDFR_CTRL, seek_whitespace_down_end_line);
bind(mappings, 'h', MDFR_ALT|MDFR_CTRL, seek_whitespace_left);
bind(mappings, 'l', MDFR_ALT|MDFR_CTRL, seek_whitespace_right);
bind(mappings, key_up, MDFR_ALT, move_line_up);
bind(mappings, key_down, MDFR_ALT, move_line_down);
bind(mappings, 'K', MDFR_ALT, move_line_up);
bind(mappings, 'J', MDFR_ALT, move_line_down);
bind(mappings, key_back, MDFR_CTRL, backspace_word);
bind(mappings, key_del, MDFR_CTRL, delete_word);
bind(mappings, key_back, MDFR_ALT, snipe_token_or_word);
@ -572,7 +585,6 @@ generate_remapping_code_and_data(){
bind(mappings, '\t', MDFR_CTRL, auto_tab_range);
bind(mappings, '\t', MDFR_SHIFT, auto_tab_line_at_cursor);
bind(mappings, 'h', MDFR_ALT, write_hack);
bind(mappings, 'r', MDFR_ALT, write_block);
bind(mappings, 't', MDFR_ALT, write_todo);
bind(mappings, 'y', MDFR_ALT, write_note);
@ -589,7 +601,7 @@ generate_remapping_code_and_data(){
bind(mappings, '\'', MDFR_ALT, select_next_scope_absolute);
bind(mappings, '/', MDFR_ALT, place_in_scope);
bind(mappings, '-', MDFR_ALT, delete_current_scope);
bind(mappings, 'j', MDFR_ALT, scope_absorb_down);
bind(mappings, '}', MDFR_ALT, scope_absorb_down);
bind(mappings, 'i', MDFR_ALT, if0_off);
@ -609,8 +621,10 @@ generate_remapping_code_and_data(){
bind(mappings, '\t', MDFR_NONE, lister__activate);
bind(mappings, key_back , MDFR_NONE, lister__backspace_text_field);
bind(mappings, key_up , MDFR_NONE, lister__move_up);
bind(mappings, 'k' , MDFR_ALT , lister__move_up);
bind(mappings, key_page_up , MDFR_NONE, lister__move_up);
bind(mappings, key_down , MDFR_NONE, lister__move_down);
bind(mappings, 'j' , MDFR_ALT , lister__move_up);
bind(mappings, key_page_down, MDFR_NONE, lister__move_down);
bind(mappings, key_mouse_wheel , MDFR_NONE, lister__wheel_scroll);
bind(mappings, key_mouse_left , MDFR_NONE, lister__mouse_press);
@ -704,6 +718,11 @@ generate_remapping_code_and_data(){
bind(mappings, key_left, MDFR_SHIFT, move_left);
bind(mappings, key_right, MDFR_SHIFT, move_right);
bind(mappings, 'k', MDFR_ALT, move_up);
bind(mappings, 'j', MDFR_ALT, move_down);
bind(mappings, 'h', MDFR_ALT, move_left);
bind(mappings, 'l', MDFR_ALT, move_right);
bind(mappings, key_end, MDFR_NONE, seek_end_of_line);
bind(mappings, key_home, MDFR_NONE, seek_beginning_of_line);
bind(mappings, key_page_up, MDFR_CTRL, goto_beginning_of_file);
@ -719,16 +738,24 @@ generate_remapping_code_and_data(){
bind(mappings, key_up, MDFR_CMND, seek_whitespace_up_end_line);
bind(mappings, key_down, MDFR_CMND, seek_whitespace_down_end_line);
bind(mappings, key_right, MDFR_CMND, seek_whitespace_right);
bind(mappings, key_left, MDFR_CMND, seek_whitespace_left);
bind(mappings, key_right, MDFR_CMND, seek_whitespace_right);
bind(mappings, key_up, MDFR_CMND|MDFR_SHIFT, seek_whitespace_up_end_line);
bind(mappings, key_down, MDFR_CMND|MDFR_SHIFT, seek_whitespace_down_end_line);
bind(mappings, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
bind(mappings, key_left, MDFR_CMND|MDFR_SHIFT, seek_whitespace_left);
bind(mappings, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
bind(mappings, 'k', MDFR_CTRL|MDFR_CMND, seek_whitespace_up_end_line);
bind(mappings, 'j', MDFR_CTRL|MDFR_CMND, seek_whitespace_down_end_line);
bind(mappings, 'h', MDFR_CTRL|MDFR_CMND, seek_whitespace_left);
bind(mappings, 'l', MDFR_CTRL|MDFR_CMND, seek_whitespace_right);
bind(mappings, key_up, MDFR_ALT, move_line_up);
bind(mappings, key_down, MDFR_ALT, move_line_down);
bind(mappings, 'k', MDFR_CTRL|MDFR_ALT, move_line_up);
bind(mappings, 'j', MDFR_CTRL|MDFR_ALT, move_line_down);
bind(mappings, key_back, MDFR_CMND, backspace_word);
bind(mappings, key_del, MDFR_CMND, delete_word);
bind(mappings, key_back, MDFR_CTRL, snipe_token_or_word);
@ -792,7 +819,6 @@ generate_remapping_code_and_data(){
bind(mappings, '\t', MDFR_CMND, auto_tab_range);
bind(mappings, '\t', MDFR_SHIFT, auto_tab_line_at_cursor);
bind(mappings, 'h', MDFR_CTRL, write_hack);
bind(mappings, 'r', MDFR_CTRL, write_block);
bind(mappings, 't', MDFR_CTRL, write_todo);
bind(mappings, 'y', MDFR_CTRL, write_note);
@ -809,7 +835,7 @@ generate_remapping_code_and_data(){
bind(mappings, '\'', MDFR_CTRL, select_next_scope_absolute);
bind(mappings, '/', MDFR_CTRL, place_in_scope);
bind(mappings, '-', MDFR_CTRL, delete_current_scope);
bind(mappings, 'j', MDFR_CTRL, scope_absorb_down);
bind(mappings, '}', MDFR_CTRL, scope_absorb_down);
bind(mappings, 'i', MDFR_CTRL, if0_off);