Finished the bindings.html generator (mostly), fixed the windows crash bug (major
This commit is contained in:
parent
15d6ccf27f
commit
818e3781df
|
@ -5,14 +5,14 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include "version.h"
|
||||
#include "keycodes.h"
|
||||
#include "style.h"
|
||||
#include "4coder_generated/keycodes.h"
|
||||
#include "4coder_generated/style.h"
|
||||
// TODO(allen): I don't like having to pull in the types from my standalone libraries to define the API.
|
||||
// What to do??? Hmmm....
|
||||
#include "4coder_lib/4coder_string.h"
|
||||
#include "4cpp/4cpp_lexer_types.h"
|
||||
#include "types.h"
|
||||
#include "app_functions.h"
|
||||
#include "4coder_generated/app_functions.h"
|
||||
|
||||
extern "C" _GET_VERSION_SIG(get_alpha_4coder_version){
|
||||
int32_t result = (maj == MAJOR && min == MINOR && patch == PATCH);
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
enum{
|
||||
key_back = 55296,
|
||||
key_up = 55297,
|
||||
key_down = 55298,
|
||||
key_left = 55299,
|
||||
key_right = 55300,
|
||||
key_del = 55301,
|
||||
key_insert = 55302,
|
||||
key_home = 55303,
|
||||
key_end = 55304,
|
||||
key_page_up = 55305,
|
||||
key_page_down = 55306,
|
||||
key_esc = 55307,
|
||||
key_mouse_left = 55308,
|
||||
key_mouse_right = 55309,
|
||||
key_mouse_left_release = 55310,
|
||||
key_mouse_right_release = 55311,
|
||||
key_f1 = 55312,
|
||||
key_f2 = 55313,
|
||||
key_f3 = 55314,
|
||||
key_f4 = 55315,
|
||||
key_f5 = 55316,
|
||||
key_f6 = 55317,
|
||||
key_f7 = 55318,
|
||||
key_f8 = 55319,
|
||||
key_f9 = 55320,
|
||||
key_f10 = 55321,
|
||||
key_f11 = 55322,
|
||||
key_f12 = 55323,
|
||||
key_f13 = 55324,
|
||||
key_f14 = 55325,
|
||||
key_f15 = 55326,
|
||||
key_f16 = 55327,
|
||||
};
|
||||
static char*
|
||||
global_key_name(uint32_t key_code, int32_t *size){
|
||||
char *result = 0;
|
||||
switch(key_code){
|
||||
case key_back: result = "back"; *size = sizeof("back")-1; break;
|
||||
case key_up: result = "up"; *size = sizeof("up")-1; break;
|
||||
case key_down: result = "down"; *size = sizeof("down")-1; break;
|
||||
case key_left: result = "left"; *size = sizeof("left")-1; break;
|
||||
case key_right: result = "right"; *size = sizeof("right")-1; break;
|
||||
case key_del: result = "del"; *size = sizeof("del")-1; break;
|
||||
case key_insert: result = "insert"; *size = sizeof("insert")-1; break;
|
||||
case key_home: result = "home"; *size = sizeof("home")-1; break;
|
||||
case key_end: result = "end"; *size = sizeof("end")-1; break;
|
||||
case key_page_up: result = "page_up"; *size = sizeof("page_up")-1; break;
|
||||
case key_page_down: result = "page_down"; *size = sizeof("page_down")-1; break;
|
||||
case key_esc: result = "esc"; *size = sizeof("esc")-1; break;
|
||||
case key_mouse_left: result = "mouse_left"; *size = sizeof("mouse_left")-1; break;
|
||||
case key_mouse_right: result = "mouse_right"; *size = sizeof("mouse_right")-1; break;
|
||||
case key_mouse_left_release: result = "mouse_left_release"; *size = sizeof("mouse_left_release")-1; break;
|
||||
case key_mouse_right_release: result = "mouse_right_release"; *size = sizeof("mouse_right_release")-1; break;
|
||||
case key_f1: result = "f1"; *size = sizeof("f1")-1; break;
|
||||
case key_f2: result = "f2"; *size = sizeof("f2")-1; break;
|
||||
case key_f3: result = "f3"; *size = sizeof("f3")-1; break;
|
||||
case key_f4: result = "f4"; *size = sizeof("f4")-1; break;
|
||||
case key_f5: result = "f5"; *size = sizeof("f5")-1; break;
|
||||
case key_f6: result = "f6"; *size = sizeof("f6")-1; break;
|
||||
case key_f7: result = "f7"; *size = sizeof("f7")-1; break;
|
||||
case key_f8: result = "f8"; *size = sizeof("f8")-1; break;
|
||||
case key_f9: result = "f9"; *size = sizeof("f9")-1; break;
|
||||
case key_f10: result = "f10"; *size = sizeof("f10")-1; break;
|
||||
case key_f11: result = "f11"; *size = sizeof("f11")-1; break;
|
||||
case key_f12: result = "f12"; *size = sizeof("f12")-1; break;
|
||||
case key_f13: result = "f13"; *size = sizeof("f13")-1; break;
|
||||
case key_f14: result = "f14"; *size = sizeof("f14")-1; break;
|
||||
case key_f15: result = "f15"; *size = sizeof("f15")-1; break;
|
||||
case key_f16: result = "f16"; *size = sizeof("f16")-1; break;
|
||||
}
|
||||
return(result);
|
||||
}
|
|
@ -0,0 +1,539 @@
|
|||
#define command_id(c) (fcoder_metacmd_ID_##c)
|
||||
#define command_metadata(c) (&fcoder_metacmd_table[command_id(c)])
|
||||
#define command_metadata_by_id(id) (&fcoder_metacmd_table[id])
|
||||
#define command_one_past_last_id 172
|
||||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
#define PROC_LINKS(x,y) x
|
||||
#else
|
||||
#define PROC_LINKS(x,y) y
|
||||
#endif
|
||||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
CUSTOM_COMMAND_SIG(auto_tab_whole_file);
|
||||
CUSTOM_COMMAND_SIG(auto_tab_line_at_cursor);
|
||||
CUSTOM_COMMAND_SIG(auto_tab_range);
|
||||
CUSTOM_COMMAND_SIG(write_and_auto_tab);
|
||||
CUSTOM_COMMAND_SIG(write_character);
|
||||
CUSTOM_COMMAND_SIG(delete_char);
|
||||
CUSTOM_COMMAND_SIG(backspace_char);
|
||||
CUSTOM_COMMAND_SIG(set_mark);
|
||||
CUSTOM_COMMAND_SIG(cursor_mark_swap);
|
||||
CUSTOM_COMMAND_SIG(delete_range);
|
||||
CUSTOM_COMMAND_SIG(center_view);
|
||||
CUSTOM_COMMAND_SIG(left_adjust_view);
|
||||
CUSTOM_COMMAND_SIG(click_set_cursor);
|
||||
CUSTOM_COMMAND_SIG(click_set_mark);
|
||||
CUSTOM_COMMAND_SIG(move_up);
|
||||
CUSTOM_COMMAND_SIG(move_down);
|
||||
CUSTOM_COMMAND_SIG(move_up_10);
|
||||
CUSTOM_COMMAND_SIG(move_down_10);
|
||||
CUSTOM_COMMAND_SIG(page_up);
|
||||
CUSTOM_COMMAND_SIG(page_down);
|
||||
CUSTOM_COMMAND_SIG(move_left);
|
||||
CUSTOM_COMMAND_SIG(move_right);
|
||||
CUSTOM_COMMAND_SIG(select_all);
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_up);
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_down);
|
||||
CUSTOM_COMMAND_SIG(seek_beginning_of_textual_line);
|
||||
CUSTOM_COMMAND_SIG(seek_end_of_textual_line);
|
||||
CUSTOM_COMMAND_SIG(seek_beginning_of_line);
|
||||
CUSTOM_COMMAND_SIG(seek_end_of_line);
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_up_end_line);
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_down_end_line);
|
||||
CUSTOM_COMMAND_SIG(to_uppercase);
|
||||
CUSTOM_COMMAND_SIG(to_lowercase);
|
||||
CUSTOM_COMMAND_SIG(clean_all_lines);
|
||||
CUSTOM_COMMAND_SIG(basic_change_active_panel);
|
||||
CUSTOM_COMMAND_SIG(close_panel);
|
||||
CUSTOM_COMMAND_SIG(show_scrollbar);
|
||||
CUSTOM_COMMAND_SIG(hide_scrollbar);
|
||||
CUSTOM_COMMAND_SIG(show_filebar);
|
||||
CUSTOM_COMMAND_SIG(hide_filebar);
|
||||
CUSTOM_COMMAND_SIG(toggle_filebar);
|
||||
CUSTOM_COMMAND_SIG(toggle_line_wrap);
|
||||
CUSTOM_COMMAND_SIG(increase_line_wrap);
|
||||
CUSTOM_COMMAND_SIG(decrease_line_wrap);
|
||||
CUSTOM_COMMAND_SIG(toggle_virtual_whitespace);
|
||||
CUSTOM_COMMAND_SIG(toggle_show_whitespace);
|
||||
CUSTOM_COMMAND_SIG(eol_dosify);
|
||||
CUSTOM_COMMAND_SIG(eol_nixify);
|
||||
CUSTOM_COMMAND_SIG(exit_4coder);
|
||||
CUSTOM_COMMAND_SIG(goto_line);
|
||||
CUSTOM_COMMAND_SIG(search);
|
||||
CUSTOM_COMMAND_SIG(reverse_search);
|
||||
CUSTOM_COMMAND_SIG(search_identifier);
|
||||
CUSTOM_COMMAND_SIG(reverse_search_identifier);
|
||||
CUSTOM_COMMAND_SIG(replace_in_range);
|
||||
CUSTOM_COMMAND_SIG(query_replace);
|
||||
CUSTOM_COMMAND_SIG(query_replace_identifier);
|
||||
CUSTOM_COMMAND_SIG(save_all_dirty_buffers);
|
||||
CUSTOM_COMMAND_SIG(undo);
|
||||
CUSTOM_COMMAND_SIG(redo);
|
||||
CUSTOM_COMMAND_SIG(interactive_new);
|
||||
CUSTOM_COMMAND_SIG(interactive_open);
|
||||
CUSTOM_COMMAND_SIG(interactive_open_or_new);
|
||||
CUSTOM_COMMAND_SIG(interactive_switch_buffer);
|
||||
CUSTOM_COMMAND_SIG(interactive_kill_buffer);
|
||||
CUSTOM_COMMAND_SIG(reopen);
|
||||
CUSTOM_COMMAND_SIG(save);
|
||||
CUSTOM_COMMAND_SIG(kill_buffer);
|
||||
CUSTOM_COMMAND_SIG(open_color_tweaker);
|
||||
CUSTOM_COMMAND_SIG(open_debug);
|
||||
CUSTOM_COMMAND_SIG(build_search);
|
||||
CUSTOM_COMMAND_SIG(build_in_build_panel);
|
||||
CUSTOM_COMMAND_SIG(close_build_panel);
|
||||
CUSTOM_COMMAND_SIG(change_to_build_panel);
|
||||
CUSTOM_COMMAND_SIG(copy);
|
||||
CUSTOM_COMMAND_SIG(cut);
|
||||
CUSTOM_COMMAND_SIG(paste);
|
||||
CUSTOM_COMMAND_SIG(paste_next);
|
||||
CUSTOM_COMMAND_SIG(change_active_panel);
|
||||
CUSTOM_COMMAND_SIG(change_active_panel_backwards);
|
||||
CUSTOM_COMMAND_SIG(open_panel_vsplit);
|
||||
CUSTOM_COMMAND_SIG(open_panel_hsplit);
|
||||
CUSTOM_COMMAND_SIG(suppress_mouse);
|
||||
CUSTOM_COMMAND_SIG(allow_mouse);
|
||||
CUSTOM_COMMAND_SIG(toggle_mouse);
|
||||
CUSTOM_COMMAND_SIG(toggle_fullscreen);
|
||||
CUSTOM_COMMAND_SIG(remap_interactive);
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_right);
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_left);
|
||||
CUSTOM_COMMAND_SIG(seek_token_right);
|
||||
CUSTOM_COMMAND_SIG(seek_token_left);
|
||||
CUSTOM_COMMAND_SIG(seek_white_or_token_right);
|
||||
CUSTOM_COMMAND_SIG(seek_white_or_token_left);
|
||||
CUSTOM_COMMAND_SIG(seek_alphanumeric_right);
|
||||
CUSTOM_COMMAND_SIG(seek_alphanumeric_left);
|
||||
CUSTOM_COMMAND_SIG(seek_alphanumeric_or_camel_right);
|
||||
CUSTOM_COMMAND_SIG(seek_alphanumeric_or_camel_left);
|
||||
CUSTOM_COMMAND_SIG(backspace_word);
|
||||
CUSTOM_COMMAND_SIG(delete_word);
|
||||
CUSTOM_COMMAND_SIG(snipe_token_or_word);
|
||||
CUSTOM_COMMAND_SIG(snipe_token_or_word_right);
|
||||
CUSTOM_COMMAND_SIG(duplicate_line);
|
||||
CUSTOM_COMMAND_SIG(delete_line);
|
||||
CUSTOM_COMMAND_SIG(paste_and_indent);
|
||||
CUSTOM_COMMAND_SIG(paste_next_and_indent);
|
||||
CUSTOM_COMMAND_SIG(open_long_braces);
|
||||
CUSTOM_COMMAND_SIG(open_long_braces_semicolon);
|
||||
CUSTOM_COMMAND_SIG(open_long_braces_break);
|
||||
CUSTOM_COMMAND_SIG(if0_off);
|
||||
CUSTOM_COMMAND_SIG(write_todo);
|
||||
CUSTOM_COMMAND_SIG(write_hack);
|
||||
CUSTOM_COMMAND_SIG(write_note);
|
||||
CUSTOM_COMMAND_SIG(write_block);
|
||||
CUSTOM_COMMAND_SIG(write_zero_struct);
|
||||
CUSTOM_COMMAND_SIG(open_file_in_quotes);
|
||||
CUSTOM_COMMAND_SIG(open_in_other);
|
||||
CUSTOM_COMMAND_SIG(open_matching_file_cpp);
|
||||
CUSTOM_COMMAND_SIG(execute_arbitrary_command);
|
||||
CUSTOM_COMMAND_SIG(list_all_functions_current_buffer);
|
||||
CUSTOM_COMMAND_SIG(goto_jump_at_cursor_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_jump_at_cursor_same_panel_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_next_jump_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_prev_jump_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_next_jump_no_skips_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_prev_jump_no_skips_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_first_jump_direct);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_direct);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_direct);
|
||||
CUSTOM_COMMAND_SIG(goto_jump_at_cursor_sticky);
|
||||
CUSTOM_COMMAND_SIG(goto_jump_at_cursor_same_panel_sticky);
|
||||
CUSTOM_COMMAND_SIG(goto_next_jump_sticky);
|
||||
CUSTOM_COMMAND_SIG(goto_prev_jump_sticky);
|
||||
CUSTOM_COMMAND_SIG(goto_next_jump_no_skips_sticky);
|
||||
CUSTOM_COMMAND_SIG(goto_prev_jump_no_skips_sticky);
|
||||
CUSTOM_COMMAND_SIG(goto_first_jump_sticky);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_sticky);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_sticky);
|
||||
CUSTOM_COMMAND_SIG(open_all_code);
|
||||
CUSTOM_COMMAND_SIG(open_all_code_recursive);
|
||||
CUSTOM_COMMAND_SIG(close_all_code);
|
||||
CUSTOM_COMMAND_SIG(load_project);
|
||||
CUSTOM_COMMAND_SIG(project_fkey_command);
|
||||
CUSTOM_COMMAND_SIG(project_go_to_root_directory);
|
||||
CUSTOM_COMMAND_SIG(setup_new_project);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_choose);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_default);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_mac_default);
|
||||
CUSTOM_COMMAND_SIG(list_all_locations);
|
||||
CUSTOM_COMMAND_SIG(list_all_substring_locations);
|
||||
CUSTOM_COMMAND_SIG(list_all_locations_case_insensitive);
|
||||
CUSTOM_COMMAND_SIG(list_all_substring_locations_case_insensitive);
|
||||
CUSTOM_COMMAND_SIG(list_all_locations_of_identifier);
|
||||
CUSTOM_COMMAND_SIG(list_all_locations_of_identifier_case_insensitive);
|
||||
CUSTOM_COMMAND_SIG(word_complete);
|
||||
CUSTOM_COMMAND_SIG(execute_previous_cli);
|
||||
CUSTOM_COMMAND_SIG(execute_any_cli);
|
||||
CUSTOM_COMMAND_SIG(kill_rect);
|
||||
CUSTOM_COMMAND_SIG(multi_line_edit);
|
||||
CUSTOM_COMMAND_SIG(highlight_surrounding_scope);
|
||||
CUSTOM_COMMAND_SIG(highlight_next_scope_absolute);
|
||||
CUSTOM_COMMAND_SIG(highlight_prev_scope_absolute);
|
||||
CUSTOM_COMMAND_SIG(place_in_scope);
|
||||
CUSTOM_COMMAND_SIG(delete_current_scope);
|
||||
CUSTOM_COMMAND_SIG(scope_absorb_down);
|
||||
CUSTOM_COMMAND_SIG(rename_parameter);
|
||||
CUSTOM_COMMAND_SIG(write_explicit_enum_values);
|
||||
CUSTOM_COMMAND_SIG(miblo_increment_basic);
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_basic);
|
||||
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp);
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp);
|
||||
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp_minute);
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute);
|
||||
#endif
|
||||
struct Command_Metadata{
|
||||
PROC_LINKS(Custom_Command_Function, void) *proc;
|
||||
char *name;
|
||||
int32_t name_len;
|
||||
char *description;
|
||||
int32_t description_len;
|
||||
char *source_name;
|
||||
int32_t source_name_len;
|
||||
int32_t line_number;
|
||||
};
|
||||
static Command_Metadata fcoder_metacmd_table[172] = {
|
||||
{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "C:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 608 },
|
||||
{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "C:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 618 },
|
||||
{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "C:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 629 },
|
||||
{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "C:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 641 },
|
||||
{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 22 },
|
||||
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 52 },
|
||||
{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 70 },
|
||||
{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 89 },
|
||||
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 98 },
|
||||
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 110 },
|
||||
{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 125 },
|
||||
{ PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 140 },
|
||||
{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 179 },
|
||||
{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 192 },
|
||||
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 216 },
|
||||
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 222 },
|
||||
{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 228 },
|
||||
{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 234 },
|
||||
{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 256 },
|
||||
{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 265 },
|
||||
{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 275 },
|
||||
{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 284 },
|
||||
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 293 },
|
||||
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 306 },
|
||||
{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 317 },
|
||||
{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 328 },
|
||||
{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 339 },
|
||||
{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 350 },
|
||||
{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 363 },
|
||||
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 376 },
|
||||
{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 383 },
|
||||
{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 395 },
|
||||
{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 415 },
|
||||
{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 435 },
|
||||
{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 503 },
|
||||
{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 511 },
|
||||
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 523 },
|
||||
{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 530 },
|
||||
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 537 },
|
||||
{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 544 },
|
||||
{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 551 },
|
||||
{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 560 },
|
||||
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 570 },
|
||||
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 581 },
|
||||
{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 592 },
|
||||
{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 603 },
|
||||
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 610 },
|
||||
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 618 },
|
||||
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 626 },
|
||||
{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 636 },
|
||||
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 809 },
|
||||
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 816 },
|
||||
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 823 },
|
||||
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 834 },
|
||||
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 845 },
|
||||
{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 915 },
|
||||
{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 948 },
|
||||
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 991 },
|
||||
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1007 },
|
||||
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1013 },
|
||||
{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1019 },
|
||||
{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1025 },
|
||||
{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively opens or creates a new file.", 42, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1031 },
|
||||
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1037 },
|
||||
{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1043 },
|
||||
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1049 },
|
||||
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1055 },
|
||||
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1061 },
|
||||
{ PROC_LINKS(open_color_tweaker, 0), "open_color_tweaker", 18, "Opens the 4coder colors and fonts selector menu.", 48, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1067 },
|
||||
{ PROC_LINKS(open_debug, 0), "open_debug", 10, "Opens a debug view for internal use.", 36, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1073 },
|
||||
{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "C:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 169 },
|
||||
{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "C:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 203 },
|
||||
{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "C:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 219 },
|
||||
{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "C:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 225 },
|
||||
{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "C:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 52 },
|
||||
{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "C:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 61 },
|
||||
{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "C:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 70 },
|
||||
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "C:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 108 },
|
||||
{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 125 },
|
||||
{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 143 },
|
||||
{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 161 },
|
||||
{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 169 },
|
||||
{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 224 },
|
||||
{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 230 },
|
||||
{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 236 },
|
||||
{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 242 },
|
||||
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "C:\\work\\4ed\\code\\4coder_default_framework.h", 47, 741 },
|
||||
{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 97 },
|
||||
{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 101 },
|
||||
{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 105 },
|
||||
{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 109 },
|
||||
{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 113 },
|
||||
{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 117 },
|
||||
{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 121 },
|
||||
{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 125 },
|
||||
{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 129 },
|
||||
{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 133 },
|
||||
{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 144 },
|
||||
{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 164 },
|
||||
{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor.", 61, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 184 },
|
||||
{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor.", 62, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 199 },
|
||||
{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 218 },
|
||||
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 240 },
|
||||
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 262 },
|
||||
{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 269 },
|
||||
{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 309 },
|
||||
{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 317 },
|
||||
{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 325 },
|
||||
{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 333 },
|
||||
{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 405 },
|
||||
{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 411 },
|
||||
{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 417 },
|
||||
{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 423 },
|
||||
{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {0};'.", 34, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 429 },
|
||||
{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 473 },
|
||||
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file, displaying it in the other view.", 127, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 486 },
|
||||
{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 546 },
|
||||
{ PROC_LINKS(execute_arbitrary_command, 0), "execute_arbitrary_command", 25, "Execute a 'long form' command.", 30, "C:\\work\\4ed\\code\\4coder_default_include.cpp", 47, 565 },
|
||||
{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "C:\\work\\4ed\\code\\4coder_function_list.cpp", 45, 348 },
|
||||
{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 24 },
|
||||
{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 45 },
|
||||
{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 64 },
|
||||
{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 73 },
|
||||
{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 82 },
|
||||
{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 91 },
|
||||
{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 100 },
|
||||
{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 117 },
|
||||
{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "C:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 132 },
|
||||
{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 360 },
|
||||
{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 388 },
|
||||
{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 483 },
|
||||
{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 499 },
|
||||
{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 513 },
|
||||
{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 529 },
|
||||
{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 544 },
|
||||
{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 566 },
|
||||
{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "C:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 581 },
|
||||
{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 165 },
|
||||
{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 180 },
|
||||
{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 188 },
|
||||
{ PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 400 },
|
||||
{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 524 },
|
||||
{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 550 },
|
||||
{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "C:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 607 },
|
||||
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "C:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 50, 49 },
|
||||
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "C:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 50, 63 },
|
||||
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "C:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 50, 77 },
|
||||
{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 654 },
|
||||
{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 663 },
|
||||
{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 672 },
|
||||
{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 681 },
|
||||
{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 724 },
|
||||
{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 730 },
|
||||
{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "C:\\work\\4ed\\code\\4coder_search.cpp", 38, 752 },
|
||||
{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "C:\\work\\4ed\\code\\4coder_system_command.cpp", 46, 14 },
|
||||
{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "C:\\work\\4ed\\code\\4coder_system_command.cpp", 46, 30 },
|
||||
{ PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 31 },
|
||||
{ PROC_LINKS(multi_line_edit, 0), "multi_line_edit", 15, "Begin multi-line mode. In multi-line mode characters are inserted at every line between the mark and cursor. All characters are inserted at the same character offset into the line. This mode uses line_char coordinates.", 221, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 122 },
|
||||
{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 548 },
|
||||
{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 569 },
|
||||
{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 587 },
|
||||
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 605 },
|
||||
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 681 },
|
||||
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 940 },
|
||||
{ PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 1015 },
|
||||
{ PROC_LINKS(write_explicit_enum_values, 0), "write_explicit_enum_values", 26, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in sequentially starting from zero. Existing values are overwritten.", 170, "C:\\work\\4ed\\code\\power\\4coder_experiments.cpp", 50, 1168 },
|
||||
{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "C:\\work\\4ed\\code\\power\\4coder_miblo_numbers.cpp", 52, 103 },
|
||||
{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "C:\\work\\4ed\\code\\power\\4coder_miblo_numbers.cpp", 52, 119 },
|
||||
{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "C:\\work\\4ed\\code\\power\\4coder_miblo_numbers.cpp", 52, 386 },
|
||||
{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "C:\\work\\4ed\\code\\power\\4coder_miblo_numbers.cpp", 52, 392 },
|
||||
{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "C:\\work\\4ed\\code\\power\\4coder_miblo_numbers.cpp", 52, 398 },
|
||||
{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "C:\\work\\4ed\\code\\power\\4coder_miblo_numbers.cpp", 52, 404 },
|
||||
};
|
||||
static int32_t fcoder_metacmd_ID_auto_tab_whole_file = 0;
|
||||
static int32_t fcoder_metacmd_ID_auto_tab_line_at_cursor = 1;
|
||||
static int32_t fcoder_metacmd_ID_auto_tab_range = 2;
|
||||
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 3;
|
||||
static int32_t fcoder_metacmd_ID_write_character = 4;
|
||||
static int32_t fcoder_metacmd_ID_delete_char = 5;
|
||||
static int32_t fcoder_metacmd_ID_backspace_char = 6;
|
||||
static int32_t fcoder_metacmd_ID_set_mark = 7;
|
||||
static int32_t fcoder_metacmd_ID_cursor_mark_swap = 8;
|
||||
static int32_t fcoder_metacmd_ID_delete_range = 9;
|
||||
static int32_t fcoder_metacmd_ID_center_view = 10;
|
||||
static int32_t fcoder_metacmd_ID_left_adjust_view = 11;
|
||||
static int32_t fcoder_metacmd_ID_click_set_cursor = 12;
|
||||
static int32_t fcoder_metacmd_ID_click_set_mark = 13;
|
||||
static int32_t fcoder_metacmd_ID_move_up = 14;
|
||||
static int32_t fcoder_metacmd_ID_move_down = 15;
|
||||
static int32_t fcoder_metacmd_ID_move_up_10 = 16;
|
||||
static int32_t fcoder_metacmd_ID_move_down_10 = 17;
|
||||
static int32_t fcoder_metacmd_ID_page_up = 18;
|
||||
static int32_t fcoder_metacmd_ID_page_down = 19;
|
||||
static int32_t fcoder_metacmd_ID_move_left = 20;
|
||||
static int32_t fcoder_metacmd_ID_move_right = 21;
|
||||
static int32_t fcoder_metacmd_ID_select_all = 22;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 23;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 24;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 25;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 26;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 27;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_line = 28;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 29;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 30;
|
||||
static int32_t fcoder_metacmd_ID_to_uppercase = 31;
|
||||
static int32_t fcoder_metacmd_ID_to_lowercase = 32;
|
||||
static int32_t fcoder_metacmd_ID_clean_all_lines = 33;
|
||||
static int32_t fcoder_metacmd_ID_basic_change_active_panel = 34;
|
||||
static int32_t fcoder_metacmd_ID_close_panel = 35;
|
||||
static int32_t fcoder_metacmd_ID_show_scrollbar = 36;
|
||||
static int32_t fcoder_metacmd_ID_hide_scrollbar = 37;
|
||||
static int32_t fcoder_metacmd_ID_show_filebar = 38;
|
||||
static int32_t fcoder_metacmd_ID_hide_filebar = 39;
|
||||
static int32_t fcoder_metacmd_ID_toggle_filebar = 40;
|
||||
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 41;
|
||||
static int32_t fcoder_metacmd_ID_increase_line_wrap = 42;
|
||||
static int32_t fcoder_metacmd_ID_decrease_line_wrap = 43;
|
||||
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 44;
|
||||
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 45;
|
||||
static int32_t fcoder_metacmd_ID_eol_dosify = 46;
|
||||
static int32_t fcoder_metacmd_ID_eol_nixify = 47;
|
||||
static int32_t fcoder_metacmd_ID_exit_4coder = 48;
|
||||
static int32_t fcoder_metacmd_ID_goto_line = 49;
|
||||
static int32_t fcoder_metacmd_ID_search = 50;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search = 51;
|
||||
static int32_t fcoder_metacmd_ID_search_identifier = 52;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 53;
|
||||
static int32_t fcoder_metacmd_ID_replace_in_range = 54;
|
||||
static int32_t fcoder_metacmd_ID_query_replace = 55;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_identifier = 56;
|
||||
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 57;
|
||||
static int32_t fcoder_metacmd_ID_undo = 58;
|
||||
static int32_t fcoder_metacmd_ID_redo = 59;
|
||||
static int32_t fcoder_metacmd_ID_interactive_new = 60;
|
||||
static int32_t fcoder_metacmd_ID_interactive_open = 61;
|
||||
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 62;
|
||||
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 63;
|
||||
static int32_t fcoder_metacmd_ID_interactive_kill_buffer = 64;
|
||||
static int32_t fcoder_metacmd_ID_reopen = 65;
|
||||
static int32_t fcoder_metacmd_ID_save = 66;
|
||||
static int32_t fcoder_metacmd_ID_kill_buffer = 67;
|
||||
static int32_t fcoder_metacmd_ID_open_color_tweaker = 68;
|
||||
static int32_t fcoder_metacmd_ID_open_debug = 69;
|
||||
static int32_t fcoder_metacmd_ID_build_search = 70;
|
||||
static int32_t fcoder_metacmd_ID_build_in_build_panel = 71;
|
||||
static int32_t fcoder_metacmd_ID_close_build_panel = 72;
|
||||
static int32_t fcoder_metacmd_ID_change_to_build_panel = 73;
|
||||
static int32_t fcoder_metacmd_ID_copy = 74;
|
||||
static int32_t fcoder_metacmd_ID_cut = 75;
|
||||
static int32_t fcoder_metacmd_ID_paste = 76;
|
||||
static int32_t fcoder_metacmd_ID_paste_next = 77;
|
||||
static int32_t fcoder_metacmd_ID_change_active_panel = 78;
|
||||
static int32_t fcoder_metacmd_ID_change_active_panel_backwards = 79;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 80;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 81;
|
||||
static int32_t fcoder_metacmd_ID_suppress_mouse = 82;
|
||||
static int32_t fcoder_metacmd_ID_allow_mouse = 83;
|
||||
static int32_t fcoder_metacmd_ID_toggle_mouse = 84;
|
||||
static int32_t fcoder_metacmd_ID_toggle_fullscreen = 85;
|
||||
static int32_t fcoder_metacmd_ID_remap_interactive = 86;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 87;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 88;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_right = 89;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_left = 90;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 91;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 92;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 93;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 94;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 95;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 96;
|
||||
static int32_t fcoder_metacmd_ID_backspace_word = 97;
|
||||
static int32_t fcoder_metacmd_ID_delete_word = 98;
|
||||
static int32_t fcoder_metacmd_ID_snipe_token_or_word = 99;
|
||||
static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 100;
|
||||
static int32_t fcoder_metacmd_ID_duplicate_line = 101;
|
||||
static int32_t fcoder_metacmd_ID_delete_line = 102;
|
||||
static int32_t fcoder_metacmd_ID_paste_and_indent = 103;
|
||||
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 104;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces = 105;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 106;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_break = 107;
|
||||
static int32_t fcoder_metacmd_ID_if0_off = 108;
|
||||
static int32_t fcoder_metacmd_ID_write_todo = 109;
|
||||
static int32_t fcoder_metacmd_ID_write_hack = 110;
|
||||
static int32_t fcoder_metacmd_ID_write_note = 111;
|
||||
static int32_t fcoder_metacmd_ID_write_block = 112;
|
||||
static int32_t fcoder_metacmd_ID_write_zero_struct = 113;
|
||||
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 114;
|
||||
static int32_t fcoder_metacmd_ID_open_in_other = 115;
|
||||
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 116;
|
||||
static int32_t fcoder_metacmd_ID_execute_arbitrary_command = 117;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 118;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_direct = 119;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel_direct = 120;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_direct = 121;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_direct = 122;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips_direct = 123;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_direct = 124;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_direct = 125;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 126;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 127;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_sticky = 128;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel_sticky = 129;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_sticky = 130;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_sticky = 131;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips_sticky = 132;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_sticky = 133;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_sticky = 134;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 135;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 136;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code = 137;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 138;
|
||||
static int32_t fcoder_metacmd_ID_close_all_code = 139;
|
||||
static int32_t fcoder_metacmd_ID_load_project = 140;
|
||||
static int32_t fcoder_metacmd_ID_project_fkey_command = 141;
|
||||
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 142;
|
||||
static int32_t fcoder_metacmd_ID_setup_new_project = 143;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_choose = 144;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_default = 145;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 146;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations = 147;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 148;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 149;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 150;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 151;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 152;
|
||||
static int32_t fcoder_metacmd_ID_word_complete = 153;
|
||||
static int32_t fcoder_metacmd_ID_execute_previous_cli = 154;
|
||||
static int32_t fcoder_metacmd_ID_execute_any_cli = 155;
|
||||
static int32_t fcoder_metacmd_ID_kill_rect = 156;
|
||||
static int32_t fcoder_metacmd_ID_multi_line_edit = 157;
|
||||
static int32_t fcoder_metacmd_ID_highlight_surrounding_scope = 158;
|
||||
static int32_t fcoder_metacmd_ID_highlight_next_scope_absolute = 159;
|
||||
static int32_t fcoder_metacmd_ID_highlight_prev_scope_absolute = 160;
|
||||
static int32_t fcoder_metacmd_ID_place_in_scope = 161;
|
||||
static int32_t fcoder_metacmd_ID_delete_current_scope = 162;
|
||||
static int32_t fcoder_metacmd_ID_scope_absorb_down = 163;
|
||||
static int32_t fcoder_metacmd_ID_rename_parameter = 164;
|
||||
static int32_t fcoder_metacmd_ID_write_explicit_enum_values = 165;
|
||||
static int32_t fcoder_metacmd_ID_miblo_increment_basic = 166;
|
||||
static int32_t fcoder_metacmd_ID_miblo_decrement_basic = 167;
|
||||
static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp = 168;
|
||||
static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp = 169;
|
||||
static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 170;
|
||||
static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 171;
|
|
@ -0,0 +1,73 @@
|
|||
enum{
|
||||
key_back = 55296,
|
||||
key_up = 55297,
|
||||
key_down = 55298,
|
||||
key_left = 55299,
|
||||
key_right = 55300,
|
||||
key_del = 55301,
|
||||
key_insert = 55302,
|
||||
key_home = 55303,
|
||||
key_end = 55304,
|
||||
key_page_up = 55305,
|
||||
key_page_down = 55306,
|
||||
key_esc = 55307,
|
||||
key_mouse_left = 55308,
|
||||
key_mouse_right = 55309,
|
||||
key_mouse_left_release = 55310,
|
||||
key_mouse_right_release = 55311,
|
||||
key_f1 = 55312,
|
||||
key_f2 = 55313,
|
||||
key_f3 = 55314,
|
||||
key_f4 = 55315,
|
||||
key_f5 = 55316,
|
||||
key_f6 = 55317,
|
||||
key_f7 = 55318,
|
||||
key_f8 = 55319,
|
||||
key_f9 = 55320,
|
||||
key_f10 = 55321,
|
||||
key_f11 = 55322,
|
||||
key_f12 = 55323,
|
||||
key_f13 = 55324,
|
||||
key_f14 = 55325,
|
||||
key_f15 = 55326,
|
||||
key_f16 = 55327,
|
||||
};
|
||||
static char*
|
||||
global_key_name(uint32_t key_code, int32_t *size){
|
||||
char *result = 0;
|
||||
switch(key_code){
|
||||
case key_back: result = "key_back"; *size = sizeof("key_back")-1; break;
|
||||
case key_up: result = "key_up"; *size = sizeof("key_up")-1; break;
|
||||
case key_down: result = "key_down"; *size = sizeof("key_down")-1; break;
|
||||
case key_left: result = "key_left"; *size = sizeof("key_left")-1; break;
|
||||
case key_right: result = "key_right"; *size = sizeof("key_right")-1; break;
|
||||
case key_del: result = "key_del"; *size = sizeof("key_del")-1; break;
|
||||
case key_insert: result = "key_insert"; *size = sizeof("key_insert")-1; break;
|
||||
case key_home: result = "key_home"; *size = sizeof("key_home")-1; break;
|
||||
case key_end: result = "key_end"; *size = sizeof("key_end")-1; break;
|
||||
case key_page_up: result = "key_page_up"; *size = sizeof("key_page_up")-1; break;
|
||||
case key_page_down: result = "key_page_down"; *size = sizeof("key_page_down")-1; break;
|
||||
case key_esc: result = "key_esc"; *size = sizeof("key_esc")-1; break;
|
||||
case key_mouse_left: result = "key_mouse_left"; *size = sizeof("key_mouse_left")-1; break;
|
||||
case key_mouse_right: result = "key_mouse_right"; *size = sizeof("key_mouse_right")-1; break;
|
||||
case key_mouse_left_release: result = "key_mouse_left_release"; *size = sizeof("key_mouse_left_release")-1; break;
|
||||
case key_mouse_right_release: result = "key_mouse_right_release"; *size = sizeof("key_mouse_right_release")-1; break;
|
||||
case key_f1: result = "key_f1"; *size = sizeof("key_f1")-1; break;
|
||||
case key_f2: result = "key_f2"; *size = sizeof("key_f2")-1; break;
|
||||
case key_f3: result = "key_f3"; *size = sizeof("key_f3")-1; break;
|
||||
case key_f4: result = "key_f4"; *size = sizeof("key_f4")-1; break;
|
||||
case key_f5: result = "key_f5"; *size = sizeof("key_f5")-1; break;
|
||||
case key_f6: result = "key_f6"; *size = sizeof("key_f6")-1; break;
|
||||
case key_f7: result = "key_f7"; *size = sizeof("key_f7")-1; break;
|
||||
case key_f8: result = "key_f8"; *size = sizeof("key_f8")-1; break;
|
||||
case key_f9: result = "key_f9"; *size = sizeof("key_f9")-1; break;
|
||||
case key_f10: result = "key_f10"; *size = sizeof("key_f10")-1; break;
|
||||
case key_f11: result = "key_f11"; *size = sizeof("key_f11")-1; break;
|
||||
case key_f12: result = "key_f12"; *size = sizeof("key_f12")-1; break;
|
||||
case key_f13: result = "key_f13"; *size = sizeof("key_f13")-1; break;
|
||||
case key_f14: result = "key_f14"; *size = sizeof("key_f14")-1; break;
|
||||
case key_f15: result = "key_f15"; *size = sizeof("key_f15")-1; break;
|
||||
case key_f16: result = "key_f16"; *size = sizeof("key_f16")-1; break;
|
||||
}
|
||||
return(result);
|
||||
}
|
|
@ -0,0 +1,596 @@
|
|||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
void fill_keys_default(Bind_Helper *context){
|
||||
begin_map(context, mapid_global);
|
||||
bind(context, 'p', MDFR_CTRL, open_panel_vsplit);
|
||||
bind(context, '_', MDFR_CTRL, open_panel_hsplit);
|
||||
bind(context, 'P', MDFR_CTRL, close_panel);
|
||||
bind(context, ',', MDFR_CTRL, change_active_panel);
|
||||
bind(context, '<', MDFR_CTRL, change_active_panel_backwards);
|
||||
bind(context, 'n', MDFR_CTRL, interactive_new);
|
||||
bind(context, 'o', MDFR_CTRL, interactive_open_or_new);
|
||||
bind(context, 'o', MDFR_ALT, open_in_other);
|
||||
bind(context, 'k', MDFR_CTRL, interactive_kill_buffer);
|
||||
bind(context, 'i', MDFR_CTRL, interactive_switch_buffer);
|
||||
bind(context, 'h', MDFR_CTRL, project_go_to_root_directory);
|
||||
bind(context, 'S', MDFR_CTRL, save_all_dirty_buffers);
|
||||
bind(context, 'c', MDFR_ALT, open_color_tweaker);
|
||||
bind(context, 'd', MDFR_ALT, open_debug);
|
||||
bind(context, '.', MDFR_ALT, change_to_build_panel);
|
||||
bind(context, ',', MDFR_ALT, close_build_panel);
|
||||
bind(context, 'n', MDFR_ALT, goto_next_error);
|
||||
bind(context, 'N', MDFR_ALT, goto_prev_error);
|
||||
bind(context, 'M', MDFR_ALT, goto_first_error);
|
||||
bind(context, 'm', MDFR_ALT, build_in_build_panel);
|
||||
bind(context, 'z', MDFR_ALT, execute_any_cli);
|
||||
bind(context, 'Z', MDFR_ALT, execute_previous_cli);
|
||||
bind(context, 'x', MDFR_ALT, execute_arbitrary_command);
|
||||
bind(context, 's', MDFR_ALT, show_scrollbar);
|
||||
bind(context, 'w', MDFR_ALT, hide_scrollbar);
|
||||
bind(context, 'b', MDFR_ALT, toggle_filebar);
|
||||
bind(context, '@', MDFR_ALT, toggle_mouse);
|
||||
bind(context, key_page_up, MDFR_CTRL, toggle_fullscreen);
|
||||
bind(context, 'E', MDFR_ALT, exit_4coder);
|
||||
bind(context, key_f1, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f2, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f3, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f4, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f5, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f6, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f7, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f8, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f9, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f10, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f11, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f12, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f13, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f14, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f15, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f16, MDFR_NONE, project_fkey_command);
|
||||
end_map(context);
|
||||
begin_map(context, mapid_file);
|
||||
bind_vanilla_keys(context, write_character);
|
||||
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor);
|
||||
bind(context, key_mouse_left_release, MDFR_NONE, click_set_mark);
|
||||
bind(context, key_mouse_right, MDFR_NONE, click_set_mark);
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
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_NONE, page_up);
|
||||
bind(context, key_page_down, MDFR_NONE, page_down);
|
||||
bind(context, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
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_up, MDFR_ALT, move_up_10);
|
||||
bind(context, key_down, MDFR_ALT, move_down_10);
|
||||
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);
|
||||
bind(context, key_del, MDFR_ALT, snipe_token_or_word_right);
|
||||
bind(context, ' ', MDFR_CTRL, set_mark);
|
||||
bind(context, 'a', MDFR_CTRL, replace_in_range);
|
||||
bind(context, 'c', MDFR_CTRL, copy);
|
||||
bind(context, 'd', MDFR_CTRL, delete_range);
|
||||
bind(context, 'e', MDFR_CTRL, center_view);
|
||||
bind(context, 'E', MDFR_CTRL, left_adjust_view);
|
||||
bind(context, 'f', MDFR_CTRL, search);
|
||||
bind(context, 'F', MDFR_CTRL, list_all_locations);
|
||||
bind(context, 'F', MDFR_ALT, list_all_substring_locations_case_insensitive);
|
||||
bind(context, 'g', MDFR_CTRL, goto_line);
|
||||
bind(context, 'j', MDFR_CTRL, to_lowercase);
|
||||
bind(context, 'K', MDFR_CTRL, kill_buffer);
|
||||
bind(context, 'l', MDFR_CTRL, toggle_line_wrap);
|
||||
bind(context, 'm', MDFR_CTRL, cursor_mark_swap);
|
||||
bind(context, 'O', MDFR_CTRL, reopen);
|
||||
bind(context, 'q', MDFR_CTRL, query_replace);
|
||||
bind(context, 'Q', MDFR_CTRL, query_replace_identifier);
|
||||
bind(context, 'r', MDFR_CTRL, reverse_search);
|
||||
bind(context, 's', MDFR_CTRL, save);
|
||||
bind(context, 't', MDFR_CTRL, search_identifier);
|
||||
bind(context, 'T', MDFR_CTRL, list_all_locations_of_identifier);
|
||||
bind(context, 'u', MDFR_CTRL, to_uppercase);
|
||||
bind(context, 'v', MDFR_CTRL, paste_and_indent);
|
||||
bind(context, 'v', MDFR_ALT, toggle_virtual_whitespace);
|
||||
bind(context, 'V', MDFR_CTRL, paste_next_and_indent);
|
||||
bind(context, 'x', MDFR_CTRL, cut);
|
||||
bind(context, 'y', MDFR_CTRL, redo);
|
||||
bind(context, 'z', MDFR_CTRL, undo);
|
||||
bind(context, '2', MDFR_CTRL, decrease_line_wrap);
|
||||
bind(context, '3', MDFR_CTRL, increase_line_wrap);
|
||||
bind(context, '?', MDFR_CTRL, toggle_show_whitespace);
|
||||
bind(context, '~', MDFR_CTRL, clean_all_lines);
|
||||
bind(context, '\n', MDFR_NONE, newline_or_goto_position);
|
||||
bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel);
|
||||
bind(context, ' ', MDFR_SHIFT, write_character);
|
||||
end_map(context);
|
||||
begin_map(context, default_code_map);
|
||||
inherit_map(context, mapid_file);
|
||||
bind(context, key_right, MDFR_CTRL, seek_alphanumeric_or_camel_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_alphanumeric_or_camel_left);
|
||||
bind(context, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(context, '}', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ')', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ']', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ';', MDFR_NONE, write_and_auto_tab);
|
||||
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);
|
||||
bind(context, '[', MDFR_CTRL, open_long_braces);
|
||||
bind(context, '{', MDFR_CTRL, open_long_braces_semicolon);
|
||||
bind(context, '}', MDFR_CTRL, open_long_braces_break);
|
||||
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);
|
||||
bind(context, '0', MDFR_CTRL, write_zero_struct);
|
||||
bind(context, 'I', MDFR_CTRL, list_all_functions_current_buffer);
|
||||
end_map(context);
|
||||
}
|
||||
void fill_keys_mac_default(Bind_Helper *context){
|
||||
begin_map(context, mapid_global);
|
||||
bind(context, 'p', MDFR_CMND, open_panel_vsplit);
|
||||
bind(context, '_', MDFR_CMND, open_panel_hsplit);
|
||||
bind(context, 'P', MDFR_CMND, close_panel);
|
||||
bind(context, ',', MDFR_CMND, change_active_panel);
|
||||
bind(context, '<', MDFR_CMND, change_active_panel_backwards);
|
||||
bind(context, 'n', MDFR_CMND, interactive_new);
|
||||
bind(context, 'o', MDFR_CMND, interactive_open_or_new);
|
||||
bind(context, 'o', MDFR_CTRL, open_in_other);
|
||||
bind(context, 'k', MDFR_CMND, interactive_kill_buffer);
|
||||
bind(context, 'i', MDFR_CMND, interactive_switch_buffer);
|
||||
bind(context, 'h', MDFR_CMND, project_go_to_root_directory);
|
||||
bind(context, 'S', MDFR_CMND, save_all_dirty_buffers);
|
||||
bind(context, 'c', MDFR_CTRL, open_color_tweaker);
|
||||
bind(context, 'd', MDFR_CTRL, open_debug);
|
||||
bind(context, '.', MDFR_CTRL, change_to_build_panel);
|
||||
bind(context, ',', MDFR_CTRL, close_build_panel);
|
||||
bind(context, 'n', MDFR_CTRL, goto_next_error);
|
||||
bind(context, 'N', MDFR_CTRL, goto_prev_error);
|
||||
bind(context, 'M', MDFR_CTRL, goto_first_error);
|
||||
bind(context, 'm', MDFR_CTRL, build_in_build_panel);
|
||||
bind(context, 'z', MDFR_CTRL, execute_any_cli);
|
||||
bind(context, 'Z', MDFR_CTRL, execute_previous_cli);
|
||||
bind(context, 'x', MDFR_CTRL, execute_arbitrary_command);
|
||||
bind(context, 's', MDFR_CTRL, show_scrollbar);
|
||||
bind(context, 'w', MDFR_CTRL, hide_scrollbar);
|
||||
bind(context, 'b', MDFR_CTRL, toggle_filebar);
|
||||
bind(context, '@', MDFR_CTRL, toggle_mouse);
|
||||
bind(context, key_page_up, MDFR_CMND, toggle_fullscreen);
|
||||
bind(context, 'E', MDFR_CTRL, exit_4coder);
|
||||
bind(context, key_f1, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f2, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f3, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f4, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f5, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f6, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f7, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f8, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f9, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f10, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f11, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f12, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f13, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f14, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f15, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f16, MDFR_NONE, project_fkey_command);
|
||||
end_map(context);
|
||||
begin_map(context, mapid_file);
|
||||
bind_vanilla_keys(context, write_character);
|
||||
bind_vanilla_keys(context, MDFR_ALT, write_character);
|
||||
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor);
|
||||
bind(context, key_mouse_left_release, MDFR_NONE, click_set_mark);
|
||||
bind(context, key_mouse_right, MDFR_NONE, click_set_mark);
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
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_NONE, page_up);
|
||||
bind(context, key_page_down, MDFR_NONE, page_down);
|
||||
bind(context, key_right, MDFR_CMND, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
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_back, MDFR_CMND, backspace_word);
|
||||
bind(context, key_del, MDFR_CMND, delete_word);
|
||||
bind(context, key_back, MDFR_CTRL, snipe_token_or_word);
|
||||
bind(context, key_del, MDFR_CTRL, snipe_token_or_word_right);
|
||||
bind(context, '/', MDFR_CMND, set_mark);
|
||||
bind(context, 'a', MDFR_CMND, replace_in_range);
|
||||
bind(context, 'c', MDFR_CMND, copy);
|
||||
bind(context, 'd', MDFR_CMND, delete_range);
|
||||
bind(context, 'e', MDFR_CMND, center_view);
|
||||
bind(context, 'E', MDFR_CMND, left_adjust_view);
|
||||
bind(context, 'f', MDFR_CMND, search);
|
||||
bind(context, 'F', MDFR_CMND, list_all_locations);
|
||||
bind(context, 'F', MDFR_CTRL, list_all_substring_locations_case_insensitive);
|
||||
bind(context, 'g', MDFR_CMND, goto_line);
|
||||
bind(context, 'j', MDFR_CMND, to_lowercase);
|
||||
bind(context, 'K', MDFR_CMND, kill_buffer);
|
||||
bind(context, 'l', MDFR_CMND, toggle_line_wrap);
|
||||
bind(context, 'm', MDFR_CMND, cursor_mark_swap);
|
||||
bind(context, 'O', MDFR_CMND, reopen);
|
||||
bind(context, 'q', MDFR_CMND, query_replace);
|
||||
bind(context, 'Q', MDFR_CMND, query_replace_identifier);
|
||||
bind(context, 'r', MDFR_CMND, reverse_search);
|
||||
bind(context, 's', MDFR_CMND, save);
|
||||
bind(context, 't', MDFR_CMND, search_identifier);
|
||||
bind(context, 'T', MDFR_CMND, list_all_locations_of_identifier);
|
||||
bind(context, 'u', MDFR_CMND, to_uppercase);
|
||||
bind(context, 'v', MDFR_CMND, paste_and_indent);
|
||||
bind(context, 'v', MDFR_CTRL, toggle_virtual_whitespace);
|
||||
bind(context, 'V', MDFR_CMND, paste_next_and_indent);
|
||||
bind(context, 'x', MDFR_CMND, cut);
|
||||
bind(context, 'y', MDFR_CMND, redo);
|
||||
bind(context, 'z', MDFR_CMND, undo);
|
||||
bind(context, '2', MDFR_CMND, decrease_line_wrap);
|
||||
bind(context, '3', MDFR_CMND, increase_line_wrap);
|
||||
bind(context, '?', MDFR_CMND, toggle_show_whitespace);
|
||||
bind(context, '~', MDFR_CMND, clean_all_lines);
|
||||
bind(context, '\n', MDFR_NONE, newline_or_goto_position);
|
||||
bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel);
|
||||
bind(context, ' ', MDFR_SHIFT, write_character);
|
||||
end_map(context);
|
||||
begin_map(context, default_code_map);
|
||||
inherit_map(context, mapid_file);
|
||||
bind(context, key_right, MDFR_CMND, seek_alphanumeric_or_camel_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_alphanumeric_or_camel_left);
|
||||
bind(context, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(context, '}', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ')', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ']', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ';', MDFR_NONE, write_and_auto_tab);
|
||||
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);
|
||||
bind(context, '[', MDFR_CMND, open_long_braces);
|
||||
bind(context, '{', MDFR_CMND, open_long_braces_semicolon);
|
||||
bind(context, '}', MDFR_CMND, open_long_braces_break);
|
||||
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);
|
||||
bind(context, '0', MDFR_CMND, write_zero_struct);
|
||||
bind(context, 'I', MDFR_CMND, list_all_functions_current_buffer);
|
||||
end_map(context);
|
||||
}
|
||||
#endif
|
||||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
#define LINK_PROCS(x) x
|
||||
#else
|
||||
#define LINK_PROCS(x)
|
||||
#endif
|
||||
struct Meta_Key_Bind{
|
||||
int32_t vanilla;
|
||||
uint32_t keycode;
|
||||
uint32_t modifiers;
|
||||
char *command;
|
||||
int32_t command_len;
|
||||
LINK_PROCS(Custom_Command_Function *proc;)
|
||||
};
|
||||
struct Meta_Sub_Map{
|
||||
char *name;
|
||||
int32_t name_len;
|
||||
char *description;
|
||||
int32_t description_len;
|
||||
char *parent;
|
||||
int32_t parent_len;
|
||||
Meta_Key_Bind *binds;
|
||||
int32_t bind_count;
|
||||
};
|
||||
struct Meta_Mapping{
|
||||
char *name;
|
||||
int32_t name_len;
|
||||
char *description;
|
||||
int32_t description_len;
|
||||
Meta_Sub_Map *sub_maps;
|
||||
int32_t sub_map_count;
|
||||
LINK_PROCS(void (*fill_keys_proc)(Bind_Helper *context);)
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_default_mapid_global[45] = {
|
||||
{0, 112, 1, "open_panel_vsplit", 17, LINK_PROCS(open_panel_vsplit)},
|
||||
{0, 95, 1, "open_panel_hsplit", 17, LINK_PROCS(open_panel_hsplit)},
|
||||
{0, 80, 1, "close_panel", 11, LINK_PROCS(close_panel)},
|
||||
{0, 44, 1, "change_active_panel", 19, LINK_PROCS(change_active_panel)},
|
||||
{0, 60, 1, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)},
|
||||
{0, 110, 1, "interactive_new", 15, LINK_PROCS(interactive_new)},
|
||||
{0, 111, 1, "interactive_open_or_new", 23, LINK_PROCS(interactive_open_or_new)},
|
||||
{0, 111, 2, "open_in_other", 13, LINK_PROCS(open_in_other)},
|
||||
{0, 107, 1, "interactive_kill_buffer", 23, LINK_PROCS(interactive_kill_buffer)},
|
||||
{0, 105, 1, "interactive_switch_buffer", 25, LINK_PROCS(interactive_switch_buffer)},
|
||||
{0, 104, 1, "project_go_to_root_directory", 28, LINK_PROCS(project_go_to_root_directory)},
|
||||
{0, 83, 1, "save_all_dirty_buffers", 22, LINK_PROCS(save_all_dirty_buffers)},
|
||||
{0, 99, 2, "open_color_tweaker", 18, LINK_PROCS(open_color_tweaker)},
|
||||
{0, 100, 2, "open_debug", 10, LINK_PROCS(open_debug)},
|
||||
{0, 46, 2, "change_to_build_panel", 21, LINK_PROCS(change_to_build_panel)},
|
||||
{0, 44, 2, "close_build_panel", 17, LINK_PROCS(close_build_panel)},
|
||||
{0, 110, 2, "goto_next_error", 15, LINK_PROCS(goto_next_error)},
|
||||
{0, 78, 2, "goto_prev_error", 15, LINK_PROCS(goto_prev_error)},
|
||||
{0, 77, 2, "goto_first_error", 16, LINK_PROCS(goto_first_error)},
|
||||
{0, 109, 2, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)},
|
||||
{0, 122, 2, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)},
|
||||
{0, 90, 2, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)},
|
||||
{0, 120, 2, "execute_arbitrary_command", 25, LINK_PROCS(execute_arbitrary_command)},
|
||||
{0, 115, 2, "show_scrollbar", 14, LINK_PROCS(show_scrollbar)},
|
||||
{0, 119, 2, "hide_scrollbar", 14, LINK_PROCS(hide_scrollbar)},
|
||||
{0, 98, 2, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)},
|
||||
{0, 64, 2, "toggle_mouse", 12, LINK_PROCS(toggle_mouse)},
|
||||
{0, 55305, 1, "toggle_fullscreen", 17, LINK_PROCS(toggle_fullscreen)},
|
||||
{0, 69, 2, "exit_4coder", 11, LINK_PROCS(exit_4coder)},
|
||||
{0, 55312, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55313, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55314, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55315, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55316, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55317, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55318, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55319, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55320, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55321, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55322, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55323, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55324, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55325, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55326, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55327, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_default_mapid_file[61] = {
|
||||
{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)},
|
||||
{0, 55308, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)},
|
||||
{0, 55310, 0, "click_set_mark", 14, LINK_PROCS(click_set_mark)},
|
||||
{0, 55309, 0, "click_set_mark", 14, LINK_PROCS(click_set_mark)},
|
||||
{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{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, 0, "page_up", 7, LINK_PROCS(page_up)},
|
||||
{0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)},
|
||||
{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, 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, 55297, 2, "move_up_10", 10, LINK_PROCS(move_up_10)},
|
||||
{0, 55298, 2, "move_down_10", 12, LINK_PROCS(move_down_10)},
|
||||
{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)},
|
||||
{0, 55301, 2, "snipe_token_or_word_right", 25, LINK_PROCS(snipe_token_or_word_right)},
|
||||
{0, 32, 1, "set_mark", 8, LINK_PROCS(set_mark)},
|
||||
{0, 97, 1, "replace_in_range", 16, LINK_PROCS(replace_in_range)},
|
||||
{0, 99, 1, "copy", 4, LINK_PROCS(copy)},
|
||||
{0, 100, 1, "delete_range", 12, LINK_PROCS(delete_range)},
|
||||
{0, 101, 1, "center_view", 11, LINK_PROCS(center_view)},
|
||||
{0, 69, 1, "left_adjust_view", 16, LINK_PROCS(left_adjust_view)},
|
||||
{0, 102, 1, "search", 6, LINK_PROCS(search)},
|
||||
{0, 70, 1, "list_all_locations", 18, LINK_PROCS(list_all_locations)},
|
||||
{0, 70, 2, "list_all_substring_locations_case_insensitive", 45, LINK_PROCS(list_all_substring_locations_case_insensitive)},
|
||||
{0, 103, 1, "goto_line", 9, LINK_PROCS(goto_line)},
|
||||
{0, 106, 1, "to_lowercase", 12, LINK_PROCS(to_lowercase)},
|
||||
{0, 75, 1, "kill_buffer", 11, LINK_PROCS(kill_buffer)},
|
||||
{0, 108, 1, "toggle_line_wrap", 16, LINK_PROCS(toggle_line_wrap)},
|
||||
{0, 109, 1, "cursor_mark_swap", 16, LINK_PROCS(cursor_mark_swap)},
|
||||
{0, 79, 1, "reopen", 6, LINK_PROCS(reopen)},
|
||||
{0, 113, 1, "query_replace", 13, LINK_PROCS(query_replace)},
|
||||
{0, 81, 1, "query_replace_identifier", 24, LINK_PROCS(query_replace_identifier)},
|
||||
{0, 114, 1, "reverse_search", 14, LINK_PROCS(reverse_search)},
|
||||
{0, 115, 1, "save", 4, LINK_PROCS(save)},
|
||||
{0, 116, 1, "search_identifier", 17, LINK_PROCS(search_identifier)},
|
||||
{0, 84, 1, "list_all_locations_of_identifier", 32, LINK_PROCS(list_all_locations_of_identifier)},
|
||||
{0, 117, 1, "to_uppercase", 12, LINK_PROCS(to_uppercase)},
|
||||
{0, 118, 1, "paste_and_indent", 16, LINK_PROCS(paste_and_indent)},
|
||||
{0, 118, 2, "toggle_virtual_whitespace", 25, LINK_PROCS(toggle_virtual_whitespace)},
|
||||
{0, 86, 1, "paste_next_and_indent", 21, LINK_PROCS(paste_next_and_indent)},
|
||||
{0, 120, 1, "cut", 3, LINK_PROCS(cut)},
|
||||
{0, 121, 1, "redo", 4, LINK_PROCS(redo)},
|
||||
{0, 122, 1, "undo", 4, LINK_PROCS(undo)},
|
||||
{0, 50, 1, "decrease_line_wrap", 18, LINK_PROCS(decrease_line_wrap)},
|
||||
{0, 51, 1, "increase_line_wrap", 18, LINK_PROCS(increase_line_wrap)},
|
||||
{0, 63, 1, "toggle_show_whitespace", 22, LINK_PROCS(toggle_show_whitespace)},
|
||||
{0, 126, 1, "clean_all_lines", 15, LINK_PROCS(clean_all_lines)},
|
||||
{0, 10, 0, "newline_or_goto_position", 24, LINK_PROCS(newline_or_goto_position)},
|
||||
{0, 10, 8, "newline_or_goto_position_same_panel", 35, LINK_PROCS(newline_or_goto_position_same_panel)},
|
||||
{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_default_default_code_map[24] = {
|
||||
{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)},
|
||||
{0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 41, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 93, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 59, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 35, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{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)},
|
||||
{0, 91, 1, "open_long_braces", 16, LINK_PROCS(open_long_braces)},
|
||||
{0, 123, 1, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)},
|
||||
{0, 125, 1, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)},
|
||||
{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)},
|
||||
{0, 73, 1, "list_all_functions_current_buffer", 33, LINK_PROCS(list_all_functions_current_buffer)},
|
||||
};
|
||||
static Meta_Sub_Map fcoder_submaps_for_default[3] = {
|
||||
{"mapid_global", 12, "TODO", 4, 0, 0, fcoder_binds_for_default_mapid_global, 45},
|
||||
{"mapid_file", 10, "TODO", 4, 0, 0, fcoder_binds_for_default_mapid_file, 61},
|
||||
{"default_code_map", 16, "TODO", 4, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 24},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[45] = {
|
||||
{0, 112, 4, "open_panel_vsplit", 17, LINK_PROCS(open_panel_vsplit)},
|
||||
{0, 95, 4, "open_panel_hsplit", 17, LINK_PROCS(open_panel_hsplit)},
|
||||
{0, 80, 4, "close_panel", 11, LINK_PROCS(close_panel)},
|
||||
{0, 44, 4, "change_active_panel", 19, LINK_PROCS(change_active_panel)},
|
||||
{0, 60, 4, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)},
|
||||
{0, 110, 4, "interactive_new", 15, LINK_PROCS(interactive_new)},
|
||||
{0, 111, 4, "interactive_open_or_new", 23, LINK_PROCS(interactive_open_or_new)},
|
||||
{0, 111, 1, "open_in_other", 13, LINK_PROCS(open_in_other)},
|
||||
{0, 107, 4, "interactive_kill_buffer", 23, LINK_PROCS(interactive_kill_buffer)},
|
||||
{0, 105, 4, "interactive_switch_buffer", 25, LINK_PROCS(interactive_switch_buffer)},
|
||||
{0, 104, 4, "project_go_to_root_directory", 28, LINK_PROCS(project_go_to_root_directory)},
|
||||
{0, 83, 4, "save_all_dirty_buffers", 22, LINK_PROCS(save_all_dirty_buffers)},
|
||||
{0, 99, 1, "open_color_tweaker", 18, LINK_PROCS(open_color_tweaker)},
|
||||
{0, 100, 1, "open_debug", 10, LINK_PROCS(open_debug)},
|
||||
{0, 46, 1, "change_to_build_panel", 21, LINK_PROCS(change_to_build_panel)},
|
||||
{0, 44, 1, "close_build_panel", 17, LINK_PROCS(close_build_panel)},
|
||||
{0, 110, 1, "goto_next_error", 15, LINK_PROCS(goto_next_error)},
|
||||
{0, 78, 1, "goto_prev_error", 15, LINK_PROCS(goto_prev_error)},
|
||||
{0, 77, 1, "goto_first_error", 16, LINK_PROCS(goto_first_error)},
|
||||
{0, 109, 1, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)},
|
||||
{0, 122, 1, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)},
|
||||
{0, 90, 1, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)},
|
||||
{0, 120, 1, "execute_arbitrary_command", 25, LINK_PROCS(execute_arbitrary_command)},
|
||||
{0, 115, 1, "show_scrollbar", 14, LINK_PROCS(show_scrollbar)},
|
||||
{0, 119, 1, "hide_scrollbar", 14, LINK_PROCS(hide_scrollbar)},
|
||||
{0, 98, 1, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)},
|
||||
{0, 64, 1, "toggle_mouse", 12, LINK_PROCS(toggle_mouse)},
|
||||
{0, 55305, 4, "toggle_fullscreen", 17, LINK_PROCS(toggle_fullscreen)},
|
||||
{0, 69, 1, "exit_4coder", 11, LINK_PROCS(exit_4coder)},
|
||||
{0, 55312, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55313, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55314, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55315, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55316, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55317, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55318, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55319, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55320, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55321, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55322, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55323, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55324, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55325, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55326, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55327, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[60] = {
|
||||
{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", 16, LINK_PROCS(click_set_cursor)},
|
||||
{0, 55310, 0, "click_set_mark", 14, LINK_PROCS(click_set_mark)},
|
||||
{0, 55309, 0, "click_set_mark", 14, LINK_PROCS(click_set_mark)},
|
||||
{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{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, 0, "page_up", 7, LINK_PROCS(page_up)},
|
||||
{0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)},
|
||||
{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, 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, 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)},
|
||||
{0, 55301, 1, "snipe_token_or_word_right", 25, LINK_PROCS(snipe_token_or_word_right)},
|
||||
{0, 47, 4, "set_mark", 8, LINK_PROCS(set_mark)},
|
||||
{0, 97, 4, "replace_in_range", 16, LINK_PROCS(replace_in_range)},
|
||||
{0, 99, 4, "copy", 4, LINK_PROCS(copy)},
|
||||
{0, 100, 4, "delete_range", 12, LINK_PROCS(delete_range)},
|
||||
{0, 101, 4, "center_view", 11, LINK_PROCS(center_view)},
|
||||
{0, 69, 4, "left_adjust_view", 16, LINK_PROCS(left_adjust_view)},
|
||||
{0, 102, 4, "search", 6, LINK_PROCS(search)},
|
||||
{0, 70, 4, "list_all_locations", 18, LINK_PROCS(list_all_locations)},
|
||||
{0, 70, 1, "list_all_substring_locations_case_insensitive", 45, LINK_PROCS(list_all_substring_locations_case_insensitive)},
|
||||
{0, 103, 4, "goto_line", 9, LINK_PROCS(goto_line)},
|
||||
{0, 106, 4, "to_lowercase", 12, LINK_PROCS(to_lowercase)},
|
||||
{0, 75, 4, "kill_buffer", 11, LINK_PROCS(kill_buffer)},
|
||||
{0, 108, 4, "toggle_line_wrap", 16, LINK_PROCS(toggle_line_wrap)},
|
||||
{0, 109, 4, "cursor_mark_swap", 16, LINK_PROCS(cursor_mark_swap)},
|
||||
{0, 79, 4, "reopen", 6, LINK_PROCS(reopen)},
|
||||
{0, 113, 4, "query_replace", 13, LINK_PROCS(query_replace)},
|
||||
{0, 81, 4, "query_replace_identifier", 24, LINK_PROCS(query_replace_identifier)},
|
||||
{0, 114, 4, "reverse_search", 14, LINK_PROCS(reverse_search)},
|
||||
{0, 115, 4, "save", 4, LINK_PROCS(save)},
|
||||
{0, 116, 4, "search_identifier", 17, LINK_PROCS(search_identifier)},
|
||||
{0, 84, 4, "list_all_locations_of_identifier", 32, LINK_PROCS(list_all_locations_of_identifier)},
|
||||
{0, 117, 4, "to_uppercase", 12, LINK_PROCS(to_uppercase)},
|
||||
{0, 118, 4, "paste_and_indent", 16, LINK_PROCS(paste_and_indent)},
|
||||
{0, 118, 1, "toggle_virtual_whitespace", 25, LINK_PROCS(toggle_virtual_whitespace)},
|
||||
{0, 86, 4, "paste_next_and_indent", 21, LINK_PROCS(paste_next_and_indent)},
|
||||
{0, 120, 4, "cut", 3, LINK_PROCS(cut)},
|
||||
{0, 121, 4, "redo", 4, LINK_PROCS(redo)},
|
||||
{0, 122, 4, "undo", 4, LINK_PROCS(undo)},
|
||||
{0, 50, 4, "decrease_line_wrap", 18, LINK_PROCS(decrease_line_wrap)},
|
||||
{0, 51, 4, "increase_line_wrap", 18, LINK_PROCS(increase_line_wrap)},
|
||||
{0, 63, 4, "toggle_show_whitespace", 22, LINK_PROCS(toggle_show_whitespace)},
|
||||
{0, 126, 4, "clean_all_lines", 15, LINK_PROCS(clean_all_lines)},
|
||||
{0, 10, 0, "newline_or_goto_position", 24, LINK_PROCS(newline_or_goto_position)},
|
||||
{0, 10, 8, "newline_or_goto_position_same_panel", 35, LINK_PROCS(newline_or_goto_position_same_panel)},
|
||||
{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[24] = {
|
||||
{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)},
|
||||
{0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 41, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 93, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 59, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 35, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{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)},
|
||||
{0, 91, 4, "open_long_braces", 16, LINK_PROCS(open_long_braces)},
|
||||
{0, 123, 4, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)},
|
||||
{0, 125, 4, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)},
|
||||
{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)},
|
||||
{0, 48, 4, "write_zero_struct", 17, LINK_PROCS(write_zero_struct)},
|
||||
{0, 73, 4, "list_all_functions_current_buffer", 33, LINK_PROCS(list_all_functions_current_buffer)},
|
||||
};
|
||||
static Meta_Sub_Map fcoder_submaps_for_mac_default[3] = {
|
||||
{"mapid_global", 12, "TODO", 4, 0, 0, fcoder_binds_for_mac_default_mapid_global, 45},
|
||||
{"mapid_file", 10, "TODO", 4, 0, 0, fcoder_binds_for_mac_default_mapid_file, 60},
|
||||
{"default_code_map", 16, "TODO", 4, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 24},
|
||||
};
|
||||
static Meta_Mapping fcoder_meta_maps[2] = {
|
||||
{"default", 7, "TODO", 4, fcoder_submaps_for_default, 3, LINK_PROCS(fill_keys_default)},
|
||||
{"mac_default", 11, "TODO", 4, fcoder_submaps_for_mac_default, 3, LINK_PROCS(fill_keys_mac_default)},
|
||||
};
|
|
@ -6,11 +6,16 @@ TYPE: 'code-preprocessor'
|
|||
|
||||
// TOP
|
||||
|
||||
#define COMMAND_METADATA_OUT "4coder_generated/command_metadata.h"
|
||||
|
||||
#include "4coder_lib/4coder_mem.h"
|
||||
#define FSTRING_IMPLEMENTATION
|
||||
#include "4coder_lib/4coder_string.h"
|
||||
#include "4cpp/4cpp_lexer.h"
|
||||
|
||||
#define str_to_l_c(s) ((s).size), ((s).str)
|
||||
#define str_to_c_l(s) ((s).str), ((s).size)
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
@ -279,8 +284,15 @@ file_dump(Partition *part, char *name){
|
|||
return(text);
|
||||
}
|
||||
|
||||
static void
|
||||
error(char *source_name, String text, int32_t pos, char *msg){
|
||||
///////////////////////////////
|
||||
|
||||
struct Line_Column_Coordinates{
|
||||
int32_t line;
|
||||
int32_t column;
|
||||
};
|
||||
|
||||
static Line_Column_Coordinates
|
||||
line_column_coordinates(String text, int32_t pos){
|
||||
if (pos < 0){
|
||||
pos = 0;
|
||||
}
|
||||
|
@ -288,23 +300,38 @@ error(char *source_name, String text, int32_t pos, char *msg){
|
|||
pos = text.size;
|
||||
}
|
||||
|
||||
int32_t line_number = 1;
|
||||
int32_t character_pos = 1;
|
||||
Line_Column_Coordinates coords = {0};
|
||||
coords.line = 1;
|
||||
coords.column = 1;
|
||||
char *end = text.str + pos;
|
||||
for (char *p = text.str; p < end; ++p){
|
||||
if (*p == '\n'){
|
||||
++line_number;
|
||||
character_pos = 1;
|
||||
++coords.line;
|
||||
coords.column = 1;
|
||||
}
|
||||
else{
|
||||
++character_pos;
|
||||
++coords.column;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout, "%s:%d:%d: %s\n", source_name, line_number, character_pos, msg);
|
||||
return(coords);
|
||||
}
|
||||
|
||||
static int32_t
|
||||
line_number(String text, int32_t pos){
|
||||
Line_Column_Coordinates coords = line_column_coordinates(text, pos);
|
||||
return(coords.line);
|
||||
}
|
||||
|
||||
static void
|
||||
error(char *source_name, String text, int32_t pos, char *msg){
|
||||
Line_Column_Coordinates coords = line_column_coordinates(text, pos);
|
||||
fprintf(stdout, "%s:%d:%d: %s\n", source_name, coords.line, coords.column, msg);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
struct Reader{
|
||||
char *source_name;
|
||||
String text;
|
||||
|
@ -312,6 +339,11 @@ struct Reader{
|
|||
Cpp_Token *ptr;
|
||||
};
|
||||
|
||||
struct Temp_Read{
|
||||
Reader *reader;
|
||||
Cpp_Token *pos;
|
||||
};
|
||||
|
||||
static Reader
|
||||
make_reader(Cpp_Token_Array array, char *source_name, String text){
|
||||
Reader reader = {0};
|
||||
|
@ -401,16 +433,17 @@ peek_pos(Reader *reader){
|
|||
return(token.start);
|
||||
}
|
||||
|
||||
static int32_t
|
||||
line_number(Reader *reader, int32_t pos){
|
||||
int32_t result = line_number(reader->text, pos);
|
||||
return(result);
|
||||
}
|
||||
|
||||
static void
|
||||
error(Reader *reader, int32_t pos, char *msg){
|
||||
error(reader->source_name, reader->text, pos, msg);
|
||||
}
|
||||
|
||||
struct Temp_Read{
|
||||
Reader *reader;
|
||||
Cpp_Token *pos;
|
||||
};
|
||||
|
||||
static Temp_Read
|
||||
begin_temp_read(Reader *reader){
|
||||
Temp_Read temp = {0};
|
||||
|
@ -424,14 +457,70 @@ end_temp_read(Temp_Read temp){
|
|||
temp.reader->ptr = temp.pos;
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
static String
|
||||
token_str(String text, Cpp_Token token){
|
||||
String str = substr(text, token.start, token.size);
|
||||
return(str);
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
#define sll_push(f,l,n) if((f)==0){(f)=(l)=(n);}else{(l)->next=(n);(l)=(n);}(n)->next=0
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
typedef uint32_t Meta_Command_Entry_Type;
|
||||
enum{
|
||||
MetaCommandEntry_DocString,
|
||||
MetaCommandEntry_Alias,
|
||||
};
|
||||
|
||||
struct Meta_Command_Entry{
|
||||
Meta_Command_Entry *next;
|
||||
String name;
|
||||
char *source_name;
|
||||
int32_t line_number;
|
||||
union{
|
||||
struct{
|
||||
String doc;
|
||||
} docstring;
|
||||
struct{
|
||||
String potential;
|
||||
} alias;
|
||||
};
|
||||
};
|
||||
|
||||
struct Meta_Command_Entry_Arrays{
|
||||
Meta_Command_Entry *first_doc_string;
|
||||
Meta_Command_Entry *last_doc_string;
|
||||
int32_t doc_string_count;
|
||||
|
||||
Meta_Command_Entry *first_alias;
|
||||
Meta_Command_Entry *last_alias;
|
||||
int32_t alias_count;
|
||||
};
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
static bool32
|
||||
require_key_identifier(Reader *reader, char *str){
|
||||
has_duplicate_entry(Meta_Command_Entry *first, String name){
|
||||
bool32 has_duplicate = false;
|
||||
for (Meta_Command_Entry *entry = first;
|
||||
entry != 0;
|
||||
entry = entry->next){
|
||||
if (match(name, entry->name)){
|
||||
has_duplicate = true;
|
||||
}
|
||||
}
|
||||
return(has_duplicate);
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
static bool32
|
||||
require_key_identifier(Reader *reader, char *str, int32_t *opt_pos_out = 0){
|
||||
bool32 success = false;
|
||||
|
||||
Cpp_Token token = get_token(reader);
|
||||
|
@ -439,6 +528,9 @@ require_key_identifier(Reader *reader, char *str){
|
|||
String lexeme = token_str(reader->text, token);
|
||||
if (match(lexeme, str)){
|
||||
success = true;
|
||||
if (opt_pos_out != 0){
|
||||
*opt_pos_out = token.start;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -456,12 +548,15 @@ require_key_identifier(Reader *reader, char *str){
|
|||
}
|
||||
|
||||
static bool32
|
||||
require_open_parenthese(Reader *reader){
|
||||
require_open_parenthese(Reader *reader, int32_t *opt_pos_out = 0){
|
||||
bool32 success = false;
|
||||
|
||||
Cpp_Token token = get_token(reader);
|
||||
if (token.type == CPP_TOKEN_PARENTHESE_OPEN){
|
||||
success = true;
|
||||
if (opt_pos_out != 0){
|
||||
*opt_pos_out = token.start;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success){
|
||||
|
@ -472,12 +567,15 @@ require_open_parenthese(Reader *reader){
|
|||
}
|
||||
|
||||
static bool32
|
||||
require_close_parenthese(Reader *reader){
|
||||
require_close_parenthese(Reader *reader, int32_t *opt_pos_out = 0){
|
||||
bool32 success = false;
|
||||
|
||||
Cpp_Token token = get_token(reader);
|
||||
if (token.type == CPP_TOKEN_PARENTHESE_CLOSE){
|
||||
success = true;
|
||||
if (opt_pos_out != 0){
|
||||
*opt_pos_out = token.start;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success){
|
||||
|
@ -488,12 +586,15 @@ require_close_parenthese(Reader *reader){
|
|||
}
|
||||
|
||||
static bool32
|
||||
require_define(Reader *reader){
|
||||
require_define(Reader *reader, int32_t *opt_pos_out = 0){
|
||||
bool32 success = false;
|
||||
|
||||
Cpp_Token token = get_token(reader);
|
||||
if (token.type == CPP_PP_DEFINE){
|
||||
success = true;
|
||||
if (opt_pos_out != 0){
|
||||
*opt_pos_out = token.start;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success){
|
||||
|
@ -504,7 +605,7 @@ require_define(Reader *reader){
|
|||
}
|
||||
|
||||
static bool32
|
||||
extract_identifier(Reader *reader, String *str_out){
|
||||
extract_identifier(Reader *reader, String *str_out, int32_t *opt_pos_out = 0){
|
||||
bool32 success = false;
|
||||
|
||||
Cpp_Token token = get_token(reader);
|
||||
|
@ -512,6 +613,9 @@ extract_identifier(Reader *reader, String *str_out){
|
|||
String lexeme = token_str(reader->text, token);
|
||||
*str_out = lexeme;
|
||||
success = true;
|
||||
if (opt_pos_out != 0){
|
||||
*opt_pos_out = token.start;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success){
|
||||
|
@ -522,7 +626,7 @@ extract_identifier(Reader *reader, String *str_out){
|
|||
}
|
||||
|
||||
static bool32
|
||||
extract_string(Reader *reader, String *str_out){
|
||||
extract_string(Reader *reader, String *str_out, int32_t *opt_pos_out = 0){
|
||||
bool32 success = false;
|
||||
|
||||
Cpp_Token token = get_token(reader);
|
||||
|
@ -530,6 +634,9 @@ extract_string(Reader *reader, String *str_out){
|
|||
String lexeme = token_str(reader->text, token);
|
||||
*str_out = lexeme;
|
||||
success = true;
|
||||
if (opt_pos_out != 0){
|
||||
*opt_pos_out = token.start;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success){
|
||||
|
@ -540,12 +647,13 @@ extract_string(Reader *reader, String *str_out){
|
|||
}
|
||||
|
||||
static bool32
|
||||
parse_documented_command(Partition *part, Reader *reader){
|
||||
parse_documented_command(Partition *part, Meta_Command_Entry_Arrays *arrays, Reader *reader){
|
||||
String name = {0};
|
||||
String doc = {0};
|
||||
|
||||
// Getting the command's name
|
||||
if (!require_key_identifier(reader, "CUSTOM_COMMAND_SIG")){
|
||||
int32_t start_pos = 0;
|
||||
if (!require_key_identifier(reader, "CUSTOM_COMMAND_SIG", &start_pos)){
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
@ -570,7 +678,13 @@ parse_documented_command(Partition *part, Reader *reader){
|
|||
return(false);
|
||||
}
|
||||
|
||||
if (!extract_string(reader, &doc)){
|
||||
int32_t doc_pos = 0;
|
||||
if (!extract_string(reader, &doc, &doc_pos)){
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (doc.size < 1 || doc.str[0] != '"'){
|
||||
error(reader, doc_pos, "warning: doc strings with string literal prefixes not allowed");
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
@ -578,24 +692,35 @@ parse_documented_command(Partition *part, Reader *reader){
|
|||
return(false);
|
||||
}
|
||||
|
||||
// TODO(allen): Store into data structure for codegen.
|
||||
//error(reader, name_pos, "name of a command");
|
||||
//error(reader, str_pos, "doc string of a command");
|
||||
if (has_duplicate_entry(arrays->first_doc_string, name)){
|
||||
error(reader, start_pos, "warning: multiple commands with the same name and separate doc strings, skipping this one");
|
||||
return(false);
|
||||
}
|
||||
|
||||
doc = substr(doc, 1, doc.size - 2);
|
||||
|
||||
Meta_Command_Entry *new_entry = push_array(part, Meta_Command_Entry, 1);
|
||||
new_entry->name = name;
|
||||
new_entry->source_name = reader->source_name;
|
||||
new_entry->line_number = line_number(reader, start_pos);
|
||||
new_entry->docstring.doc = doc;
|
||||
sll_push(arrays->first_doc_string, arrays->last_doc_string, new_entry);
|
||||
++arrays->doc_string_count;
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
static bool32
|
||||
parse_alias(Partition *part, Reader *reader){
|
||||
parse_alias(Partition *part, Meta_Command_Entry_Arrays *arrays, Reader *reader){
|
||||
String name = {0};
|
||||
String potential = {0};
|
||||
|
||||
// Getting the alias's name
|
||||
if (!require_define(reader)){
|
||||
int32_t start_pos = 0;
|
||||
if (!require_define(reader, &start_pos)){
|
||||
return(false);
|
||||
}
|
||||
|
||||
int32_t name_pos = peek_pos(reader);
|
||||
if (!extract_identifier(reader, &name)){
|
||||
return(false);
|
||||
}
|
||||
|
@ -609,7 +734,6 @@ parse_alias(Partition *part, Reader *reader){
|
|||
return(false);
|
||||
}
|
||||
|
||||
int32_t potential_pos = peek_pos(reader);
|
||||
if (!extract_identifier(reader, &potential)){
|
||||
return(false);
|
||||
}
|
||||
|
@ -618,14 +742,21 @@ parse_alias(Partition *part, Reader *reader){
|
|||
return(false);
|
||||
}
|
||||
|
||||
error(reader, name_pos, "name of an alias");
|
||||
error(reader, potential_pos, "name of a potential");
|
||||
Meta_Command_Entry *new_entry = push_array(part, Meta_Command_Entry, 1);
|
||||
new_entry->name = name;
|
||||
new_entry->source_name = reader->source_name;
|
||||
new_entry->line_number = line_number(reader, start_pos);
|
||||
new_entry->alias.potential = potential;
|
||||
sll_push(arrays->first_alias, arrays->last_alias, new_entry);
|
||||
++arrays->alias_count;
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
static void
|
||||
parse_text(Partition *part, char *source_name, String text){
|
||||
parse_text(Partition *part, Meta_Command_Entry_Arrays *entry_arrays, char *source_name, String text){
|
||||
Cpp_Token_Array array = cpp_make_token_array(1024);
|
||||
cpp_lex_file(text.str, text.size, &array);
|
||||
|
||||
|
@ -662,7 +793,7 @@ parse_text(Partition *part, char *source_name, String text){
|
|||
end_temp_read(temp_read);
|
||||
}
|
||||
else{
|
||||
if (!parse_documented_command(part, reader)){
|
||||
if (!parse_documented_command(part, entry_arrays, reader)){
|
||||
end_temp_read(temp_read);
|
||||
}
|
||||
}
|
||||
|
@ -688,7 +819,7 @@ parse_text(Partition *part, char *source_name, String text){
|
|||
end_temp_read(temp_read);
|
||||
}
|
||||
else{
|
||||
if (!parse_alias(part, reader)){
|
||||
if (!parse_alias(part, entry_arrays, reader)){
|
||||
end_temp_read(temp_read);
|
||||
}
|
||||
}
|
||||
|
@ -704,7 +835,7 @@ parse_text(Partition *part, char *source_name, String text){
|
|||
}
|
||||
|
||||
static void
|
||||
parse_file(Partition *part, Filename_Character *name_, int32_t len){
|
||||
parse_file(Partition *part, Meta_Command_Entry_Arrays *entry_arrays, Filename_Character *name_, int32_t len){
|
||||
char *name = unencode(part, name_, len);
|
||||
if (name == 0){
|
||||
if (sizeof(*name_) == 2){
|
||||
|
@ -717,15 +848,19 @@ parse_file(Partition *part, Filename_Character *name_, int32_t len){
|
|||
}
|
||||
|
||||
String text = file_dump(part, name);
|
||||
parse_text(part, name, text);
|
||||
parse_text(part, entry_arrays, name, text);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_files_in_directory(Partition *part, Filename_Character *root, bool32 recursive){
|
||||
parse_files_in_directory(Partition *part, Meta_Command_Entry_Arrays *entry_arrays, Filename_Character *root, bool32 recursive){
|
||||
File_List list = get_file_list(part, root);
|
||||
for (int32_t i = 0; i < list.count; ++i){
|
||||
File_Info *info = &list.info[i];
|
||||
|
||||
if (info->is_folder && match(make_string(info->name, info->len), "4coder_generated")){
|
||||
continue;
|
||||
}
|
||||
|
||||
int32_t full_name_len = list.final_length + 1 + info->len;
|
||||
Filename_Character *full_name = push_array(part, Filename_Character, full_name_len + 1);
|
||||
push_align(part, 8);
|
||||
|
@ -741,10 +876,10 @@ parse_files_in_directory(Partition *part, Filename_Character *root, bool32 recur
|
|||
full_name[full_name_len] = 0;
|
||||
|
||||
if (!info->is_folder){
|
||||
parse_file(part, full_name, full_name_len);
|
||||
parse_file(part, entry_arrays, full_name, full_name_len);
|
||||
}
|
||||
else{
|
||||
parse_files_in_directory(part, full_name, recursive);
|
||||
parse_files_in_directory(part, entry_arrays, full_name, recursive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -780,9 +915,84 @@ main(int argc, char **argv){
|
|||
start_i = 2;
|
||||
}
|
||||
|
||||
Meta_Command_Entry_Arrays entry_arrays = {0};
|
||||
for (int32_t i = start_i; i < argc; ++i){
|
||||
Filename_Character *root_name = encode(part, argv[i]);
|
||||
parse_files_in_directory(part, root_name, recursive);
|
||||
parse_files_in_directory(part, &entry_arrays, root_name, recursive);
|
||||
}
|
||||
|
||||
FILE *out = fopen(COMMAND_METADATA_OUT, "wb");
|
||||
|
||||
if (out != 0){
|
||||
fprintf(out, "#define command_id(c) (fcoder_metacmd_ID_##c)\n");
|
||||
fprintf(out, "#define command_metadata(c) (&fcoder_metacmd_table[command_id(c)])\n");
|
||||
fprintf(out, "#define command_metadata_by_id(id) (&fcoder_metacmd_table[id])\n");
|
||||
fprintf(out, "#define command_one_past_last_id %d\n", entry_arrays.doc_string_count);
|
||||
fprintf(out, "#if defined(CUSTOM_COMMAND_SIG)\n");
|
||||
fprintf(out, "#define PROC_LINKS(x,y) x\n");
|
||||
fprintf(out, "#else\n");
|
||||
fprintf(out, "#define PROC_LINKS(x,y) y\n");
|
||||
fprintf(out, "#endif\n");
|
||||
|
||||
fprintf(out, "#if defined(CUSTOM_COMMAND_SIG)\n");
|
||||
for (Meta_Command_Entry *entry = entry_arrays.first_doc_string;
|
||||
entry != 0;
|
||||
entry = entry->next){
|
||||
fprintf(out, "CUSTOM_COMMAND_SIG(%.*s);\n", str_to_l_c(entry->name));
|
||||
}
|
||||
fprintf(out, "#endif\n");
|
||||
|
||||
fprintf(out,
|
||||
"struct Command_Metadata{\n"
|
||||
"PROC_LINKS(Custom_Command_Function, void) *proc;\n"
|
||||
"char *name;\n"
|
||||
"int32_t name_len;\n"
|
||||
"char *description;\n"
|
||||
"int32_t description_len;\n"
|
||||
"char *source_name;\n"
|
||||
"int32_t source_name_len;\n"
|
||||
"int32_t line_number;\n"
|
||||
"};\n");
|
||||
|
||||
fprintf(out,
|
||||
"static Command_Metadata fcoder_metacmd_table[%d] = {\n",
|
||||
entry_arrays.doc_string_count);
|
||||
for (Meta_Command_Entry *entry = entry_arrays.first_doc_string;
|
||||
entry != 0;
|
||||
entry = entry->next){
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
|
||||
// HACK(allen): We could just get these at the HEAD END of the process,
|
||||
// then we only have to do it once per file, and pass the lengths through.
|
||||
int32_t source_name_len = str_size(entry->source_name);
|
||||
|
||||
char *fixed_name = push_array(part, char, source_name_len*2 + 1);
|
||||
String s = make_string_cap(fixed_name, 0, source_name_len*2 + 1);
|
||||
copy(&s, entry->source_name);
|
||||
replace_str(&s, "\\", "\\\\");
|
||||
terminate_with_null(&s);
|
||||
|
||||
fprintf(out,
|
||||
"{ PROC_LINKS(%.*s, 0), \"%.*s\", %d, \"%.*s\", %d, \"%s\", %d, %d },\n",
|
||||
str_to_l_c(entry->name),
|
||||
str_to_l_c(entry->name), entry->name.size,
|
||||
str_to_l_c(entry->docstring.doc), entry->docstring.doc.size,
|
||||
s.str, s.size, entry->line_number);
|
||||
end_temp_memory(temp);
|
||||
}
|
||||
fprintf(out, "};\n");
|
||||
|
||||
int32_t id = 0;
|
||||
for (Meta_Command_Entry *entry = entry_arrays.first_doc_string;
|
||||
entry != 0;
|
||||
entry = entry->next){
|
||||
fprintf(out, "static int32_t fcoder_metacmd_ID_%.*s = %d;\n",
|
||||
str_to_l_c(entry->name), id);
|
||||
++id;
|
||||
}
|
||||
}
|
||||
else{
|
||||
fprintf(stdout, "fatal error: could not open output file %s\n", COMMAND_METADATA_OUT);
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
|
|
@ -14,352 +14,16 @@ TYPE: 'drop-in-command-pack'
|
|||
// Buffer Filling Helpers
|
||||
//
|
||||
|
||||
#include "4coder_generated/remapping.h"
|
||||
|
||||
void
|
||||
default_keys(Bind_Helper *context){
|
||||
// NOTE(allen|a4.0.22): GLOBAL
|
||||
begin_map(context, mapid_global);
|
||||
|
||||
bind(context, 'p', MDFR_CTRL, open_panel_vsplit);
|
||||
bind(context, '_', MDFR_CTRL, open_panel_hsplit);
|
||||
bind(context, 'P', MDFR_CTRL, close_panel);
|
||||
bind(context, ',', MDFR_CTRL, change_active_panel);
|
||||
bind(context, '<', MDFR_CTRL, change_active_panel_backwards);
|
||||
|
||||
bind(context, 'n', MDFR_CTRL, interactive_new);
|
||||
bind(context, 'o', MDFR_CTRL, interactive_open_or_new);
|
||||
bind(context, 'o', MDFR_ALT, open_in_other);
|
||||
bind(context, 'k', MDFR_CTRL, interactive_kill_buffer);
|
||||
bind(context, 'i', MDFR_CTRL, interactive_switch_buffer);
|
||||
bind(context, 'h', MDFR_CTRL, project_go_to_root_directory);
|
||||
bind(context, 'S', MDFR_CTRL, save_all_dirty_buffers);
|
||||
|
||||
bind(context, 'c', MDFR_ALT, open_color_tweaker);
|
||||
bind(context, 'd', MDFR_ALT, open_debug);
|
||||
|
||||
bind(context, '.', MDFR_ALT, change_to_build_panel);
|
||||
bind(context, ',', MDFR_ALT, close_build_panel);
|
||||
bind(context, 'n', MDFR_ALT, goto_next_error);
|
||||
bind(context, 'N', MDFR_ALT, goto_prev_error);
|
||||
bind(context, 'M', MDFR_ALT, goto_first_error);
|
||||
bind(context, 'm', MDFR_ALT, build_in_build_panel);
|
||||
|
||||
bind(context, 'z', MDFR_ALT, execute_any_cli);
|
||||
bind(context, 'Z', MDFR_ALT, execute_previous_cli);
|
||||
|
||||
bind(context, 'x', MDFR_ALT, execute_arbitrary_command);
|
||||
|
||||
bind(context, 's', MDFR_ALT, show_scrollbar);
|
||||
bind(context, 'w', MDFR_ALT, hide_scrollbar);
|
||||
bind(context, 'b', MDFR_ALT, toggle_filebar);
|
||||
|
||||
bind(context, '@', MDFR_ALT, toggle_mouse);
|
||||
bind(context, key_page_up, MDFR_CTRL, toggle_fullscreen);
|
||||
bind(context, 'E', MDFR_ALT, exit_4coder);
|
||||
|
||||
bind(context, key_f1, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f2, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f3, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f4, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(context, key_f5, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f6, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f7, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f8, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(context, key_f9, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f10, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f11, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f12, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(context, key_f13, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f14, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f15, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f16, MDFR_NONE, project_fkey_command);
|
||||
|
||||
end_map(context);
|
||||
|
||||
// NOTE(allen|a4.0.22): FILE
|
||||
begin_map(context, mapid_file);
|
||||
|
||||
bind_vanilla_keys(context, write_character);
|
||||
|
||||
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor);
|
||||
bind(context, key_mouse_left_release, MDFR_NONE, click_set_mark);
|
||||
bind(context, key_mouse_right, MDFR_NONE, click_set_mark);
|
||||
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
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_NONE, page_up);
|
||||
bind(context, key_page_down, MDFR_NONE, page_down);
|
||||
|
||||
bind(context, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
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_up, MDFR_ALT, move_up_10);
|
||||
bind(context, key_down, MDFR_ALT, move_down_10);
|
||||
|
||||
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);
|
||||
bind(context, key_del, MDFR_ALT, snipe_token_or_word_right);
|
||||
|
||||
bind(context, ' ', MDFR_CTRL, set_mark);
|
||||
bind(context, 'a', MDFR_CTRL, replace_in_range);
|
||||
bind(context, 'c', MDFR_CTRL, copy);
|
||||
bind(context, 'd', MDFR_CTRL, delete_range);
|
||||
bind(context, 'e', MDFR_CTRL, center_view);
|
||||
bind(context, 'E', MDFR_CTRL, left_adjust_view);
|
||||
bind(context, 'f', MDFR_CTRL, search);
|
||||
bind(context, 'F', MDFR_CTRL, list_all_locations);
|
||||
bind(context, 'F', MDFR_ALT , list_all_substring_locations_case_insensitive);
|
||||
bind(context, 'g', MDFR_CTRL, goto_line);
|
||||
bind(context, 'j', MDFR_CTRL, to_lowercase);
|
||||
bind(context, 'K', MDFR_CTRL, kill_buffer);
|
||||
bind(context, 'l', MDFR_CTRL, toggle_line_wrap);
|
||||
bind(context, 'm', MDFR_CTRL, cursor_mark_swap);
|
||||
bind(context, 'O', MDFR_CTRL, reopen);
|
||||
bind(context, 'q', MDFR_CTRL, query_replace);
|
||||
bind(context, 'Q', MDFR_CTRL, query_replace_identifier);
|
||||
bind(context, 'r', MDFR_CTRL, reverse_search);
|
||||
bind(context, 's', MDFR_CTRL, save);
|
||||
bind(context, 't', MDFR_CTRL, search_identifier);
|
||||
bind(context, 'T', MDFR_CTRL, list_all_locations_of_identifier);
|
||||
bind(context, 'u', MDFR_CTRL, to_uppercase);
|
||||
bind(context, 'v', MDFR_CTRL, paste_and_indent);
|
||||
bind(context, 'v', MDFR_ALT , toggle_virtual_whitespace);
|
||||
bind(context, 'V', MDFR_CTRL, paste_next_and_indent);
|
||||
bind(context, 'x', MDFR_CTRL, cut);
|
||||
bind(context, 'y', MDFR_CTRL, redo);
|
||||
bind(context, 'z', MDFR_CTRL, undo);
|
||||
|
||||
bind(context, '2', MDFR_CTRL, decrease_line_wrap);
|
||||
bind(context, '3', MDFR_CTRL, increase_line_wrap);
|
||||
|
||||
bind(context, '?', MDFR_CTRL, toggle_show_whitespace);
|
||||
bind(context, '~', MDFR_CTRL, clean_all_lines);
|
||||
bind(context, '\n', MDFR_NONE, newline_or_goto_position);
|
||||
bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel);
|
||||
bind(context, ' ', MDFR_SHIFT, write_character);
|
||||
|
||||
end_map(context);
|
||||
|
||||
// NOTE(allen|a4.0.22): CODE
|
||||
begin_map(context, default_code_map);
|
||||
|
||||
inherit_map(context, mapid_file);
|
||||
|
||||
bind(context, key_right, MDFR_CTRL, seek_alphanumeric_or_camel_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_alphanumeric_or_camel_left);
|
||||
|
||||
bind(context, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(context, '}', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ')', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ']', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ';', MDFR_NONE, write_and_auto_tab);
|
||||
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);
|
||||
bind(context, '[', MDFR_CTRL, open_long_braces);
|
||||
bind(context, '{', MDFR_CTRL, open_long_braces_semicolon);
|
||||
bind(context, '}', MDFR_CTRL, open_long_braces_break);
|
||||
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);
|
||||
bind(context, '0', MDFR_CTRL, write_zero_struct);
|
||||
bind(context, 'I', MDFR_CTRL, list_all_functions_current_buffer);
|
||||
|
||||
end_map(context);
|
||||
fill_keys_default(context);
|
||||
}
|
||||
|
||||
void
|
||||
mac_default_keys(Bind_Helper *context){
|
||||
// NOTE(allen|a4.0.22): GLOBAL
|
||||
begin_map(context, mapid_global);
|
||||
|
||||
bind(context, 'p', MDFR_CMND, open_panel_vsplit);
|
||||
bind(context, '_', MDFR_CMND, open_panel_hsplit);
|
||||
bind(context, 'P', MDFR_CMND, close_panel);
|
||||
bind(context, ',', MDFR_CMND, change_active_panel);
|
||||
bind(context, '<', MDFR_CMND, change_active_panel_backwards);
|
||||
|
||||
bind(context, 'n', MDFR_CMND, interactive_new);
|
||||
bind(context, 'o', MDFR_CMND, interactive_open_or_new);
|
||||
bind(context, 'o', MDFR_CTRL, open_in_other);
|
||||
bind(context, 'k', MDFR_CMND, interactive_kill_buffer);
|
||||
bind(context, 'i', MDFR_CMND, interactive_switch_buffer);
|
||||
bind(context, 'h', MDFR_CMND, project_go_to_root_directory);
|
||||
bind(context, 'S', MDFR_CMND, save_all_dirty_buffers);
|
||||
|
||||
bind(context, 'c', MDFR_CTRL, open_color_tweaker);
|
||||
bind(context, 'd', MDFR_CTRL, open_debug);
|
||||
|
||||
bind(context, '.', MDFR_CTRL, change_to_build_panel);
|
||||
bind(context, ',', MDFR_CTRL, close_build_panel);
|
||||
bind(context, 'n', MDFR_CTRL, goto_next_error);
|
||||
bind(context, 'N', MDFR_CTRL, goto_prev_error);
|
||||
bind(context, 'M', MDFR_CTRL, goto_first_error);
|
||||
bind(context, 'm', MDFR_CTRL, build_in_build_panel);
|
||||
|
||||
bind(context, 'z', MDFR_CTRL, execute_any_cli);
|
||||
bind(context, 'Z', MDFR_CTRL, execute_previous_cli);
|
||||
|
||||
bind(context, 'x', MDFR_CTRL, execute_arbitrary_command);
|
||||
|
||||
bind(context, 's', MDFR_CTRL, show_scrollbar);
|
||||
bind(context, 'w', MDFR_CTRL, hide_scrollbar);
|
||||
bind(context, 'b', MDFR_CTRL, toggle_filebar);
|
||||
|
||||
bind(context, '@', MDFR_CTRL, toggle_mouse);
|
||||
bind(context, key_page_up, MDFR_CMND, toggle_fullscreen);
|
||||
bind(context, 'E', MDFR_CTRL, exit_4coder);
|
||||
|
||||
bind(context, key_f1, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f2, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f3, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f4, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(context, key_f5, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f6, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f7, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f8, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(context, key_f9, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f10, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f11, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f12, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(context, key_f13, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f14, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f15, MDFR_NONE, project_fkey_command);
|
||||
bind(context, key_f16, MDFR_NONE, project_fkey_command);
|
||||
|
||||
end_map(context);
|
||||
|
||||
// NOTE(allen|a4.0.22): FILE
|
||||
begin_map(context, mapid_file);
|
||||
|
||||
bind_vanilla_keys(context, write_character);
|
||||
bind_vanilla_keys(context, MDFR_ALT, write_character);
|
||||
|
||||
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor);
|
||||
bind(context, key_mouse_left_release, MDFR_NONE, click_set_mark);
|
||||
bind(context, key_mouse_right, MDFR_NONE, click_set_mark);
|
||||
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
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_NONE, page_up);
|
||||
bind(context, key_page_down, MDFR_NONE, page_down);
|
||||
|
||||
bind(context, key_right, MDFR_CMND, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
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_back, MDFR_CMND, backspace_word);
|
||||
bind(context, key_del, MDFR_CMND, delete_word);
|
||||
bind(context, key_back, MDFR_CTRL, snipe_token_or_word);
|
||||
bind(context, key_del, MDFR_CTRL, snipe_token_or_word_right);
|
||||
|
||||
bind(context, '/', MDFR_CMND, set_mark);
|
||||
bind(context, 'a', MDFR_CMND, replace_in_range);
|
||||
bind(context, 'c', MDFR_CMND, copy);
|
||||
bind(context, 'd', MDFR_CMND, delete_range);
|
||||
bind(context, 'e', MDFR_CMND, center_view);
|
||||
bind(context, 'E', MDFR_CMND, left_adjust_view);
|
||||
bind(context, 'f', MDFR_CMND, search);
|
||||
bind(context, 'F', MDFR_CMND, list_all_locations);
|
||||
bind(context, 'F', MDFR_CTRL, list_all_substring_locations_case_insensitive);
|
||||
bind(context, 'g', MDFR_CMND, goto_line);
|
||||
bind(context, 'j', MDFR_CMND, to_lowercase);
|
||||
bind(context, 'K', MDFR_CMND, kill_buffer);
|
||||
bind(context, 'l', MDFR_CMND, toggle_line_wrap);
|
||||
bind(context, 'm', MDFR_CMND, cursor_mark_swap);
|
||||
bind(context, 'O', MDFR_CMND, reopen);
|
||||
bind(context, 'q', MDFR_CMND, query_replace);
|
||||
bind(context, 'Q', MDFR_CMND, query_replace_identifier);
|
||||
bind(context, 'r', MDFR_CMND, reverse_search);
|
||||
bind(context, 's', MDFR_CMND, save);
|
||||
bind(context, 't', MDFR_CMND, search_identifier);
|
||||
bind(context, 'T', MDFR_CMND, list_all_locations_of_identifier);
|
||||
bind(context, 'u', MDFR_CMND, to_uppercase);
|
||||
bind(context, 'v', MDFR_CMND, paste_and_indent);
|
||||
bind(context, 'v', MDFR_CTRL, toggle_virtual_whitespace);
|
||||
bind(context, 'V', MDFR_CMND, paste_next_and_indent);
|
||||
bind(context, 'x', MDFR_CMND, cut);
|
||||
bind(context, 'y', MDFR_CMND, redo);
|
||||
bind(context, 'z', MDFR_CMND, undo);
|
||||
|
||||
bind(context, '2', MDFR_CMND, decrease_line_wrap);
|
||||
bind(context, '3', MDFR_CMND, increase_line_wrap);
|
||||
|
||||
bind(context, '?', MDFR_CMND, toggle_show_whitespace);
|
||||
bind(context, '~', MDFR_CMND, clean_all_lines);
|
||||
bind(context, '\n', MDFR_NONE, newline_or_goto_position);
|
||||
bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel);
|
||||
bind(context, ' ', MDFR_SHIFT, write_character);
|
||||
|
||||
end_map(context);
|
||||
|
||||
// NOTE(allen|a4.0.22): CODE
|
||||
begin_map(context, default_code_map);
|
||||
|
||||
inherit_map(context, mapid_file);
|
||||
|
||||
bind(context, key_right, MDFR_CMND, seek_alphanumeric_or_camel_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_alphanumeric_or_camel_left);
|
||||
|
||||
bind(context, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(context, '}', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ')', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ']', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, ';', MDFR_NONE, write_and_auto_tab);
|
||||
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);
|
||||
bind(context, '[', MDFR_CMND, open_long_braces);
|
||||
bind(context, '{', MDFR_CMND, open_long_braces_semicolon);
|
||||
bind(context, '}', MDFR_CMND, open_long_braces_break);
|
||||
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);
|
||||
bind(context, '0', MDFR_CMND, write_zero_struct);
|
||||
bind(context, 'I', MDFR_CMND, list_all_functions_current_buffer);
|
||||
|
||||
end_map(context);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -394,12 +394,7 @@ Clipboard_Post(Application_Links *app, int32_t clipboard_id, char *str, int32_t
|
|||
DOC_PARAM(clipboard_id, This parameter is set up to prepare for future features, it should always be 0 for now.)
|
||||
DOC_PARAM(str, The str parameter specifies the string to be posted to the clipboard, it need not be null terminated.)
|
||||
DOC_PARAM(len, The len parameter specifies the length of the str string.)
|
||||
DOC
|
||||
(
|
||||
Stores the string str in the clipboard initially with index 0.
|
||||
Also reports the copy to the operating system, so that it may
|
||||
be pasted into other applications.
|
||||
)
|
||||
DOC(Stores the string str in the clipboard initially with index 0. Also reports the copy to the operating system, so that it may be pasted into other applications.)
|
||||
DOC_SEE(The_4coder_Clipboard)
|
||||
*/{
|
||||
Command_Data *cmd = (Command_Data*)app->cmd_context;
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "4cpp/4cpp_lexer.h"
|
||||
|
||||
#include "4ed_linked_node_macros.h"
|
||||
#include "4ed_log.h"
|
||||
|
||||
#include "4ed_font.cpp"
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ debug_gm_free(Debug_GM *general, void *memory){
|
|||
static void*
|
||||
debug_gm_reallocate(Debug_GM *general, void *old, int32_t old_size, int32_t size){
|
||||
void *result = debug_gm_allocate(general, size);
|
||||
memcpy(result, old, old_size);
|
||||
memcpy(result, old, Min(old_size, size));
|
||||
debug_gm_free(general, old);
|
||||
return(result);
|
||||
}
|
||||
|
|
|
@ -3463,15 +3463,6 @@ working_set_clipboard_roll_down(Working_Set *working){
|
|||
return(result);
|
||||
}
|
||||
|
||||
internal void
|
||||
clipboard_copy(System_Functions *system, General_Memory *general, Working_Set *working, Range range, Editing_File *file){
|
||||
i32 size = range.end - range.start;
|
||||
String *dest = working_set_next_clipboard_string(general, working, size);
|
||||
buffer_stringify(&file->state.buffer, range.start, range.end, dest->str);
|
||||
dest->size = size;
|
||||
system->post_clipboard(*dest);
|
||||
}
|
||||
|
||||
internal Edit_Spec
|
||||
file_compute_edit(Mem_Options *mem, Editing_File *file, Buffer_Edit *edits, char *str_base, i32 str_size, Buffer_Edit *inverse_array, char *inv_str, i32 inv_max, i32 edit_count, i32 batch_type){
|
||||
General_Memory *general = &mem->general;
|
||||
|
|
|
@ -448,9 +448,9 @@ Sys_Font_Load_Page_Sig(system_font_load_page, settings, metrics, page, page_numb
|
|||
|
||||
internal
|
||||
Sys_Font_Allocate_Sig(system_font_allocate, size){
|
||||
i64 *size_ptr = 0;
|
||||
umem *size_ptr = 0;
|
||||
void *result = system_memory_allocate(size + sizeof(*size_ptr));
|
||||
size_ptr = (i64*)result;
|
||||
size_ptr = (umem*)result;
|
||||
*size_ptr = size + 4;
|
||||
return(size_ptr + 1);
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ Sys_Font_Allocate_Sig(system_font_allocate, size){
|
|||
internal
|
||||
Sys_Font_Free_Sig(system_font_free, ptr){
|
||||
if (ptr != 0){
|
||||
i64 *size_ptr = ((i64*)ptr) - 1;
|
||||
umem *size_ptr = ((umem*)ptr) - 1;
|
||||
system_memory_free(size_ptr, *size_ptr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,9 @@ internal void fm_slash_fix(char *path);
|
|||
internal char *fm_prepare_string_internal(char *s1, ...);
|
||||
#define fm_str(...) fm_prepare_string_internal(__VA_ARGS__, (void*)0)
|
||||
|
||||
internal char *fm_basic_string_internal(char *s1, ...);
|
||||
#define fm_basic_str(...) fm_basic_string_internal(__VA_ARGS__, (void*)0)
|
||||
|
||||
internal char **fm_prepare_list_internal(char **l1, ...);
|
||||
#define fm_list(...) fm_prepare_list_internal(__VA_ARGS__, (void*)0)
|
||||
|
||||
|
@ -619,6 +622,16 @@ fm__prepare(umem item_size, void *i1, va_list list){
|
|||
return(result);
|
||||
}
|
||||
|
||||
internal char*
|
||||
fm_basic_string_internal(char *s1, ...){
|
||||
umem item_size = sizeof(*s1);
|
||||
va_list list;
|
||||
va_start(list, s1);
|
||||
char *result = (char*)fm__prepare(item_size, s1, list);
|
||||
va_end(list);
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal char*
|
||||
fm_prepare_string_internal(char *s1, ...){
|
||||
umem item_size = sizeof(*s1);
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
|
||||
// TOP
|
||||
|
||||
#define KEYCODES_FILE "4coder_API/keycodes.h"
|
||||
#define STYLE_FILE "4coder_API/style.h"
|
||||
#define KEYCODES_FILE "4coder_generated/keycodes.h"
|
||||
#define STYLE_FILE "4coder_generated/style.h"
|
||||
#define API_H "4coder_generated/app_functions.h"
|
||||
#define REMAPPING_FILE "4coder_generated/remapping.h"
|
||||
|
||||
|
||||
#define API_H "4coder_API/app_functions.h"
|
||||
#define OS_API_H "4ed_os_custom_api.h"
|
||||
|
||||
#include "../4ed_defines.h"
|
||||
|
@ -23,6 +25,7 @@
|
|||
#include "../4coder_lib/4coder_string.h"
|
||||
|
||||
#include "../4cpp/4cpp_lexer.h"
|
||||
#include "../4ed_linked_node_macros.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -34,42 +37,45 @@
|
|||
#include "4ed_meta_keywords.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
char *keys_that_need_codes[] = {
|
||||
"back",
|
||||
"up",
|
||||
"down",
|
||||
"left",
|
||||
"right",
|
||||
"del",
|
||||
"insert",
|
||||
"home",
|
||||
"end",
|
||||
"page_up",
|
||||
"page_down",
|
||||
"esc",
|
||||
#define KEY_LIST(M)\
|
||||
M(back) \
|
||||
M(up) \
|
||||
M(down) \
|
||||
M(left) \
|
||||
M(right) \
|
||||
M(del) \
|
||||
M(insert) \
|
||||
M(home) \
|
||||
M(end) \
|
||||
M(page_up) \
|
||||
M(page_down) \
|
||||
M(esc) \
|
||||
M(mouse_left) \
|
||||
M(mouse_right) \
|
||||
M(mouse_left_release) \
|
||||
M(mouse_right_release) \
|
||||
M(f1) \
|
||||
M(f2) \
|
||||
M(f3) \
|
||||
M(f4) \
|
||||
M(f5) \
|
||||
M(f6) \
|
||||
M(f7) \
|
||||
M(f8) \
|
||||
M(f9) \
|
||||
M(f10) \
|
||||
M(f11) \
|
||||
M(f12) \
|
||||
M(f13) \
|
||||
M(f14) \
|
||||
M(f15) \
|
||||
M(f16)
|
||||
|
||||
"mouse_left",
|
||||
"mouse_right",
|
||||
"mouse_left_release",
|
||||
"mouse_right_release",
|
||||
|
||||
"f1",
|
||||
"f2",
|
||||
"f3",
|
||||
"f4",
|
||||
"f5",
|
||||
"f6",
|
||||
"f7",
|
||||
"f8",
|
||||
|
||||
"f9",
|
||||
"f10",
|
||||
"f11",
|
||||
"f12",
|
||||
"f13",
|
||||
"f14",
|
||||
"f15",
|
||||
"f16",
|
||||
enum{
|
||||
key_enum_kicker_offer = 0xD800 - 1,
|
||||
#define DefKeyEnum(n) key_##n,
|
||||
KEY_LIST(DefKeyEnum)
|
||||
#undef DefKeyEnum
|
||||
};
|
||||
|
||||
internal void
|
||||
|
@ -78,19 +84,12 @@ generate_keycode_enum(){
|
|||
|
||||
char *filename_keycodes = KEYCODES_FILE;
|
||||
|
||||
u16 code = 0xD800;
|
||||
String out = str_alloc(10 << 20);
|
||||
|
||||
i32 count = ArrayCount(keys_that_need_codes);
|
||||
|
||||
append(&out, "enum{\n");
|
||||
for (i32 i = 0; i < count;){
|
||||
append(&out, "key_");
|
||||
append(&out, keys_that_need_codes[i++]);
|
||||
append(&out, " = ");
|
||||
append_int_to_str(&out, code++);
|
||||
append(&out, ",\n");
|
||||
}
|
||||
#define DefKeyEnum(n) append(&out, "key_" #n " = "); append_int_to_str(&out, key_##n); append(&out, ",\n");
|
||||
KEY_LIST(DefKeyEnum)
|
||||
#undef DefKeyEnum
|
||||
append(&out, "};\n");
|
||||
|
||||
append(&out,
|
||||
|
@ -99,15 +98,9 @@ generate_keycode_enum(){
|
|||
"char *result = 0;\n"
|
||||
"switch(key_code){\n");
|
||||
|
||||
for (i32 i = 0; i < count; ++i){
|
||||
append(&out, "case key_");
|
||||
append(&out, keys_that_need_codes[i]);
|
||||
append(&out, ": result = \"");
|
||||
append(&out, keys_that_need_codes[i]);
|
||||
append(&out, "\"; *size = sizeof(\"");
|
||||
append(&out, keys_that_need_codes[i]);
|
||||
append(&out, "\")-1; break;\n");
|
||||
}
|
||||
#define KeyCase(n) append(&out, "case key_" #n ": result = \"key_" #n "\"; *size = sizeof(\"key_" #n "\")-1; break;\n");
|
||||
KEY_LIST(KeyCase)
|
||||
#undef KeyCase
|
||||
|
||||
append(&out,
|
||||
"}\n"
|
||||
|
@ -503,6 +496,769 @@ generate_custom_headers(){
|
|||
fm_end_temp(temp);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Key_Bind{
|
||||
Key_Bind *next;
|
||||
|
||||
b32 vanilla;
|
||||
u32 keycode;
|
||||
u32 modifiers;
|
||||
|
||||
char *command;
|
||||
i32 command_len;
|
||||
};
|
||||
|
||||
struct Sub_Map{
|
||||
Sub_Map *next;
|
||||
|
||||
char *name;
|
||||
i32 name_len;
|
||||
char *description;
|
||||
i32 description_len;
|
||||
char *parent;
|
||||
i32 parent_len;
|
||||
b32 has_vanilla;
|
||||
Key_Bind *first_key_bind;
|
||||
Key_Bind *last_key_bind;
|
||||
i32 key_bind_count;
|
||||
};
|
||||
|
||||
struct Mapping{
|
||||
Mapping *next;
|
||||
|
||||
char *name;
|
||||
i32 name_len;
|
||||
char *description;
|
||||
i32 description_len;
|
||||
Sub_Map *first_sub_map;
|
||||
Sub_Map *last_sub_map;
|
||||
i32 sub_map_count;
|
||||
};
|
||||
|
||||
struct Mapping_Array{
|
||||
Mapping *first_mapping;
|
||||
Mapping *last_mapping;
|
||||
i32 mapping_count;
|
||||
|
||||
Mapping *current_mapping;
|
||||
Sub_Map *current_sub_map;
|
||||
};
|
||||
|
||||
enum{
|
||||
MDFR_NONE = 0x0,
|
||||
MDFR_CTRL = 0x1,
|
||||
MDFR_ALT = 0x2,
|
||||
MDFR_CMND = 0x4,
|
||||
MDFR_SHIFT = 0x8,
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
internal void
|
||||
emit_begin_mapping(Mapping_Array *array, char *name, char *description){
|
||||
Assert(array->current_mapping == 0);
|
||||
|
||||
Mapping *mapping = fm_push_array(Mapping, 1);
|
||||
mapping->name = fm_basic_str(name);
|
||||
mapping->name_len = str_size(name);
|
||||
mapping->description = fm_basic_str(description);
|
||||
mapping->description_len = str_size(description);
|
||||
mapping->first_sub_map = 0;
|
||||
mapping->last_sub_map = 0;
|
||||
mapping->sub_map_count = 0;
|
||||
sll_push(array->first_mapping, array->last_mapping, mapping);
|
||||
++array->mapping_count;
|
||||
array->current_mapping = mapping;
|
||||
}
|
||||
|
||||
internal void
|
||||
emit_end_mapping(Mapping_Array *array){
|
||||
Assert(array->current_mapping != 0);
|
||||
array->current_mapping = 0;
|
||||
}
|
||||
|
||||
internal void
|
||||
emit_begin_map(Mapping_Array *array, char *mapid, char *description){
|
||||
Assert(array->current_mapping != 0);
|
||||
Assert(array->current_sub_map == 0);
|
||||
|
||||
Sub_Map *sub_map = fm_push_array(Sub_Map, 1);
|
||||
sub_map->name = fm_basic_str(mapid);
|
||||
sub_map->name_len = str_size(mapid);
|
||||
sub_map->description = fm_basic_str(description);
|
||||
sub_map->description_len = str_size(description);
|
||||
sub_map->parent = 0;
|
||||
sub_map->parent_len = 0;
|
||||
sub_map->first_key_bind = 0;
|
||||
sub_map->last_key_bind = 0;
|
||||
sub_map->key_bind_count = 0;
|
||||
|
||||
Mapping *mapping = array->current_mapping;
|
||||
sll_push(mapping->first_sub_map, mapping->last_sub_map, sub_map);
|
||||
++mapping->sub_map_count;
|
||||
|
||||
array->current_sub_map = sub_map;
|
||||
}
|
||||
|
||||
internal void
|
||||
emit_end_map(Mapping_Array *array){
|
||||
Assert(array->current_mapping != 0);
|
||||
Assert(array->current_sub_map != 0);
|
||||
array->current_sub_map = 0;
|
||||
}
|
||||
|
||||
internal void
|
||||
emit_inherit_map(Mapping_Array *array, char *mapid){
|
||||
Assert(array->current_mapping != 0);
|
||||
Assert(array->current_sub_map != 0);
|
||||
|
||||
Sub_Map *sub_map = array->current_sub_map;
|
||||
Assert(sub_map->parent == 0);
|
||||
|
||||
sub_map->parent = fm_basic_str(mapid);
|
||||
sub_map->parent_len = str_size(mapid);
|
||||
}
|
||||
|
||||
internal void
|
||||
emit_bind(Mapping_Array *array, u32 keycode, u32 modifiers, char *command){
|
||||
Assert(array->current_mapping != 0);
|
||||
Assert(array->current_sub_map != 0);
|
||||
|
||||
b32 is_duplicate = false;
|
||||
Sub_Map *sub_map = array->current_sub_map;
|
||||
for (Key_Bind *bind = sub_map->first_key_bind;
|
||||
bind != 0;
|
||||
bind = bind->next){
|
||||
if (!bind->vanilla && keycode == bind->keycode && modifiers == bind->modifiers){
|
||||
fprintf(stdout, "duplicate binding for %u %u\n", keycode, modifiers);
|
||||
is_duplicate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_duplicate){
|
||||
Key_Bind *bind = fm_push_array(Key_Bind, 1);
|
||||
bind->vanilla = false;
|
||||
bind->keycode = keycode;
|
||||
bind->modifiers = modifiers;
|
||||
bind->command = fm_basic_str(command);
|
||||
bind->command_len = str_size(command);
|
||||
sll_push(sub_map->first_key_bind, sub_map->last_key_bind, bind);
|
||||
++sub_map->key_bind_count;
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
emit_bind_vanilla_keys(Mapping_Array *array, u32 modifiers, char *command){
|
||||
Assert(array->current_mapping != 0);
|
||||
Assert(array->current_sub_map != 0);
|
||||
|
||||
b32 is_duplicate = false;
|
||||
Sub_Map *sub_map = array->current_sub_map;
|
||||
for (Key_Bind *bind = sub_map->first_key_bind;
|
||||
bind != 0;
|
||||
bind = bind->next){
|
||||
if (bind->vanilla && modifiers == bind->modifiers){
|
||||
fprintf(stdout, "duplicate vanilla binding %u\n", modifiers);
|
||||
is_duplicate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_duplicate){
|
||||
Key_Bind *bind = fm_push_array(Key_Bind, 1);
|
||||
bind->vanilla = true;
|
||||
bind->keycode = 0;
|
||||
bind->modifiers = modifiers;
|
||||
bind->command = fm_basic_str(command);
|
||||
bind->command_len = str_size(command);
|
||||
sll_push(sub_map->first_key_bind, sub_map->last_key_bind, bind);
|
||||
++sub_map->key_bind_count;
|
||||
}
|
||||
}
|
||||
|
||||
#define begin_mapping(mp,n,d) emit_begin_mapping(mp, #n, d)
|
||||
#define end_mapping(mp) emit_end_mapping(mp)
|
||||
#define begin_map(mp,mapid,d) emit_begin_map(mp, #mapid, d)
|
||||
#define end_map(mp) emit_end_map(mp)
|
||||
#define inherit_map(mp,mapid) emit_inherit_map(mp, #mapid)
|
||||
#define bind(mp,k,md,c) emit_bind(mp, k, md, #c)
|
||||
#define bind_vanilla_keys(mp,md,c) emit_bind_vanilla_keys(mp, md, #c)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
internal void
|
||||
generate_remapping_code_and_data(){
|
||||
Temp temp = fm_begin_temp();
|
||||
|
||||
// Generate mapping array data structure
|
||||
Mapping_Array mappings_ = {0};
|
||||
Mapping_Array *mappings = &mappings_;
|
||||
|
||||
begin_mapping(mappings, default, "TODO");
|
||||
{
|
||||
// NOTE(allen): GLOBAL
|
||||
begin_map(mappings, mapid_global, "TODO");
|
||||
|
||||
bind(mappings, 'p', MDFR_CTRL, open_panel_vsplit);
|
||||
bind(mappings, '_', MDFR_CTRL, open_panel_hsplit);
|
||||
bind(mappings, 'P', MDFR_CTRL, close_panel);
|
||||
bind(mappings, ',', MDFR_CTRL, change_active_panel);
|
||||
bind(mappings, '<', MDFR_CTRL, change_active_panel_backwards);
|
||||
|
||||
bind(mappings, 'n', MDFR_CTRL, interactive_new);
|
||||
bind(mappings, 'o', MDFR_CTRL, interactive_open_or_new);
|
||||
bind(mappings, 'o', MDFR_ALT, open_in_other);
|
||||
bind(mappings, 'k', MDFR_CTRL, interactive_kill_buffer);
|
||||
bind(mappings, 'i', MDFR_CTRL, interactive_switch_buffer);
|
||||
bind(mappings, 'h', MDFR_CTRL, project_go_to_root_directory);
|
||||
bind(mappings, 'S', MDFR_CTRL, save_all_dirty_buffers);
|
||||
|
||||
bind(mappings, 'c', MDFR_ALT, open_color_tweaker);
|
||||
bind(mappings, 'd', MDFR_ALT, open_debug);
|
||||
|
||||
bind(mappings, '.', MDFR_ALT, change_to_build_panel);
|
||||
bind(mappings, ',', MDFR_ALT, close_build_panel);
|
||||
bind(mappings, 'n', MDFR_ALT, goto_next_error);
|
||||
bind(mappings, 'N', MDFR_ALT, goto_prev_error);
|
||||
bind(mappings, 'M', MDFR_ALT, goto_first_error);
|
||||
bind(mappings, 'm', MDFR_ALT, build_in_build_panel);
|
||||
|
||||
bind(mappings, 'z', MDFR_ALT, execute_any_cli);
|
||||
bind(mappings, 'Z', MDFR_ALT, execute_previous_cli);
|
||||
|
||||
bind(mappings, 'x', MDFR_ALT, execute_arbitrary_command);
|
||||
|
||||
bind(mappings, 's', MDFR_ALT, show_scrollbar);
|
||||
bind(mappings, 'w', MDFR_ALT, hide_scrollbar);
|
||||
bind(mappings, 'b', MDFR_ALT, toggle_filebar);
|
||||
|
||||
bind(mappings, '@', MDFR_ALT, toggle_mouse);
|
||||
bind(mappings, key_page_up, MDFR_CTRL, toggle_fullscreen);
|
||||
bind(mappings, 'E', MDFR_ALT, exit_4coder);
|
||||
|
||||
bind(mappings, key_f1, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f2, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f3, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f4, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(mappings, key_f5, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f6, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f7, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f8, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(mappings, key_f9, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f10, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f11, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f12, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(mappings, key_f13, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f14, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f15, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f16, MDFR_NONE, project_fkey_command);
|
||||
|
||||
end_map(mappings);
|
||||
|
||||
// NOTE(allen): FILE
|
||||
begin_map(mappings, mapid_file, "TODO");
|
||||
|
||||
bind_vanilla_keys(mappings, MDFR_NONE, write_character);
|
||||
|
||||
bind(mappings, key_mouse_left, MDFR_NONE, click_set_cursor);
|
||||
bind(mappings, key_mouse_left_release, MDFR_NONE, click_set_mark);
|
||||
bind(mappings, key_mouse_right, MDFR_NONE, click_set_mark);
|
||||
|
||||
bind(mappings, key_left, MDFR_NONE, move_left);
|
||||
bind(mappings, key_right, MDFR_NONE, move_right);
|
||||
bind(mappings, key_del, MDFR_NONE, delete_char);
|
||||
bind(mappings, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(mappings, key_back, MDFR_NONE, backspace_char);
|
||||
bind(mappings, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(mappings, key_up, MDFR_NONE, move_up);
|
||||
bind(mappings, key_down, MDFR_NONE, move_down);
|
||||
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_NONE, page_up);
|
||||
bind(mappings, key_page_down, MDFR_NONE, page_down);
|
||||
|
||||
bind(mappings, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
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_up, MDFR_ALT, move_up_10);
|
||||
bind(mappings, key_down, MDFR_ALT, move_down_10);
|
||||
|
||||
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);
|
||||
bind(mappings, key_del, MDFR_ALT, snipe_token_or_word_right);
|
||||
|
||||
bind(mappings, ' ', MDFR_CTRL, set_mark);
|
||||
bind(mappings, 'a', MDFR_CTRL, replace_in_range);
|
||||
bind(mappings, 'c', MDFR_CTRL, copy);
|
||||
bind(mappings, 'd', MDFR_CTRL, delete_range);
|
||||
bind(mappings, 'e', MDFR_CTRL, center_view);
|
||||
bind(mappings, 'E', MDFR_CTRL, left_adjust_view);
|
||||
bind(mappings, 'f', MDFR_CTRL, search);
|
||||
bind(mappings, 'F', MDFR_CTRL, list_all_locations);
|
||||
bind(mappings, 'F', MDFR_ALT , list_all_substring_locations_case_insensitive);
|
||||
bind(mappings, 'g', MDFR_CTRL, goto_line);
|
||||
bind(mappings, 'j', MDFR_CTRL, to_lowercase);
|
||||
bind(mappings, 'K', MDFR_CTRL, kill_buffer);
|
||||
bind(mappings, 'l', MDFR_CTRL, toggle_line_wrap);
|
||||
bind(mappings, 'm', MDFR_CTRL, cursor_mark_swap);
|
||||
bind(mappings, 'O', MDFR_CTRL, reopen);
|
||||
bind(mappings, 'q', MDFR_CTRL, query_replace);
|
||||
bind(mappings, 'Q', MDFR_CTRL, query_replace_identifier);
|
||||
bind(mappings, 'r', MDFR_CTRL, reverse_search);
|
||||
bind(mappings, 's', MDFR_CTRL, save);
|
||||
bind(mappings, 't', MDFR_CTRL, search_identifier);
|
||||
bind(mappings, 'T', MDFR_CTRL, list_all_locations_of_identifier);
|
||||
bind(mappings, 'u', MDFR_CTRL, to_uppercase);
|
||||
bind(mappings, 'v', MDFR_CTRL, paste_and_indent);
|
||||
bind(mappings, 'v', MDFR_ALT , toggle_virtual_whitespace);
|
||||
bind(mappings, 'V', MDFR_CTRL, paste_next_and_indent);
|
||||
bind(mappings, 'x', MDFR_CTRL, cut);
|
||||
bind(mappings, 'y', MDFR_CTRL, redo);
|
||||
bind(mappings, 'z', MDFR_CTRL, undo);
|
||||
|
||||
bind(mappings, '2', MDFR_CTRL, decrease_line_wrap);
|
||||
bind(mappings, '3', MDFR_CTRL, increase_line_wrap);
|
||||
|
||||
bind(mappings, '?', MDFR_CTRL, toggle_show_whitespace);
|
||||
bind(mappings, '~', MDFR_CTRL, clean_all_lines);
|
||||
bind(mappings, '\n', MDFR_NONE, newline_or_goto_position);
|
||||
bind(mappings, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel);
|
||||
bind(mappings, ' ', MDFR_SHIFT, write_character);
|
||||
|
||||
end_map(mappings);
|
||||
|
||||
// NOTE(allen): CODE
|
||||
begin_map(mappings, default_code_map, "TODO");
|
||||
|
||||
inherit_map(mappings, mapid_file);
|
||||
|
||||
bind(mappings, key_right, MDFR_CTRL, seek_alphanumeric_or_camel_right);
|
||||
bind(mappings, key_left, MDFR_CTRL, seek_alphanumeric_or_camel_left);
|
||||
|
||||
bind(mappings, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(mappings, '}', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, ')', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, ']', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, ';', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, '#', MDFR_NONE, write_and_auto_tab);
|
||||
|
||||
bind(mappings, '\t', MDFR_NONE, word_complete);
|
||||
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);
|
||||
bind(mappings, '[', MDFR_CTRL, open_long_braces);
|
||||
bind(mappings, '{', MDFR_CTRL, open_long_braces_semicolon);
|
||||
bind(mappings, '}', MDFR_CTRL, open_long_braces_break);
|
||||
bind(mappings, 'i', MDFR_ALT, if0_off);
|
||||
bind(mappings, '1', MDFR_ALT, open_file_in_quotes);
|
||||
bind(mappings, '2', MDFR_ALT, open_matching_file_cpp);
|
||||
bind(mappings, '0', MDFR_CTRL, write_zero_struct);
|
||||
bind(mappings, 'I', MDFR_CTRL, list_all_functions_current_buffer);
|
||||
|
||||
end_map(mappings);
|
||||
}
|
||||
end_mapping(mappings);
|
||||
|
||||
begin_mapping(mappings, mac_default, "TODO");
|
||||
{
|
||||
// NOTE(allen): GLOBAL
|
||||
begin_map(mappings, mapid_global, "TODO");
|
||||
|
||||
bind(mappings, 'p', MDFR_CMND, open_panel_vsplit);
|
||||
bind(mappings, '_', MDFR_CMND, open_panel_hsplit);
|
||||
bind(mappings, 'P', MDFR_CMND, close_panel);
|
||||
bind(mappings, ',', MDFR_CMND, change_active_panel);
|
||||
bind(mappings, '<', MDFR_CMND, change_active_panel_backwards);
|
||||
|
||||
bind(mappings, 'n', MDFR_CMND, interactive_new);
|
||||
bind(mappings, 'o', MDFR_CMND, interactive_open_or_new);
|
||||
bind(mappings, 'o', MDFR_CTRL, open_in_other);
|
||||
bind(mappings, 'k', MDFR_CMND, interactive_kill_buffer);
|
||||
bind(mappings, 'i', MDFR_CMND, interactive_switch_buffer);
|
||||
bind(mappings, 'h', MDFR_CMND, project_go_to_root_directory);
|
||||
bind(mappings, 'S', MDFR_CMND, save_all_dirty_buffers);
|
||||
|
||||
bind(mappings, 'c', MDFR_CTRL, open_color_tweaker);
|
||||
bind(mappings, 'd', MDFR_CTRL, open_debug);
|
||||
|
||||
bind(mappings, '.', MDFR_CTRL, change_to_build_panel);
|
||||
bind(mappings, ',', MDFR_CTRL, close_build_panel);
|
||||
bind(mappings, 'n', MDFR_CTRL, goto_next_error);
|
||||
bind(mappings, 'N', MDFR_CTRL, goto_prev_error);
|
||||
bind(mappings, 'M', MDFR_CTRL, goto_first_error);
|
||||
bind(mappings, 'm', MDFR_CTRL, build_in_build_panel);
|
||||
|
||||
bind(mappings, 'z', MDFR_CTRL, execute_any_cli);
|
||||
bind(mappings, 'Z', MDFR_CTRL, execute_previous_cli);
|
||||
|
||||
bind(mappings, 'x', MDFR_CTRL, execute_arbitrary_command);
|
||||
|
||||
bind(mappings, 's', MDFR_CTRL, show_scrollbar);
|
||||
bind(mappings, 'w', MDFR_CTRL, hide_scrollbar);
|
||||
bind(mappings, 'b', MDFR_CTRL, toggle_filebar);
|
||||
|
||||
bind(mappings, '@', MDFR_CTRL, toggle_mouse);
|
||||
bind(mappings, key_page_up, MDFR_CMND, toggle_fullscreen);
|
||||
bind(mappings, 'E', MDFR_CTRL, exit_4coder);
|
||||
|
||||
bind(mappings, key_f1, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f2, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f3, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f4, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(mappings, key_f5, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f6, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f7, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f8, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(mappings, key_f9, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f10, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f11, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f12, MDFR_NONE, project_fkey_command);
|
||||
|
||||
bind(mappings, key_f13, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f14, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f15, MDFR_NONE, project_fkey_command);
|
||||
bind(mappings, key_f16, MDFR_NONE, project_fkey_command);
|
||||
|
||||
end_map(mappings);
|
||||
|
||||
// NOTE(allen): FILE
|
||||
begin_map(mappings, mapid_file, "TODO");
|
||||
|
||||
bind_vanilla_keys(mappings, MDFR_NONE, write_character);
|
||||
bind_vanilla_keys(mappings, MDFR_ALT, write_character);
|
||||
|
||||
bind(mappings, key_mouse_left, MDFR_NONE, click_set_cursor);
|
||||
bind(mappings, key_mouse_left_release, MDFR_NONE, click_set_mark);
|
||||
bind(mappings, key_mouse_right, MDFR_NONE, click_set_mark);
|
||||
|
||||
bind(mappings, key_left, MDFR_NONE, move_left);
|
||||
bind(mappings, key_right, MDFR_NONE, move_right);
|
||||
bind(mappings, key_del, MDFR_NONE, delete_char);
|
||||
bind(mappings, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(mappings, key_back, MDFR_NONE, backspace_char);
|
||||
bind(mappings, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(mappings, key_up, MDFR_NONE, move_up);
|
||||
bind(mappings, key_down, MDFR_NONE, move_down);
|
||||
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_NONE, page_up);
|
||||
bind(mappings, key_page_down, MDFR_NONE, page_down);
|
||||
|
||||
bind(mappings, key_right, MDFR_CMND, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
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_back, MDFR_CMND, backspace_word);
|
||||
bind(mappings, key_del, MDFR_CMND, delete_word);
|
||||
bind(mappings, key_back, MDFR_CTRL, snipe_token_or_word);
|
||||
bind(mappings, key_del, MDFR_CTRL, snipe_token_or_word_right);
|
||||
|
||||
bind(mappings, '/', MDFR_CMND, set_mark);
|
||||
bind(mappings, 'a', MDFR_CMND, replace_in_range);
|
||||
bind(mappings, 'c', MDFR_CMND, copy);
|
||||
bind(mappings, 'd', MDFR_CMND, delete_range);
|
||||
bind(mappings, 'e', MDFR_CMND, center_view);
|
||||
bind(mappings, 'E', MDFR_CMND, left_adjust_view);
|
||||
bind(mappings, 'f', MDFR_CMND, search);
|
||||
bind(mappings, 'F', MDFR_CMND, list_all_locations);
|
||||
bind(mappings, 'F', MDFR_CTRL, list_all_substring_locations_case_insensitive);
|
||||
bind(mappings, 'g', MDFR_CMND, goto_line);
|
||||
bind(mappings, 'j', MDFR_CMND, to_lowercase);
|
||||
bind(mappings, 'K', MDFR_CMND, kill_buffer);
|
||||
bind(mappings, 'l', MDFR_CMND, toggle_line_wrap);
|
||||
bind(mappings, 'm', MDFR_CMND, cursor_mark_swap);
|
||||
bind(mappings, 'O', MDFR_CMND, reopen);
|
||||
bind(mappings, 'q', MDFR_CMND, query_replace);
|
||||
bind(mappings, 'Q', MDFR_CMND, query_replace_identifier);
|
||||
bind(mappings, 'r', MDFR_CMND, reverse_search);
|
||||
bind(mappings, 's', MDFR_CMND, save);
|
||||
bind(mappings, 't', MDFR_CMND, search_identifier);
|
||||
bind(mappings, 'T', MDFR_CMND, list_all_locations_of_identifier);
|
||||
bind(mappings, 'u', MDFR_CMND, to_uppercase);
|
||||
bind(mappings, 'v', MDFR_CMND, paste_and_indent);
|
||||
bind(mappings, 'v', MDFR_CTRL, toggle_virtual_whitespace);
|
||||
bind(mappings, 'V', MDFR_CMND, paste_next_and_indent);
|
||||
bind(mappings, 'x', MDFR_CMND, cut);
|
||||
bind(mappings, 'y', MDFR_CMND, redo);
|
||||
bind(mappings, 'z', MDFR_CMND, undo);
|
||||
|
||||
bind(mappings, '2', MDFR_CMND, decrease_line_wrap);
|
||||
bind(mappings, '3', MDFR_CMND, increase_line_wrap);
|
||||
|
||||
bind(mappings, '?', MDFR_CMND, toggle_show_whitespace);
|
||||
bind(mappings, '~', MDFR_CMND, clean_all_lines);
|
||||
bind(mappings, '\n', MDFR_NONE, newline_or_goto_position);
|
||||
bind(mappings, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel);
|
||||
bind(mappings, ' ', MDFR_SHIFT, write_character);
|
||||
|
||||
end_map(mappings);
|
||||
|
||||
// NOTE(allen): CODE
|
||||
begin_map(mappings, default_code_map, "TODO");
|
||||
|
||||
inherit_map(mappings, mapid_file);
|
||||
|
||||
bind(mappings, key_right, MDFR_CMND, seek_alphanumeric_or_camel_right);
|
||||
bind(mappings, key_left, MDFR_CMND, seek_alphanumeric_or_camel_left);
|
||||
|
||||
bind(mappings, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(mappings, '}', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, ')', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, ']', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, ';', MDFR_NONE, write_and_auto_tab);
|
||||
bind(mappings, '#', MDFR_NONE, write_and_auto_tab);
|
||||
|
||||
bind(mappings, '\t', MDFR_NONE, word_complete);
|
||||
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);
|
||||
bind(mappings, '[', MDFR_CMND, open_long_braces);
|
||||
bind(mappings, '{', MDFR_CMND, open_long_braces_semicolon);
|
||||
bind(mappings, '}', MDFR_CMND, open_long_braces_break);
|
||||
bind(mappings, 'i', MDFR_CTRL, if0_off);
|
||||
bind(mappings, '1', MDFR_CTRL, open_file_in_quotes);
|
||||
bind(mappings, '2', MDFR_CTRL, open_matching_file_cpp);
|
||||
bind(mappings, '0', MDFR_CMND, write_zero_struct);
|
||||
bind(mappings, 'I', MDFR_CMND, list_all_functions_current_buffer);
|
||||
|
||||
end_map(mappings);
|
||||
}
|
||||
end_mapping(mappings);
|
||||
|
||||
// Generate remapping from mapping array
|
||||
FILE *out = fopen(REMAPPING_FILE, "wb");
|
||||
if (out != 0){
|
||||
|
||||
fprintf(out, "#if defined(CUSTOM_COMMAND_SIG)\n");
|
||||
for (Mapping *mapping = mappings->first_mapping;
|
||||
mapping != 0;
|
||||
mapping = mapping->next){
|
||||
fprintf(out, "void fill_keys_%s(Bind_Helper *context){\n", mapping->name);
|
||||
|
||||
for (Sub_Map *sub_map = mapping->first_sub_map;
|
||||
sub_map != 0;
|
||||
sub_map = sub_map->next){
|
||||
fprintf(out, "begin_map(context, %s);\n", sub_map->name);
|
||||
|
||||
if (sub_map->parent != 0){
|
||||
fprintf(out, "inherit_map(context, %s);\n", sub_map->parent);
|
||||
}
|
||||
|
||||
for (Key_Bind *bind = sub_map->first_key_bind;
|
||||
bind != 0;
|
||||
bind = bind->next){
|
||||
char mdfr_str[256];
|
||||
String m = make_fixed_width_string(mdfr_str);
|
||||
b32 has_base = false;
|
||||
|
||||
if (bind->modifiers & MDFR_CTRL){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_CTRL");
|
||||
}
|
||||
if (bind->modifiers & MDFR_ALT){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_ALT");
|
||||
}
|
||||
if (bind->modifiers & MDFR_CMND){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_CMND");
|
||||
}
|
||||
if (bind->modifiers & MDFR_SHIFT){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_SHIFT");
|
||||
}
|
||||
if (bind->modifiers == 0){
|
||||
append(&m, "MDFR_NONE");
|
||||
}
|
||||
terminate_with_null(&m);
|
||||
|
||||
if (bind->vanilla){
|
||||
if (bind->modifiers == 0){
|
||||
fprintf(out, "bind_vanilla_keys(context, %s);\n", bind->command);
|
||||
}
|
||||
else{
|
||||
fprintf(out, "bind_vanilla_keys(context, %s, %s);\n", mdfr_str, bind->command);
|
||||
}
|
||||
}
|
||||
else{
|
||||
char key_str_space[16];
|
||||
char *key_str = 0;
|
||||
switch (bind->keycode){
|
||||
#define KeyCase(n) case key_##n: key_str = "key_" #n; break;
|
||||
KEY_LIST(KeyCase)
|
||||
#undef KeyCase
|
||||
}
|
||||
|
||||
if (key_str == 0){
|
||||
key_str = key_str_space;
|
||||
if (bind->keycode == '\n'){
|
||||
memcpy(key_str_space, "'\\n'", 5);
|
||||
}
|
||||
else if (bind->keycode == '\t'){
|
||||
memcpy(key_str_space, "'\\t'", 5);
|
||||
}
|
||||
else if (bind->keycode == '\''){
|
||||
memcpy(key_str_space, "'\\''", 5);
|
||||
}
|
||||
else if (bind->keycode == '\\'){
|
||||
memcpy(key_str_space, "'\\\\'", 5);
|
||||
}
|
||||
else{
|
||||
Assert(bind->keycode <= 127);
|
||||
key_str_space[0] = '\'';
|
||||
key_str_space[1] = (char)bind->keycode;
|
||||
key_str_space[2] = '\'';
|
||||
key_str_space[3] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(out, "bind(context, %s, %s, %s);\n",
|
||||
key_str,
|
||||
mdfr_str,
|
||||
bind->command);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(out, "end_map(context);\n");
|
||||
}
|
||||
|
||||
fprintf(out, "}\n");
|
||||
}
|
||||
fprintf(out, "#endif\n");
|
||||
|
||||
fprintf(out,
|
||||
"#if defined(CUSTOM_COMMAND_SIG)\n"
|
||||
"#define LINK_PROCS(x) x\n"
|
||||
"#else\n"
|
||||
"#define LINK_PROCS(x)\n"
|
||||
"#endif\n");
|
||||
|
||||
fprintf(out,
|
||||
"struct Meta_Key_Bind{\n"
|
||||
"int32_t vanilla;\n"
|
||||
"uint32_t keycode;\n"
|
||||
"uint32_t modifiers;\n"
|
||||
"char *command;\n"
|
||||
"int32_t command_len;\n"
|
||||
"LINK_PROCS(Custom_Command_Function *proc;)\n"
|
||||
"};\n"
|
||||
"struct Meta_Sub_Map{\n"
|
||||
"char *name;\n"
|
||||
"int32_t name_len;\n"
|
||||
"char *description;\n"
|
||||
"int32_t description_len;\n"
|
||||
"char *parent;\n"
|
||||
"int32_t parent_len;\n"
|
||||
"Meta_Key_Bind *binds;\n"
|
||||
"int32_t bind_count;\n"
|
||||
"};\n"
|
||||
"struct Meta_Mapping{\n"
|
||||
"char *name;\n"
|
||||
"int32_t name_len;\n"
|
||||
"char *description;\n"
|
||||
"int32_t description_len;\n"
|
||||
"Meta_Sub_Map *sub_maps;\n"
|
||||
"int32_t sub_map_count;\n"
|
||||
"LINK_PROCS(void (*fill_keys_proc)(Bind_Helper *context);)\n"
|
||||
"};\n");
|
||||
|
||||
for (Mapping *mapping = mappings->first_mapping;
|
||||
mapping != 0;
|
||||
mapping = mapping->next){
|
||||
for (Sub_Map *sub_map = mapping->first_sub_map;
|
||||
sub_map != 0;
|
||||
sub_map = sub_map->next){
|
||||
if (sub_map->key_bind_count > 0){
|
||||
fprintf(out, "static Meta_Key_Bind fcoder_binds_for_%s_%s[%d] = {\n",
|
||||
mapping->name, sub_map->name, sub_map->key_bind_count);
|
||||
for (Key_Bind *bind = sub_map->first_key_bind;
|
||||
bind != 0;
|
||||
bind = bind->next){
|
||||
fprintf(out,
|
||||
"{%d, %u, %u, \"%s\", %d, LINK_PROCS(%s)},\n",
|
||||
bind->vanilla, bind->keycode, bind->modifiers,
|
||||
bind->command, bind->command_len,
|
||||
bind->command);
|
||||
}
|
||||
fprintf(out, "};\n");
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(out, "static Meta_Sub_Map fcoder_submaps_for_%s[%d] = {\n",
|
||||
mapping->name, mapping->sub_map_count);
|
||||
for (Sub_Map *sub_map = mapping->first_sub_map;
|
||||
sub_map != 0;
|
||||
sub_map = sub_map->next){
|
||||
if (sub_map->parent != 0){
|
||||
fprintf(out, "{\"%s\", %d, \"%s\", %d, \"%s\", %d, fcoder_binds_for_%s_%s, %d},\n",
|
||||
sub_map->name, sub_map->name_len,
|
||||
sub_map->description, sub_map->description_len,
|
||||
sub_map->parent, sub_map->parent_len,
|
||||
mapping->name, sub_map->name,
|
||||
sub_map->key_bind_count);
|
||||
}
|
||||
else{
|
||||
fprintf(out, "{\"%s\", %d, \"%s\", %d, 0, 0, fcoder_binds_for_%s_%s, %d},\n",
|
||||
sub_map->name, sub_map->name_len,
|
||||
sub_map->description, sub_map->description_len,
|
||||
mapping->name, sub_map->name,
|
||||
sub_map->key_bind_count);
|
||||
}
|
||||
}
|
||||
fprintf(out, "};\n");
|
||||
}
|
||||
|
||||
fprintf(out, "static Meta_Mapping fcoder_meta_maps[%d] = {\n",
|
||||
mappings->mapping_count);
|
||||
for (Mapping *mapping = mappings->first_mapping;
|
||||
mapping != 0;
|
||||
mapping = mapping->next){
|
||||
fprintf(out, "{\"%s\", %d, \"%s\", %d, fcoder_submaps_for_%s, %d, LINK_PROCS(fill_keys_%s)},\n",
|
||||
mapping->name, mapping->name_len,
|
||||
mapping->description, mapping->description_len,
|
||||
mapping->name,
|
||||
mapping->sub_map_count,
|
||||
mapping->name);
|
||||
}
|
||||
fprintf(out, "};\n");
|
||||
|
||||
fclose(out);
|
||||
}
|
||||
|
||||
fm_end_temp(temp);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char **argv){
|
||||
META_BEGIN();
|
||||
|
||||
|
@ -510,6 +1266,7 @@ int main(int argc, char **argv){
|
|||
generate_keycode_enum();
|
||||
generate_style();
|
||||
generate_custom_headers();
|
||||
generate_remapping_code_and_data();
|
||||
|
||||
META_FINISH();
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include "4coder_lib/4coder_utf8.h"
|
||||
|
||||
#if defined(FRED_SUPER)
|
||||
# include "4coder_API/keycodes.h"
|
||||
# include "4coder_API/style.h"
|
||||
# include "4coder_generated/keycodes.h"
|
||||
# include "4coder_generated/style.h"
|
||||
|
||||
# define FSTRING_IMPLEMENTATION
|
||||
# include "4coder_lib/4coder_string.h"
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include "4coder_lib/4coder_utf8.h"
|
||||
|
||||
#if defined(FRED_SUPER)
|
||||
# include "4coder_API/keycodes.h"
|
||||
# include "4coder_API/style.h"
|
||||
# include "4coder_generated/keycodes.h"
|
||||
# include "4coder_generated/style.h"
|
||||
|
||||
# define FSTRING_IMPLEMENTATION
|
||||
# include "4coder_lib/4coder_string.h"
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#include "4coder_lib/4coder_utf8.h"
|
||||
|
||||
#if defined(FRED_SUPER)
|
||||
# include "4coder_API/keycodes.h"
|
||||
# include "4coder_API/style.h"
|
||||
# include "4coder_generated/keycodes.h"
|
||||
# include "4coder_generated/style.h"
|
||||
|
||||
# define FSTRING_IMPLEMENTATION
|
||||
# include "4coder_lib/4coder_string.h"
|
||||
|
@ -309,12 +309,10 @@ win32_post_clipboard(char *text, i32 len){
|
|||
|
||||
internal
|
||||
Sys_Post_Clipboard_Sig(system_post_clipboard){
|
||||
LOG("Beginning clipboard post\n");
|
||||
Partition *part = &win32vars.clip_post_part;
|
||||
part->pos = 0;
|
||||
u8 *post = (u8*)sysshared_push_block(part, str.size + 1);
|
||||
if (post != 0){
|
||||
LOG("Copying post to clipboard buffer\n");
|
||||
memcpy(post, str.str, str.size);
|
||||
post[str.size] = 0;
|
||||
win32vars.clip_post_len = str.size;
|
||||
|
@ -322,7 +320,6 @@ Sys_Post_Clipboard_Sig(system_post_clipboard){
|
|||
else{
|
||||
LOGF("Failed to allocate buffer for clipboard post (%d)\n", str.size + 1);
|
||||
}
|
||||
LOG("Finished clipboard post\n");
|
||||
}
|
||||
|
||||
internal b32
|
||||
|
@ -571,7 +568,7 @@ struct Win32_Font_Enum{
|
|||
Font_Setup_List *list;
|
||||
};
|
||||
|
||||
internal int
|
||||
int CALL_CONVENTION
|
||||
win32_font_enum_callback(
|
||||
const LOGFONT *lpelfe,
|
||||
const TEXTMETRIC *lpntme,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* 25.02.2016
|
||||
*
|
||||
* File editing view for 4coder
|
||||
* Document data structure and generator for 4coder documentation.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -34,8 +34,219 @@
|
|||
#include "../meta/4ed_meta_keywords.h"
|
||||
#include "4ed_abstract_document.cpp"
|
||||
|
||||
#include "../4coder_generated/command_metadata.h"
|
||||
#include "../4coder_generated/remapping.h"
|
||||
#include "../4coder_generated/keycodes.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
internal void
|
||||
copy_and_fix_name(char *src, char *dst, int32_t cap){
|
||||
String s = make_string_cap(dst, 0, cap);
|
||||
copy(&s, src);
|
||||
replace_char(&s, '_', '-');
|
||||
terminate_with_null(&s);
|
||||
}
|
||||
|
||||
enum{
|
||||
MDFR_NONE = 0x0,
|
||||
MDFR_CTRL = 0x1,
|
||||
MDFR_ALT = 0x2,
|
||||
MDFR_CMND = 0x4,
|
||||
MDFR_SHIFT = 0x8,
|
||||
};
|
||||
|
||||
global char long_commands_str[] = R"foo(
|
||||
\SECTION{4coder Long Command}
|
||||
Long name commands that can be typed in after using the "long command" command for infrequently triggered commands.
|
||||
\LIST
|
||||
\ITEM \STYLE{code} "load project" \END Load a project.4coder file, ditching any previously loaded project
|
||||
\ITEM \STYLE{code} "open all code" \END Open all code files in the current directory, extensions set in config.4coder, default to C/C++ extensions
|
||||
\ITEM \STYLE{code} "open all code recursive" \END Like \STYLE{code} "open all code" \END but recurses through folders
|
||||
\ITEM \STYLE{code} "dos lines" \END Switch the buffer to 'dos' line ending mode CRLF
|
||||
\ITEM \STYLE{code} "nix lines" \END Switch the buffer to 'nix' line ending mode LF
|
||||
\ITEM \STYLE{code} "remap" \END Change to one of the built in command bindings
|
||||
\ITEM \STYLE{code} "new project" \END Setup a new project.4coder and accompanying build scripts
|
||||
\END
|
||||
\END
|
||||
)foo";
|
||||
|
||||
internal void
|
||||
generate_binding_list(char *code_directory, char *src_directory){
|
||||
char full_path[512];
|
||||
String s = make_fixed_width_string(full_path);
|
||||
append(&s, src_directory);
|
||||
if (s.size == 0 || !char_is_slash(s.str[s.size - 1])){
|
||||
append(&s, "/");
|
||||
}
|
||||
append(&s, "binding_list.txt");
|
||||
terminate_with_null(&s);
|
||||
|
||||
FILE *out = fopen(full_path, "wb");
|
||||
if (out == 0){
|
||||
fprintf(stdout, "could not open binding_list.txt for auto synchronized binding info\n");
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(out, "\n\\INCLUDE{site_header.txt}\n");
|
||||
fprintf(out, "\n4coder version \\VERSION\n");
|
||||
|
||||
fprintf(out, "\n\\SECTION{Built in Bindings}\n");
|
||||
for (i32 i = 0; i < ArrayCount(fcoder_meta_maps); ++i){
|
||||
Meta_Mapping *mapping = &fcoder_meta_maps[i];
|
||||
|
||||
char s[512];
|
||||
copy_and_fix_name(mapping->name, s, sizeof(s));
|
||||
fprintf(out, "\\ITEM \\STYLE{code} \"%s\" \\END %s\n", s, mapping->description);
|
||||
}
|
||||
fprintf(out, "\\END\n");
|
||||
|
||||
fprintf(out, long_commands_str);
|
||||
|
||||
for (i32 i = 0; i < ArrayCount(fcoder_meta_maps); ++i){
|
||||
Meta_Mapping *mapping = &fcoder_meta_maps[i];
|
||||
|
||||
char s[512];
|
||||
copy_and_fix_name(mapping->name, s, sizeof(s));
|
||||
fprintf(out, "\\SECTION{Map: %s}\n", s);
|
||||
|
||||
for (i32 j = 0; j < mapping->sub_map_count; ++j){
|
||||
Meta_Sub_Map *sub_map = &mapping->sub_maps[j];
|
||||
|
||||
char sub_s[512];
|
||||
copy_and_fix_name(sub_map->name, sub_s, sizeof(sub_s));
|
||||
fprintf(out, "\\SECTION{%s}\n", sub_s);
|
||||
fprintf(out, "%s\n", sub_map->description);
|
||||
fprintf(out, "\\LIST\n", sub_map->description);
|
||||
|
||||
for (i32 k = 0; k < sub_map->bind_count; ++k){
|
||||
Meta_Key_Bind *bind = &sub_map->binds[k];
|
||||
|
||||
// Get modifier key string
|
||||
char mdfr_str[256];
|
||||
String m = make_fixed_width_string(mdfr_str);
|
||||
b32 has_base = false;
|
||||
|
||||
if (bind->modifiers & MDFR_CTRL){
|
||||
if (has_base){
|
||||
append(&m, "+");
|
||||
}
|
||||
append(&m, "ctrl");
|
||||
}
|
||||
if (bind->modifiers & MDFR_ALT){
|
||||
if (has_base){
|
||||
append(&m, "+");
|
||||
}
|
||||
append(&m, "alt");
|
||||
}
|
||||
if (bind->modifiers & MDFR_CMND){
|
||||
if (has_base){
|
||||
append(&m, "+");
|
||||
}
|
||||
append(&m, "cmnd");
|
||||
}
|
||||
if (bind->modifiers & MDFR_SHIFT){
|
||||
if (has_base){
|
||||
append(&m, "+");
|
||||
}
|
||||
append(&m, "shift");
|
||||
}
|
||||
if (bind->modifiers != 0){
|
||||
append(&m, " ");
|
||||
}
|
||||
terminate_with_null(&m);
|
||||
|
||||
// Get printable key string
|
||||
char key_str_space[2];
|
||||
char *key_str = 0;
|
||||
|
||||
if (bind->vanilla){
|
||||
key_str = "any character";
|
||||
}
|
||||
else{
|
||||
switch (bind->keycode){
|
||||
case key_back: key_str = "backspace"; break;
|
||||
case key_up: key_str = "up"; break;
|
||||
case key_down: key_str = "down"; break;
|
||||
case key_left: key_str = "left"; break;
|
||||
case key_right: key_str = "right"; break;
|
||||
case key_del: key_str = "delete"; break;
|
||||
case key_insert: key_str = "insert"; break;
|
||||
case key_home: key_str = "home"; break;
|
||||
case key_end: key_str = "end"; break;
|
||||
case key_page_up: key_str = "page up"; break;
|
||||
case key_page_down: key_str = "page down"; break;
|
||||
case key_esc: key_str = "escape"; break;
|
||||
case key_mouse_left: key_str = "left click"; break;
|
||||
case key_mouse_right: key_str = "right click"; break;
|
||||
case key_mouse_left_release: key_str = "left release"; break;
|
||||
case key_mouse_right_release: key_str = "right release"; break;
|
||||
case key_f1: key_str = "f1"; break;
|
||||
case key_f2: key_str = "f2"; break;
|
||||
case key_f3: key_str = "f3"; break;
|
||||
case key_f4: key_str = "f4"; break;
|
||||
case key_f5: key_str = "f5"; break;
|
||||
case key_f6: key_str = "f6"; break;
|
||||
case key_f7: key_str = "f7"; break;
|
||||
case key_f8: key_str = "f8"; break;
|
||||
case key_f9: key_str = "f9"; break;
|
||||
case key_f10: key_str = "f10"; break;
|
||||
case key_f11: key_str = "f11"; break;
|
||||
case key_f12: key_str = "f12"; break;
|
||||
case key_f13: key_str = "f13"; break;
|
||||
case key_f14: key_str = "f14"; break;
|
||||
case key_f15: key_str = "f15"; break;
|
||||
case key_f16: key_str = "f16"; break;
|
||||
|
||||
default:
|
||||
{
|
||||
if (bind->keycode == '\n'){
|
||||
key_str = "return";
|
||||
}
|
||||
else if (bind->keycode == '\t'){
|
||||
key_str = "tab";
|
||||
}
|
||||
else{
|
||||
Assert(bind->keycode <= 127);
|
||||
key_str = key_str_space;
|
||||
key_str_space[0] = (char)bind->keycode;
|
||||
key_str_space[1] = 0;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get description from doc string
|
||||
char *description = "description missing";
|
||||
char *command = bind->command;
|
||||
for (i32 i = 0; i < command_one_past_last_id; ++i){
|
||||
Command_Metadata *metadata = command_metadata_by_id(i);
|
||||
if (match(metadata->name, command)){
|
||||
description = metadata->description;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(out, "\\ITEM \\STYLE{code} <%s%s> \\END %s\n",
|
||||
mdfr_str, key_str,
|
||||
description);
|
||||
}
|
||||
|
||||
fprintf(out, "\\END\n");
|
||||
fprintf(out, "\\END\n");
|
||||
}
|
||||
|
||||
fprintf(out, "\\END\n");
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Meta Parse Rules
|
||||
//
|
||||
|
@ -151,10 +362,16 @@ generate_site(char *code_directory, char *asset_directory, char *src_directory,
|
|||
|
||||
int main(int argc, char **argv){
|
||||
META_BEGIN();
|
||||
fm_init_system();
|
||||
|
||||
if (argc == 5){
|
||||
generate_site(argv[1], argv[2], argv[3], argv[4]);
|
||||
fm_init_system();
|
||||
|
||||
char *code_directory = argv[1];
|
||||
char *asset_directory = argv[2];
|
||||
char *src_directory = argv[3];
|
||||
char *dst_directory = argv[4];
|
||||
generate_binding_list(code_directory, src_directory);
|
||||
generate_site(code_directory, asset_directory, src_directory, dst_directory);
|
||||
}
|
||||
|
||||
META_FINISH();
|
||||
|
|
|
@ -4,375 +4,312 @@
|
|||
4coder version \VERSION
|
||||
|
||||
\SECTION{Built in Bindings}
|
||||
\ITEM \STYLE{code} "default" \END The standard bindings for Windows and Linux
|
||||
\ITEM \STYLE{code} "mac-default" \END The standard bindings reconfigured to be similar to other Mac applications
|
||||
\ITEM \STYLE{code} "mac-4coder-like" \END Bindings for Mac that make it very similar to use to 4coder on other OSes
|
||||
\ITEM \STYLE{code} "default" \END TODO
|
||||
\ITEM \STYLE{code} "mac-default" \END TODO
|
||||
\END
|
||||
|
||||
\SECTION{4coder Long Command}
|
||||
Long name commands that can be typed in after using the "long command" command for infrequently triggered commands.
|
||||
\LIST
|
||||
\ITEM \STYLE{code} "load project" \END Load a project.4coder file, ditching any previously loaded project
|
||||
\ITEM \STYLE{code} "open all code" \END Open all code files in the current directory, extensions set in config.4coder, default to C/C++ extensions
|
||||
\ITEM \STYLE{code} "open all code recursive" \END Like \STYLE{code} "open all code" \END but recurses through folders
|
||||
\ITEM \STYLE{code} "dos lines" \END Switch the buffer to 'dos' line ending mode CRLF
|
||||
\ITEM \STYLE{code} "nix lines" \END Switch the buffer to 'nix' line ending mode LF
|
||||
\ITEM \STYLE{code} "remap" \END Change to one of the built in command bindings
|
||||
\ITEM \STYLE{code} "new project" \END Setup a new project.4coder and accompanying build scripts
|
||||
\END
|
||||
\LIST
|
||||
\ITEM \STYLE{code} "load project" \END Load a project.4coder file, ditching any previously loaded project
|
||||
\ITEM \STYLE{code} "open all code" \END Open all code files in the current directory, extensions set in config.4coder, default to C/C++ extensions
|
||||
\ITEM \STYLE{code} "open all code recursive" \END Like \STYLE{code} "open all code" \END but recurses through folders
|
||||
\ITEM \STYLE{code} "dos lines" \END Switch the buffer to 'dos' line ending mode CRLF
|
||||
\ITEM \STYLE{code} "nix lines" \END Switch the buffer to 'nix' line ending mode LF
|
||||
\ITEM \STYLE{code} "remap" \END Change to one of the built in command bindings
|
||||
\ITEM \STYLE{code} "new project" \END Setup a new project.4coder and accompanying build scripts
|
||||
\END
|
||||
\END
|
||||
|
||||
\SECTION{Map: default}
|
||||
|
||||
\SECTION{Global}
|
||||
The following bindings apply in all situations.
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <ctrl p> \END Create a new panel with a vertical split
|
||||
\ITEM \STYLE{code} <ctrl _> \END Create a new panel with a horizontal split
|
||||
\ITEM \STYLE{code} <ctrl P> \END Close a panel
|
||||
\ITEM \STYLE{code} <ctrl ,> \END Change active panel
|
||||
\ITEM \STYLE{code} <ctrl <> \END change active panel backwards
|
||||
|
||||
\ITEM \STYLE{code} <ctrl n> \END New file dialogue
|
||||
\ITEM \STYLE{code} <ctrl o> \END Open file dialogue
|
||||
\ITEM \STYLE{code} <alt o> \END Open file dialogue in other panel
|
||||
\ITEM \STYLE{code} <ctrl k> \END Kill buffer dialogue
|
||||
\ITEM \STYLE{code} <ctrl i> \END Switch open buffer dialogue
|
||||
\ITEM \STYLE{code} <ctrl w> \END 'Save As' - save file into new name
|
||||
\ITEM \STYLE{code} <ctrl h> \END Set hot directory to projet root directory
|
||||
\ITEM \STYLE{code} <ctrl S> \END Save all dirty buffers
|
||||
|
||||
\ITEM \STYLE{code} <alt c> \END Open color and font selection GUI
|
||||
\ITEM \STYLE{code} <alt d> \END Open a debug information GUI
|
||||
|
||||
\ITEM \STYLE{code} <alt .> \END Change to footer build panel
|
||||
\ITEM \STYLE{code} <alt ,> \END Close footer build panel
|
||||
\ITEM \STYLE{code} <alt n> \END Goto next error/jump location
|
||||
\ITEM \STYLE{code} <alt N> \END Goto previous error/jump location
|
||||
\ITEM \STYLE{code} <alt M> \END Goto first error/jump location
|
||||
\ITEM \STYLE{code} <alt m> \END Launch basic build (calls build.bat, build.sh, or Makefile)
|
||||
|
||||
\ITEM \STYLE{code} <alt z> \END Execute arbitrary shell/terminal command in arbitrary buffer
|
||||
\ITEM \STYLE{code} <alt Z> \END Repeat previous shell/terminal command
|
||||
|
||||
\ITEM \STYLE{code} <alt x> \END Execute "long command" (see long command section)
|
||||
|
||||
\ITEM \STYLE{code} <alt s> \END Show scrollbar
|
||||
\ITEM \STYLE{code} <alt w> \END Hide scrollbar
|
||||
\ITEM \STYLE{code} <alt b> \END Toggle filebar
|
||||
|
||||
\ITEM \STYLE{code} <alt @> \END Toggle mouse input
|
||||
\ITEM \STYLE{code} <ctrl page up> \END Toggle fullscreen mode
|
||||
\ITEM \STYLE{code} <alt E> \END Exit 4coder
|
||||
|
||||
\ITEM \STYLE{code} <f1> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f2> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f3> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f4> \END Launch shell command set in a loaded project
|
||||
|
||||
\ITEM \STYLE{code} <f5> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f6> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f7> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f8> \END Launch shell command set in a loaded project
|
||||
|
||||
\ITEM \STYLE{code} <f9> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f10> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f11> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f12> \END Launch shell command set in a loaded project
|
||||
|
||||
\ITEM \STYLE{code} <f13> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f14> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f15> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f16> \END Launch shell command set in a loaded project
|
||||
|
||||
\END
|
||||
\SECTION{mapid-global}
|
||||
TODO
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <ctrl p> \END Create a new panel by vertically splitting the active panel.
|
||||
\ITEM \STYLE{code} <ctrl _> \END Create a new panel by horizontally splitting the active panel.
|
||||
\ITEM \STYLE{code} <ctrl P> \END Closes the currently active panel if it is not the only panel open.
|
||||
\ITEM \STYLE{code} <ctrl ,> \END Change the currently active panel, moving to the panel with the next highest view_id.
|
||||
\ITEM \STYLE{code} <ctrl <> \END Change the currently active panel, moving to the panel with the next lowest view_id.
|
||||
\ITEM \STYLE{code} <ctrl n> \END Interactively creates a new file.
|
||||
\ITEM \STYLE{code} <ctrl o> \END Interactively opens or creates a new file.
|
||||
\ITEM \STYLE{code} <alt o> \END Reads a filename from surrounding '"' characters and attempts to open the corresponding file, displaying it in the other view.
|
||||
\ITEM \STYLE{code} <ctrl k> \END Interactively kill an open buffer.
|
||||
\ITEM \STYLE{code} <ctrl i> \END Interactively switch to an open buffer.
|
||||
\ITEM \STYLE{code} <ctrl h> \END Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.
|
||||
\ITEM \STYLE{code} <ctrl S> \END Saves all buffers marked dirty (showing the '*' indicator).
|
||||
\ITEM \STYLE{code} <alt c> \END Opens the 4coder colors and fonts selector menu.
|
||||
\ITEM \STYLE{code} <alt d> \END Opens a debug view for internal use.
|
||||
\ITEM \STYLE{code} <alt .> \END If the special build panel is open, makes the build panel the active panel.
|
||||
\ITEM \STYLE{code} <alt ,> \END If the special build panel is open, closes it.
|
||||
\ITEM \STYLE{code} <alt n> \END description missing
|
||||
\ITEM \STYLE{code} <alt N> \END description missing
|
||||
\ITEM \STYLE{code} <alt M> \END description missing
|
||||
\ITEM \STYLE{code} <alt m> \END Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.
|
||||
\ITEM \STYLE{code} <alt z> \END Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.
|
||||
\ITEM \STYLE{code} <alt Z> \END If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.
|
||||
\ITEM \STYLE{code} <alt x> \END Execute a 'long form' command.
|
||||
\ITEM \STYLE{code} <alt s> \END Sets the current view to show it's scrollbar.
|
||||
\ITEM \STYLE{code} <alt w> \END Sets the current view to hide it's scrollbar.
|
||||
\ITEM \STYLE{code} <alt b> \END Toggles the visibility status of the current view's filebar.
|
||||
\ITEM \STYLE{code} <alt @> \END Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.
|
||||
\ITEM \STYLE{code} <ctrl page up> \END Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.
|
||||
\ITEM \STYLE{code} <alt E> \END Attempts to close 4coder.
|
||||
\ITEM \STYLE{code} <f1> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f2> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f3> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f4> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f5> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f6> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f7> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f8> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f9> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f10> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f11> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f12> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f13> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f14> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f15> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f16> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\END
|
||||
|
||||
\SECTION{Text File}
|
||||
The following bindings apply in general text files and most apply in code files, but some are overriden by other commands.
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <any character> \END Insert character
|
||||
|
||||
\ITEM \STYLE{code} <left click> \END Set cursor position to mouse position
|
||||
\ITEM \STYLE{code} <left release> \END Set mark position to mouse position
|
||||
\ITEM \STYLE{code} <right click> \END Set mark position to mouse position
|
||||
|
||||
\ITEM \STYLE{code} <left> \END Move left
|
||||
\ITEM \STYLE{code} <right> \END Move right
|
||||
\ITEM \STYLE{code} <del> \END Delete character
|
||||
\ITEM \STYLE{code} <shift del> \END Delete character
|
||||
\ITEM \STYLE{code} <back> \END Backspace character
|
||||
\ITEM \STYLE{code} <shift back> \END Backspace character
|
||||
\ITEM \STYLE{code} <up> \END Move up
|
||||
\ITEM \STYLE{code} <down> \END Move up
|
||||
\ITEM \STYLE{code} <end> \END Move to end of line
|
||||
\ITEM \STYLE{code} <home> \END Move to beginning of line
|
||||
\ITEM \STYLE{code} <page up> \END Move up one whole page
|
||||
\ITEM \STYLE{code} <page down> \END Move down one whole page
|
||||
|
||||
\ITEM \STYLE{code} <ctrl right> \END Seek right, stop at whitespace
|
||||
\ITEM \STYLE{code} <ctrl left> \END Seek left, stop at whitespace
|
||||
\ITEM \STYLE{code} <ctrl up> \END Seek up, stop at blank line
|
||||
\ITEM \STYLE{code} <ctrl down> \END Seek down, stop at blank line
|
||||
|
||||
\ITEM \STYLE{code} <alt up> \END Move up ten lines
|
||||
\ITEM \STYLE{code} <alt down> \END Move down ten lines
|
||||
|
||||
\ITEM \STYLE{code} <ctrl back> \END Delete word backwards
|
||||
\ITEM \STYLE{code} <ctrl del> \END Delete word forwards
|
||||
\ITEM \STYLE{code} <alt back> \END Snipe token (or word) left
|
||||
\ITEM \STYLE{code} <alt del> \END Snipe token (or word) right
|
||||
|
||||
\ITEM Note: 'the range' in the following commands refers to the text between the mark and cursor.
|
||||
\ITEM \STYLE{code} <ctrl space> \END Set mark to the cursor position
|
||||
\ITEM \STYLE{code} <ctrl a> \END Replace a substring in the range
|
||||
\ITEM \STYLE{code} <ctrl c> \END Copy text from the range
|
||||
\ITEM \STYLE{code} <ctrl d> \END Delete the text in the range
|
||||
\ITEM \STYLE{code} <ctrl e> \END Center the active view on the cursor
|
||||
\ITEM \STYLE{code} <ctrl E> \END Move the view so that it's left edge is near the cursor's current x position
|
||||
\ITEM \STYLE{code} <ctrl f> \END Begin an incremental search through the current buffer
|
||||
\ITEM \STYLE{code} <ctrl F> \END Create a jump location list of all loaded exact matches of a string
|
||||
\ITEM \STYLE{code} <alt F> \END Create a jump location list of all loaded substring matches of a string without case sensitivity
|
||||
\ITEM \STYLE{code} <ctrl g> \END Goto a specific line number
|
||||
\ITEM \STYLE{code} <ctrl j> \END Convert text in the range to lowercase
|
||||
\ITEM \STYLE{code} <ctrl K> \END Kill the current buffer
|
||||
\ITEM \STYLE{code} <ctrl l> \END Toggle line wrapping on the current buffer
|
||||
\ITEM \STYLE{code} <ctrl m> \END Swap the cursor and mark positions
|
||||
\ITEM \STYLE{code} <ctrl O> \END Reload the current buffer from the file system
|
||||
\ITEM \STYLE{code} <ctrl q> \END Begin an iterative query replace
|
||||
\ITEM \STYLE{code} <ctrl Q> \END Begin an iterative query replace to replace the word under the cursor
|
||||
\ITEM \STYLE{code} <ctrl r> \END Begin a reversed incremental search through the current buffer
|
||||
\ITEM \STYLE{code} <ctrl s> \END Save the current buffer with it's given filename
|
||||
\ITEM \STYLE{code} <ctrl t> \END Begin an incremenal search through the current buffer for the word under the cursor
|
||||
\ITEM \STYLE{code} <ctrl T> \END Create a jump location list of all loaded exact matches of the word under the cursor
|
||||
\ITEM \STYLE{code} <ctrl u> \END Convert text in the range to uppercase
|
||||
\ITEM \STYLE{code} <ctrl v> \END Paste from the clipboard
|
||||
\ITEM \STYLE{code} <alt v> \END Toggle the virtual whitespace system
|
||||
\ITEM \STYLE{code} <ctrl V> \END Paste the next item on the clipboard, 4coder keeps a finite history of past 64 copies
|
||||
\ITEM \STYLE{code} <ctrl x> \END Copy text from the range and delete the range (aka cut)
|
||||
\ITEM \STYLE{code} <ctrl y> \END Redo
|
||||
\ITEM \STYLE{code} <ctrl z> \END Undo
|
||||
|
||||
\ITEM \STYLE{code} <ctrl 2> \END Decrease the line wrap width for the current buffer
|
||||
\ITEM \STYLE{code} <ctrl 3> \END Increase the line wrap width for the current buffer
|
||||
|
||||
\ITEM \STYLE{code} <ctrl ?> \END Toggle the show whitespace option
|
||||
\ITEM \STYLE{code} <ctrl ~> \END Clean trailing whitespace from all lines
|
||||
\ITEM \STYLE{code} <return> \END Interpret jump location under cursor and jump to it, lock the next/prev jump commands to this jump location list (only in read only files)
|
||||
\ITEM \STYLE{code} <shift return> \END Like previous command but tries to open the jump location in the view that currently holds the jump location list
|
||||
|
||||
\END
|
||||
\END
|
||||
|
||||
\SECTION{Code File}
|
||||
The following commands only apply in C/C++ files where the lexer (syntax highlighting) is turned on.
|
||||
\LIST
|
||||
|
||||
\ITEM \STYLE{code} <ctrl right> \END Seek right stop at alphanumeric or camel case
|
||||
\ITEM \STYLE{code} <ctrl left> \END Seek left stop at alphanumeric or camel case
|
||||
|
||||
\ITEM \STYLE{code} <}> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <)> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <]> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <;> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <#> \END Insert character and trigger auto indentation
|
||||
|
||||
\ITEM \STYLE{code} <tab> \END Automatically complete partial word
|
||||
\ITEM \STYLE{code} <ctrl tab> \END Auto indent the range
|
||||
\ITEM \STYLE{code} <shift tab> \END Auto indent the line at the cursor
|
||||
|
||||
\ITEM \STYLE{code} <alt h> \END Insert a HACK commment
|
||||
\ITEM \STYLE{code} <alt r> \END Insert a block comment
|
||||
\ITEM \STYLE{code} <alt t> \END Insert a TODO comment
|
||||
\ITEM \STYLE{code} <alt y> \END Insert a NOTE comment
|
||||
\ITEM \STYLE{code} <ctrl [> \END Open a pair of braces
|
||||
\ITEM \STYLE{code} <ctrl {> \END Open a pair of braces ended with a semicolon
|
||||
\ITEM \STYLE{code} <ctrl }> \END Open a pair of braces ended with a break
|
||||
\ITEM \STYLE{code} <alt i> \END Surround the range with #if 0 and #endif
|
||||
\ITEM \STYLE{code} <alt 1> \END Try to open a file named by the string surrounded by quotes under the cursor
|
||||
\ITEM \STYLE{code} <alt 2> \END Switch from .cpp \STYLE{code} <-> \END .h
|
||||
\ITEM \STYLE{code} <ctrl 0> \END Insert the characters " = {0};"
|
||||
\ITEM \STYLE{code} <ctrl I> \END List all function signatures in the current buffer
|
||||
|
||||
\END
|
||||
\SECTION{mapid-file}
|
||||
TODO
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <any character> \END Inserts whatever character was used to trigger this command.
|
||||
\ITEM \STYLE{code} <left click> \END Sets the cursor position to the mouse position.
|
||||
\ITEM \STYLE{code} <left release> \END Sets the mark position to the mouse position.
|
||||
\ITEM \STYLE{code} <right click> \END Sets the mark position to the mouse position.
|
||||
\ITEM \STYLE{code} <left> \END Moves the cursor one character to the left.
|
||||
\ITEM \STYLE{code} <right> \END Moves the cursor one character to the right.
|
||||
\ITEM \STYLE{code} <delete> \END Deletes the character to the right of the cursor.
|
||||
\ITEM \STYLE{code} <shift delete> \END Deletes the character to the right of the cursor.
|
||||
\ITEM \STYLE{code} <backspace> \END Deletes the character to the left of the cursor.
|
||||
\ITEM \STYLE{code} <shift backspace> \END Deletes the character to the left of the cursor.
|
||||
\ITEM \STYLE{code} <up> \END Moves the cursor up one line.
|
||||
\ITEM \STYLE{code} <down> \END Moves the cursor down one line.
|
||||
\ITEM \STYLE{code} <end> \END Seeks the cursor to the end of the visual line.
|
||||
\ITEM \STYLE{code} <home> \END Seeks the cursor to the beginning of the visual line.
|
||||
\ITEM \STYLE{code} <page up> \END Scrolls the view up one view height and moves the cursor up one view height.
|
||||
\ITEM \STYLE{code} <page down> \END Scrolls the view down one view height and moves the cursor down one view height.
|
||||
\ITEM \STYLE{code} <ctrl right> \END Seek right for the next boundary between whitespace and non-whitespace.
|
||||
\ITEM \STYLE{code} <ctrl left> \END Seek left for the next boundary between whitespace and non-whitespace.
|
||||
\ITEM \STYLE{code} <ctrl up> \END Seeks the cursor up to the next blank line and places it at the end of the line.
|
||||
\ITEM \STYLE{code} <ctrl down> \END Seeks the cursor down to the next blank line and places it at the end of the line.
|
||||
\ITEM \STYLE{code} <alt up> \END Moves the cursor up ten lines.
|
||||
\ITEM \STYLE{code} <alt down> \END Moves the cursor down ten lines.
|
||||
\ITEM \STYLE{code} <ctrl backspace> \END Delete characters between the cursor position and the first alphanumeric boundary to the left.
|
||||
\ITEM \STYLE{code} <ctrl delete> \END Delete characters between the cursor position and the first alphanumeric boundary to the right.
|
||||
\ITEM \STYLE{code} <alt backspace> \END Delete a single, whole token on or to the left of the cursor.
|
||||
\ITEM \STYLE{code} <alt delete> \END Delete a single, whole token on or to the right of the cursor.
|
||||
\ITEM \STYLE{code} <ctrl > \END Sets the mark to the current position of the cursor.
|
||||
\ITEM \STYLE{code} <ctrl a> \END Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.
|
||||
\ITEM \STYLE{code} <ctrl c> \END Copy the text in the range from the cursor to the mark onto the clipboard.
|
||||
\ITEM \STYLE{code} <ctrl d> \END Deletes the text in the range between the cursor and the mark.
|
||||
\ITEM \STYLE{code} <ctrl e> \END Centers the view vertically on the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <ctrl E> \END Sets the left size of the view near the x position of the cursor.
|
||||
\ITEM \STYLE{code} <ctrl f> \END Begins an incremental search down through the current buffer for a user specified string.
|
||||
\ITEM \STYLE{code} <ctrl F> \END Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.
|
||||
\ITEM \STYLE{code} <alt F> \END Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.
|
||||
\ITEM \STYLE{code} <ctrl g> \END Queries the user for a number, and jumps the cursor to the corresponding line.
|
||||
\ITEM \STYLE{code} <ctrl j> \END Converts all ascii text in the range between the cursor and the mark to lowercase.
|
||||
\ITEM \STYLE{code} <ctrl K> \END Kills the current buffer.
|
||||
\ITEM \STYLE{code} <ctrl l> \END Toggles the current buffer's line wrapping status.
|
||||
\ITEM \STYLE{code} <ctrl m> \END Swaps the position of the cursor and the mark.
|
||||
\ITEM \STYLE{code} <ctrl O> \END Reopen the current buffer from the hard drive.
|
||||
\ITEM \STYLE{code} <ctrl q> \END Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.
|
||||
\ITEM \STYLE{code} <ctrl Q> \END Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.
|
||||
\ITEM \STYLE{code} <ctrl r> \END Begins an incremental search up through the current buffer for a user specified string.
|
||||
\ITEM \STYLE{code} <ctrl s> \END Saves the current buffer.
|
||||
\ITEM \STYLE{code} <ctrl t> \END Begins an incremental search down through the current buffer for the word or token under the cursor.
|
||||
\ITEM \STYLE{code} <ctrl T> \END Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.
|
||||
\ITEM \STYLE{code} <ctrl u> \END Converts all ascii text in the range between the cursor and the mark to uppercase.
|
||||
\ITEM \STYLE{code} <ctrl v> \END Paste from the top of clipboard and run auto-indent on the newly pasted text.
|
||||
\ITEM \STYLE{code} <alt v> \END Toggles the current buffer's virtual whitespace status.
|
||||
\ITEM \STYLE{code} <ctrl V> \END Paste the next item on the clipboard and run auto-indent on the newly pasted text.
|
||||
\ITEM \STYLE{code} <ctrl x> \END Cut the text in the range from the cursor to the mark onto the clipboard.
|
||||
\ITEM \STYLE{code} <ctrl y> \END Advances forewards through the undo history.
|
||||
\ITEM \STYLE{code} <ctrl z> \END Advances backwards through the undo history.
|
||||
\ITEM \STYLE{code} <ctrl 2> \END Decrases the current buffer's width for line wrapping.
|
||||
\ITEM \STYLE{code} <ctrl 3> \END Increases the current buffer's width for line wrapping.
|
||||
\ITEM \STYLE{code} <ctrl ?> \END Toggles the current buffer's whitespace visibility status.
|
||||
\ITEM \STYLE{code} <ctrl ~> \END Removes trailing whitespace from all lines in the current buffer.
|
||||
\ITEM \STYLE{code} <return> \END description missing
|
||||
\ITEM \STYLE{code} <shift return> \END description missing
|
||||
\ITEM \STYLE{code} <shift > \END Inserts whatever character was used to trigger this command.
|
||||
\END
|
||||
\END
|
||||
\SECTION{default-code-map}
|
||||
TODO
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <ctrl right> \END Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.
|
||||
\ITEM \STYLE{code} <ctrl left> \END Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.
|
||||
\ITEM \STYLE{code} <return> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <shift return> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <}> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <)> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <]> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <;> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <#> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <tab> \END Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.
|
||||
\ITEM \STYLE{code} <ctrl tab> \END Auto-indents the range between the cursor and the mark.
|
||||
\ITEM \STYLE{code} <shift tab> \END Auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <alt h> \END At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.
|
||||
\ITEM \STYLE{code} <alt r> \END At the cursor, insert a block comment.
|
||||
\ITEM \STYLE{code} <alt t> \END At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.
|
||||
\ITEM \STYLE{code} <alt y> \END At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.
|
||||
\ITEM \STYLE{code} <ctrl [> \END At the cursor, insert a '{' and '}' separated by a blank line.
|
||||
\ITEM \STYLE{code} <ctrl {> \END At the cursor, insert a '{' and '};' separated by a blank line.
|
||||
\ITEM \STYLE{code} <ctrl }> \END At the cursor, insert a '{' and '}break;' separated by a blank line.
|
||||
\ITEM \STYLE{code} <alt i> \END Surround the range between the cursor and mark with an '#if 0' and an '#endif'
|
||||
\ITEM \STYLE{code} <alt 1> \END Reads a filename from surrounding '"' characters and attempts to open the corresponding file.
|
||||
\ITEM \STYLE{code} <alt 2> \END If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.
|
||||
\ITEM \STYLE{code} <ctrl 0> \END At the cursor, insert a ' = {0};'.
|
||||
\ITEM \STYLE{code} <ctrl I> \END Creates a jump list of lines of the current buffer that appear to define or declare functions.
|
||||
\END
|
||||
\END
|
||||
|
||||
\END
|
||||
|
||||
\SECTION{Map: mac-default}
|
||||
|
||||
\SECTION{Global}
|
||||
The following bindings apply in all situations.
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <cmnd p> \END Create a new panel with a vertical split
|
||||
\ITEM \STYLE{code} <cmnd _> \END Create a new panel with a horizontal split
|
||||
\ITEM \STYLE{code} <cmnd P> \END Close a panel
|
||||
\ITEM \STYLE{code} <cmnd ,> \END Change active panel
|
||||
\ITEM \STYLE{code} <cmnd <> \END change active panel backwards
|
||||
|
||||
\ITEM \STYLE{code} <cmnd n> \END New file dialogue
|
||||
\ITEM \STYLE{code} <cmnd o> \END Open file dialogue
|
||||
\ITEM \STYLE{code} <ctrl o> \END Open file dialogue in other panel
|
||||
\ITEM \STYLE{code} <cmnd k> \END Kill buffer dialogue
|
||||
\ITEM \STYLE{code} <cmnd i> \END Switch open buffer dialogue
|
||||
\ITEM \STYLE{code} <cmnd w> \END 'Save As' - save file into new name
|
||||
\ITEM \STYLE{code} <cmnd h> \END Set hot directory to projet root directory
|
||||
|
||||
\ITEM \STYLE{code} <ctrl c> \END Open color and font selection GUI
|
||||
\ITEM \STYLE{code} <ctrl d> \END Open a debug information GUI
|
||||
|
||||
\ITEM \STYLE{code} <ctrl .> \END Change to footer build panel
|
||||
\ITEM \STYLE{code} <ctrl ,> \END Close footer build panel
|
||||
\ITEM \STYLE{code} <ctrl n> \END Goto next error/jump location
|
||||
\ITEM \STYLE{code} <ctrl N> \END Goto previous error/jump location
|
||||
\ITEM \STYLE{code} <ctrl M> \END Goto first error/jump location
|
||||
\ITEM \STYLE{code} <ctrl m> \END Launch basic build (calls build.bat, build.sh, or Makefile)
|
||||
|
||||
\ITEM \STYLE{code} <ctrl z> \END Execute arbitrary shell/terminal command in arbitrary buffer
|
||||
\ITEM \STYLE{code} <ctrl Z> \END Repeat previous shell/terminal command
|
||||
|
||||
\ITEM \STYLE{code} <ctrl x> \END Execute "long command" (see long command section)
|
||||
|
||||
\ITEM \STYLE{code} <ctrl s> \END Show scrollbar
|
||||
\ITEM \STYLE{code} <ctrl w> \END Hide scrollbar
|
||||
\ITEM \STYLE{code} <ctrl b> \END Toggle filebar
|
||||
|
||||
\ITEM \STYLE{code} <ctrl @> \END Toggle mouse input
|
||||
\ITEM \STYLE{code} <cmnd page up> \END Toggle fullscreen mode
|
||||
\ITEM \STYLE{code} <ctrl E> \END Exit 4coder
|
||||
|
||||
\ITEM \STYLE{code} <f1> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f2> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f3> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f4> \END Launch shell command set in a loaded project
|
||||
|
||||
\ITEM \STYLE{code} <f5> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f6> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f7> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f8> \END Launch shell command set in a loaded project
|
||||
|
||||
\ITEM \STYLE{code} <f9> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f10> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f11> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f12> \END Launch shell command set in a loaded project
|
||||
|
||||
\ITEM \STYLE{code} <f13> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f14> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f15> \END Launch shell command set in a loaded project
|
||||
\ITEM \STYLE{code} <f16> \END Launch shell command set in a loaded project
|
||||
|
||||
\END
|
||||
\SECTION{mapid-global}
|
||||
TODO
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <cmnd p> \END Create a new panel by vertically splitting the active panel.
|
||||
\ITEM \STYLE{code} <cmnd _> \END Create a new panel by horizontally splitting the active panel.
|
||||
\ITEM \STYLE{code} <cmnd P> \END Closes the currently active panel if it is not the only panel open.
|
||||
\ITEM \STYLE{code} <cmnd ,> \END Change the currently active panel, moving to the panel with the next highest view_id.
|
||||
\ITEM \STYLE{code} <cmnd <> \END Change the currently active panel, moving to the panel with the next lowest view_id.
|
||||
\ITEM \STYLE{code} <cmnd n> \END Interactively creates a new file.
|
||||
\ITEM \STYLE{code} <cmnd o> \END Interactively opens or creates a new file.
|
||||
\ITEM \STYLE{code} <ctrl o> \END Reads a filename from surrounding '"' characters and attempts to open the corresponding file, displaying it in the other view.
|
||||
\ITEM \STYLE{code} <cmnd k> \END Interactively kill an open buffer.
|
||||
\ITEM \STYLE{code} <cmnd i> \END Interactively switch to an open buffer.
|
||||
\ITEM \STYLE{code} <cmnd h> \END Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.
|
||||
\ITEM \STYLE{code} <cmnd S> \END Saves all buffers marked dirty (showing the '*' indicator).
|
||||
\ITEM \STYLE{code} <ctrl c> \END Opens the 4coder colors and fonts selector menu.
|
||||
\ITEM \STYLE{code} <ctrl d> \END Opens a debug view for internal use.
|
||||
\ITEM \STYLE{code} <ctrl .> \END If the special build panel is open, makes the build panel the active panel.
|
||||
\ITEM \STYLE{code} <ctrl ,> \END If the special build panel is open, closes it.
|
||||
\ITEM \STYLE{code} <ctrl n> \END description missing
|
||||
\ITEM \STYLE{code} <ctrl N> \END description missing
|
||||
\ITEM \STYLE{code} <ctrl M> \END description missing
|
||||
\ITEM \STYLE{code} <ctrl m> \END Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.
|
||||
\ITEM \STYLE{code} <ctrl z> \END Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.
|
||||
\ITEM \STYLE{code} <ctrl Z> \END If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.
|
||||
\ITEM \STYLE{code} <ctrl x> \END Execute a 'long form' command.
|
||||
\ITEM \STYLE{code} <ctrl s> \END Sets the current view to show it's scrollbar.
|
||||
\ITEM \STYLE{code} <ctrl w> \END Sets the current view to hide it's scrollbar.
|
||||
\ITEM \STYLE{code} <ctrl b> \END Toggles the visibility status of the current view's filebar.
|
||||
\ITEM \STYLE{code} <ctrl @> \END Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.
|
||||
\ITEM \STYLE{code} <cmnd page up> \END Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.
|
||||
\ITEM \STYLE{code} <ctrl E> \END Attempts to close 4coder.
|
||||
\ITEM \STYLE{code} <f1> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f2> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f3> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f4> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f5> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f6> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f7> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f8> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f9> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f10> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f11> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f12> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f13> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f14> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f15> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\ITEM \STYLE{code} <f16> \END Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.
|
||||
\END
|
||||
|
||||
\SECTION{Text File}
|
||||
The following bindings apply in general text files and most apply in code files, but some are overriden by other commands.
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <any character> \END Insert character
|
||||
|
||||
\ITEM \STYLE{code} <left click> \END Set cursor position to mouse position
|
||||
\ITEM \STYLE{code} <left release> \END Set mark position to mouse position
|
||||
\ITEM \STYLE{code} <right click> \END Set mark position to mouse position
|
||||
|
||||
\ITEM \STYLE{code} <left> \END Move left
|
||||
\ITEM \STYLE{code} <right> \END Move right
|
||||
\ITEM \STYLE{code} <del> \END Delete character
|
||||
\ITEM \STYLE{code} <shift del> \END Delete character
|
||||
\ITEM \STYLE{code} <back> \END Backspace character
|
||||
\ITEM \STYLE{code} <shift back> \END Backspace character
|
||||
\ITEM \STYLE{code} <up> \END Move up
|
||||
\ITEM \STYLE{code} <down> \END Move up
|
||||
\ITEM \STYLE{code} <end> \END Move to end of line
|
||||
\ITEM \STYLE{code} <home> \END Move to beginning of line
|
||||
\ITEM \STYLE{code} <page up> \END Move up one whole page
|
||||
\ITEM \STYLE{code} <page down> \END Move down one whole page
|
||||
|
||||
\ITEM \STYLE{code} <cmnd right> \END Seek right, stop at whitespace
|
||||
\ITEM \STYLE{code} <cmnd left> \END Seek left, stop at whitespace
|
||||
\ITEM \STYLE{code} <cmnd up> \END Seek up, stop at blank line
|
||||
\ITEM \STYLE{code} <cmnd down> \END Seek down, stop at blank line
|
||||
|
||||
\ITEM \STYLE{code} <alt up> \END Move up ten lines
|
||||
\ITEM \STYLE{code} <alt down> \END Move down ten lines
|
||||
|
||||
\ITEM \STYLE{code} <cmnd back> \END Delete word backwards
|
||||
\ITEM \STYLE{code} <cmnd del> \END Delete word forwards
|
||||
\ITEM \STYLE{code} <ctrl back> \END Snipe token (or word) left
|
||||
\ITEM \STYLE{code} <ctrl del> \END Snipe token (or word) right
|
||||
|
||||
\ITEM Note: 'the range' in the following commands refers to the text between the mark and cursor.
|
||||
\ITEM \STYLE{code} <cmnd /> \END Set mark to the cursor position
|
||||
\ITEM \STYLE{code} <cmnd a> \END Replace a substring in the range
|
||||
\ITEM \STYLE{code} <cmnd c> \END Copy text from the range
|
||||
\ITEM \STYLE{code} <cmnd d> \END Delete the text in the range
|
||||
\ITEM \STYLE{code} <cmnd e> \END Center the active view on the cursor
|
||||
\ITEM \STYLE{code} <cmnd E> \END Move the view so that it's left edge is near the cursor's current x position
|
||||
\ITEM \STYLE{code} <cmnd f> \END Begin an incremental search through the current buffer
|
||||
\ITEM \STYLE{code} <cmnd F> \END Create a jump location list of all loaded exact matches of a string
|
||||
\ITEM \STYLE{code} <ctrl F> \END Create a jump location list of all loaded substring matches of a string without case sensitivity
|
||||
\ITEM \STYLE{code} <cmnd g> \END Goto a specific line number
|
||||
\ITEM \STYLE{code} <cmnd j> \END Convert text in the range to lowercase
|
||||
\ITEM \STYLE{code} <cmnd K> \END Kill the current buffer
|
||||
\ITEM \STYLE{code} <cmnd l> \END Toggle line wrapping on the current buffer
|
||||
\ITEM \STYLE{code} <cmnd m> \END Swap the cursor and mark positions
|
||||
\ITEM \STYLE{code} <cmnd O> \END Reload the current buffer from the file system
|
||||
\ITEM \STYLE{code} <cmnd q> \END Begin an iterative query replace
|
||||
\ITEM \STYLE{code} <cmnd Q> \END Begin an iterative query replace to replace the word under the cursor
|
||||
\ITEM \STYLE{code} <cmnd r> \END Begin a reversed incremental search through the current buffer
|
||||
\ITEM \STYLE{code} <cmnd s> \END Save the current buffer with it's given filename
|
||||
\ITEM \STYLE{code} <cmnd t> \END Begin an incremenal search through the current buffer for the word under the cursor
|
||||
\ITEM \STYLE{code} <cmnd T> \END Create a jump location list of all loaded exact matches of the word under the cursor
|
||||
\ITEM \STYLE{code} <cmnd u> \END Convert text in the range to uppercase
|
||||
\ITEM \STYLE{code} <cmnd v> \END Paste from the clipboard
|
||||
\ITEM \STYLE{code} <ctrl v> \END Toggle the virtual whitespace system
|
||||
\ITEM \STYLE{code} <cmnd V> \END Paste the next item on the clipboard, 4coder keeps a finite history of past 64 copies
|
||||
\ITEM \STYLE{code} <cmnd x> \END Copy text from the range and delete the range (aka cut)
|
||||
\ITEM \STYLE{code} <cmnd y> \END Redo
|
||||
\ITEM \STYLE{code} <cmnd z> \END Undo
|
||||
|
||||
\ITEM \STYLE{code} <cmnd 2> \END Decrease the line wrap width for the current buffer
|
||||
\ITEM \STYLE{code} <cmnd 3> \END Increase the line wrap width for the current buffer
|
||||
|
||||
\ITEM \STYLE{code} <cmnd ?> \END Toggle the show whitespace option
|
||||
\ITEM \STYLE{code} <cmnd ~> \END Clean trailing whitespace from all lines
|
||||
\ITEM \STYLE{code} <return> \END Interpret jump location under cursor and jump to it, lock the next/prev jump commands to this jump location list (only in read only files)
|
||||
\ITEM \STYLE{code} <shift return> \END Like previous command but tries to open the jump location in the view that currently holds the jump location list
|
||||
|
||||
\END
|
||||
\END
|
||||
|
||||
\SECTION{Code File}
|
||||
The following commands only apply in C/C++ files where the lexer (syntax highlighting) is turned on.
|
||||
\LIST
|
||||
|
||||
\ITEM \STYLE{code} <cmnd right> \END Seek right stop at alphanumeric or camel case
|
||||
\ITEM \STYLE{code} <cmnd left> \END Seek left stop at alphanumeric or camel case
|
||||
|
||||
\ITEM \STYLE{code} <}> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <)> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <]> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <;> \END Insert character and trigger auto indentation
|
||||
\ITEM \STYLE{code} <#> \END Insert character and trigger auto indentation
|
||||
|
||||
\ITEM \STYLE{code} <tab> \END Automatically complete partial word
|
||||
\ITEM \STYLE{code} <cmnd tab> \END Auto indent the range
|
||||
\ITEM \STYLE{code} <shift tab> \END Auto indent the line at the cursor
|
||||
|
||||
\ITEM \STYLE{code} <ctrl h> \END Insert a HACK comment
|
||||
\ITEM \STYLE{code} <ctrl r> \END Insert a block comment
|
||||
\ITEM \STYLE{code} <ctrl t> \END Insert a TODO comment
|
||||
\ITEM \STYLE{code} <ctrl y> \END Insert a NOTE comment
|
||||
\ITEM \STYLE{code} <cmnd [> \END Open a pair of braces
|
||||
\ITEM \STYLE{code} <cmnd {> \END Open a pair of braces ended with a semicolon
|
||||
\ITEM \STYLE{code} <cmnd }> \END Open a pair of braces ended with a break
|
||||
\ITEM \STYLE{code} <ctrl i> \END Surround the range with #if 0 and #endif
|
||||
\ITEM \STYLE{code} <ctrl 1> \END Try to open a file named by the string surrounded by quotes under the cursor
|
||||
\ITEM \STYLE{code} <ctrl 2> \END Switch from .cpp \STYLE{code} <-> \END .h
|
||||
\ITEM \STYLE{code} <cmnd 0> \END Insert the characters " = {0};"
|
||||
\ITEM \STYLE{code} <cmnd I> \END List all function signatures in the current buffer
|
||||
|
||||
\END
|
||||
\SECTION{mapid-file}
|
||||
TODO
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <any character> \END Inserts whatever character was used to trigger this command.
|
||||
\ITEM \STYLE{code} <alt any character> \END Inserts whatever character was used to trigger this command.
|
||||
\ITEM \STYLE{code} <left click> \END Sets the cursor position to the mouse position.
|
||||
\ITEM \STYLE{code} <left release> \END Sets the mark position to the mouse position.
|
||||
\ITEM \STYLE{code} <right click> \END Sets the mark position to the mouse position.
|
||||
\ITEM \STYLE{code} <left> \END Moves the cursor one character to the left.
|
||||
\ITEM \STYLE{code} <right> \END Moves the cursor one character to the right.
|
||||
\ITEM \STYLE{code} <delete> \END Deletes the character to the right of the cursor.
|
||||
\ITEM \STYLE{code} <shift delete> \END Deletes the character to the right of the cursor.
|
||||
\ITEM \STYLE{code} <backspace> \END Deletes the character to the left of the cursor.
|
||||
\ITEM \STYLE{code} <shift backspace> \END Deletes the character to the left of the cursor.
|
||||
\ITEM \STYLE{code} <up> \END Moves the cursor up one line.
|
||||
\ITEM \STYLE{code} <down> \END Moves the cursor down one line.
|
||||
\ITEM \STYLE{code} <end> \END Seeks the cursor to the end of the visual line.
|
||||
\ITEM \STYLE{code} <home> \END Seeks the cursor to the beginning of the visual line.
|
||||
\ITEM \STYLE{code} <page up> \END Scrolls the view up one view height and moves the cursor up one view height.
|
||||
\ITEM \STYLE{code} <page down> \END Scrolls the view down one view height and moves the cursor down one view height.
|
||||
\ITEM \STYLE{code} <cmnd right> \END Seek right for the next boundary between whitespace and non-whitespace.
|
||||
\ITEM \STYLE{code} <cmnd left> \END Seek left for the next boundary between whitespace and non-whitespace.
|
||||
\ITEM \STYLE{code} <cmnd up> \END Seeks the cursor up to the next blank line and places it at the end of the line.
|
||||
\ITEM \STYLE{code} <cmnd down> \END Seeks the cursor down to the next blank line and places it at the end of the line.
|
||||
\ITEM \STYLE{code} <cmnd backspace> \END Delete characters between the cursor position and the first alphanumeric boundary to the left.
|
||||
\ITEM \STYLE{code} <cmnd delete> \END Delete characters between the cursor position and the first alphanumeric boundary to the right.
|
||||
\ITEM \STYLE{code} <ctrl backspace> \END Delete a single, whole token on or to the left of the cursor.
|
||||
\ITEM \STYLE{code} <ctrl delete> \END Delete a single, whole token on or to the right of the cursor.
|
||||
\ITEM \STYLE{code} <cmnd /> \END Sets the mark to the current position of the cursor.
|
||||
\ITEM \STYLE{code} <cmnd a> \END Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.
|
||||
\ITEM \STYLE{code} <cmnd c> \END Copy the text in the range from the cursor to the mark onto the clipboard.
|
||||
\ITEM \STYLE{code} <cmnd d> \END Deletes the text in the range between the cursor and the mark.
|
||||
\ITEM \STYLE{code} <cmnd e> \END Centers the view vertically on the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <cmnd E> \END Sets the left size of the view near the x position of the cursor.
|
||||
\ITEM \STYLE{code} <cmnd f> \END Begins an incremental search down through the current buffer for a user specified string.
|
||||
\ITEM \STYLE{code} <cmnd F> \END Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.
|
||||
\ITEM \STYLE{code} <ctrl F> \END Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.
|
||||
\ITEM \STYLE{code} <cmnd g> \END Queries the user for a number, and jumps the cursor to the corresponding line.
|
||||
\ITEM \STYLE{code} <cmnd j> \END Converts all ascii text in the range between the cursor and the mark to lowercase.
|
||||
\ITEM \STYLE{code} <cmnd K> \END Kills the current buffer.
|
||||
\ITEM \STYLE{code} <cmnd l> \END Toggles the current buffer's line wrapping status.
|
||||
\ITEM \STYLE{code} <cmnd m> \END Swaps the position of the cursor and the mark.
|
||||
\ITEM \STYLE{code} <cmnd O> \END Reopen the current buffer from the hard drive.
|
||||
\ITEM \STYLE{code} <cmnd q> \END Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.
|
||||
\ITEM \STYLE{code} <cmnd Q> \END Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.
|
||||
\ITEM \STYLE{code} <cmnd r> \END Begins an incremental search up through the current buffer for a user specified string.
|
||||
\ITEM \STYLE{code} <cmnd s> \END Saves the current buffer.
|
||||
\ITEM \STYLE{code} <cmnd t> \END Begins an incremental search down through the current buffer for the word or token under the cursor.
|
||||
\ITEM \STYLE{code} <cmnd T> \END Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.
|
||||
\ITEM \STYLE{code} <cmnd u> \END Converts all ascii text in the range between the cursor and the mark to uppercase.
|
||||
\ITEM \STYLE{code} <cmnd v> \END Paste from the top of clipboard and run auto-indent on the newly pasted text.
|
||||
\ITEM \STYLE{code} <ctrl v> \END Toggles the current buffer's virtual whitespace status.
|
||||
\ITEM \STYLE{code} <cmnd V> \END Paste the next item on the clipboard and run auto-indent on the newly pasted text.
|
||||
\ITEM \STYLE{code} <cmnd x> \END Cut the text in the range from the cursor to the mark onto the clipboard.
|
||||
\ITEM \STYLE{code} <cmnd y> \END Advances forewards through the undo history.
|
||||
\ITEM \STYLE{code} <cmnd z> \END Advances backwards through the undo history.
|
||||
\ITEM \STYLE{code} <cmnd 2> \END Decrases the current buffer's width for line wrapping.
|
||||
\ITEM \STYLE{code} <cmnd 3> \END Increases the current buffer's width for line wrapping.
|
||||
\ITEM \STYLE{code} <cmnd ?> \END Toggles the current buffer's whitespace visibility status.
|
||||
\ITEM \STYLE{code} <cmnd ~> \END Removes trailing whitespace from all lines in the current buffer.
|
||||
\ITEM \STYLE{code} <return> \END description missing
|
||||
\ITEM \STYLE{code} <shift return> \END description missing
|
||||
\ITEM \STYLE{code} <shift > \END Inserts whatever character was used to trigger this command.
|
||||
\END
|
||||
\END
|
||||
\SECTION{default-code-map}
|
||||
TODO
|
||||
\LIST
|
||||
\ITEM \STYLE{code} <cmnd right> \END Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.
|
||||
\ITEM \STYLE{code} <cmnd left> \END Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.
|
||||
\ITEM \STYLE{code} <return> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <shift return> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <}> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <)> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <]> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <;> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <#> \END Inserts a character and auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <tab> \END Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.
|
||||
\ITEM \STYLE{code} <cmnd tab> \END Auto-indents the range between the cursor and the mark.
|
||||
\ITEM \STYLE{code} <shift tab> \END Auto-indents the line on which the cursor sits.
|
||||
\ITEM \STYLE{code} <ctrl h> \END At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.
|
||||
\ITEM \STYLE{code} <ctrl r> \END At the cursor, insert a block comment.
|
||||
\ITEM \STYLE{code} <ctrl t> \END At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.
|
||||
\ITEM \STYLE{code} <ctrl y> \END At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.
|
||||
\ITEM \STYLE{code} <cmnd [> \END At the cursor, insert a '{' and '}' separated by a blank line.
|
||||
\ITEM \STYLE{code} <cmnd {> \END At the cursor, insert a '{' and '};' separated by a blank line.
|
||||
\ITEM \STYLE{code} <cmnd }> \END At the cursor, insert a '{' and '}break;' separated by a blank line.
|
||||
\ITEM \STYLE{code} <ctrl i> \END Surround the range between the cursor and mark with an '#if 0' and an '#endif'
|
||||
\ITEM \STYLE{code} <ctrl 1> \END Reads a filename from surrounding '"' characters and attempts to open the corresponding file.
|
||||
\ITEM \STYLE{code} <ctrl 2> \END If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.
|
||||
\ITEM \STYLE{code} <cmnd 0> \END At the cursor, insert a ' = {0};'.
|
||||
\ITEM \STYLE{code} <cmnd I> \END Creates a jump list of lines of the current buffer that appear to define or declare functions.
|
||||
\END
|
||||
\END
|
||||
|
||||
\END
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue