The end of 4coder_experiments.cpp
This commit is contained in:
parent
20f50d2ba3
commit
a69e4e5c3c
|
@ -1622,7 +1622,176 @@ CUSTOM_DOC("Reopen the current buffer from the hard drive.")
|
|||
|
||||
////////////////////////////////
|
||||
|
||||
static i32
|
||||
CUSTOM_COMMAND_SIG(multi_paste){
|
||||
Scratch_Block scratch(app);
|
||||
|
||||
i32 count = clipboard_count(app, 0);
|
||||
if (count > 0){
|
||||
View_ID view = get_active_view(app, AccessOpen);
|
||||
Managed_Scope scope = view_get_managed_scope(app, view);
|
||||
|
||||
Rewrite_Type *rewrite = scope_attachment(app, scope, view_rewrite_loc, Rewrite_Type);
|
||||
if (*rewrite == Rewrite_Paste){
|
||||
Rewrite_Type *next_rewrite = scope_attachment(app, scope, view_next_rewrite_loc, Rewrite_Type);
|
||||
*next_rewrite = Rewrite_Paste;
|
||||
i32 *paste_index_ptr = scope_attachment(app, scope, view_paste_index_loc, i32);
|
||||
i32 paste_index = (*paste_index_ptr) + 1;
|
||||
*paste_index_ptr = paste_index;
|
||||
|
||||
String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index);
|
||||
|
||||
String_Const_u8 insert_string = push_u8_stringf(scratch, "\n%.*s", string_expand(string));
|
||||
|
||||
Buffer_ID buffer = view_get_buffer(app, view, AccessOpen);
|
||||
Range_i64 range = get_view_range(app, view);
|
||||
buffer_replace_range(app, buffer, Ii64(range.max), insert_string);
|
||||
view_set_mark(app, view, seek_pos(range.max + 1));
|
||||
view_set_cursor_and_preferred_x(app, view, seek_pos(range.max + insert_string.size));
|
||||
|
||||
Theme_Color paste = {};
|
||||
paste.tag = Stag_Paste;
|
||||
get_theme_colors(app, &paste, 1);
|
||||
view_post_fade(app, view, 0.667f, Ii64(range.max + 1, range.max + insert_string.size), paste.color);
|
||||
}
|
||||
else{
|
||||
paste(app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Range_i64
|
||||
multi_paste_range(Application_Links *app, View_ID view, Range_i64 range, i32 paste_count, b32 old_to_new){
|
||||
Scratch_Block scratch(app);
|
||||
|
||||
Range_i64 finish_range = range;
|
||||
if (paste_count >= 1){
|
||||
Buffer_ID buffer = view_get_buffer(app, view, AccessOpen);
|
||||
if (buffer != 0){
|
||||
i64 total_size = 0;
|
||||
for (i32 paste_index = 0; paste_index < paste_count; ++paste_index){
|
||||
Temp_Memory temp = begin_temp(scratch);
|
||||
String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index);
|
||||
total_size += string.size + 1;
|
||||
end_temp(temp);
|
||||
}
|
||||
total_size -= 1;
|
||||
|
||||
i32 first = paste_count - 1;
|
||||
i32 one_past_last = -1;
|
||||
i32 step = -1;
|
||||
if (!old_to_new){
|
||||
first = 0;
|
||||
one_past_last = paste_count;
|
||||
step = 1;
|
||||
}
|
||||
|
||||
List_String_Const_u8 list = {};
|
||||
|
||||
for (i32 paste_index = first; paste_index != one_past_last; paste_index += step){
|
||||
if (paste_index != first){
|
||||
string_list_push(scratch, &list, SCu8("\n", 1));
|
||||
}
|
||||
String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index);
|
||||
if (string.size > 0){
|
||||
string_list_push(scratch, &list, string);
|
||||
}
|
||||
}
|
||||
|
||||
String_Const_u8 flattened = string_list_flatten(scratch, list);
|
||||
|
||||
buffer_replace_range(app, buffer, range, flattened);
|
||||
i64 pos = range.min;
|
||||
finish_range.min = pos;
|
||||
finish_range.max = pos + total_size;
|
||||
view_set_mark(app, view, seek_pos(finish_range.min));
|
||||
view_set_cursor_and_preferred_x(app, view, seek_pos(finish_range.max));
|
||||
|
||||
// TODO(allen): Send this to all views.
|
||||
Theme_Color paste;
|
||||
paste.tag = Stag_Paste;
|
||||
get_theme_colors(app, &paste, 1);
|
||||
view_post_fade(app, view, 0.667f, finish_range, paste.color);
|
||||
}
|
||||
}
|
||||
return(finish_range);
|
||||
}
|
||||
|
||||
static void
|
||||
multi_paste_interactive_up_down(Application_Links *app, i32 paste_count, i32 clip_count){
|
||||
View_ID view = get_active_view(app, AccessOpen);
|
||||
i64 pos = view_get_cursor_pos(app, view);
|
||||
b32 old_to_new = true;
|
||||
Range_i64 range = multi_paste_range(app, view, Ii64(pos), paste_count, old_to_new);
|
||||
|
||||
Query_Bar bar = {};
|
||||
bar.prompt = string_u8_litexpr("Up and Down to condense and expand paste stages; R to reverse order; Return to finish; Escape to abort.");
|
||||
if (start_query_bar(app, &bar, 0) == 0) return;
|
||||
|
||||
User_Input in = {};
|
||||
for (;;){
|
||||
in = get_user_input(app, EventOnAnyKey, EventOnEsc);
|
||||
if (in.abort) break;
|
||||
|
||||
b32 did_modify = false;
|
||||
if (in.key.keycode == key_up){
|
||||
if (paste_count > 1){
|
||||
--paste_count;
|
||||
did_modify = true;
|
||||
}
|
||||
}
|
||||
else if (in.key.keycode == key_down){
|
||||
if (paste_count < clip_count){
|
||||
++paste_count;
|
||||
did_modify = true;
|
||||
}
|
||||
}
|
||||
else if (in.key.keycode == 'r' || in.key.keycode == 'R'){
|
||||
old_to_new = !old_to_new;
|
||||
did_modify = true;
|
||||
}
|
||||
else if (in.key.keycode == '\n'){
|
||||
break;
|
||||
}
|
||||
|
||||
if (did_modify){
|
||||
range = multi_paste_range(app, view, range, paste_count, old_to_new);
|
||||
}
|
||||
}
|
||||
|
||||
if (in.abort){
|
||||
Buffer_ID buffer = view_get_buffer(app, view, AccessOpen);
|
||||
buffer_replace_range(app, buffer, range, SCu8(""));
|
||||
}
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(multi_paste_interactive){
|
||||
i32 clip_count = clipboard_count(app, 0);
|
||||
if (clip_count > 0){
|
||||
multi_paste_interactive_up_down(app, 1, clip_count);
|
||||
}
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(multi_paste_interactive_quick){
|
||||
i32 clip_count = clipboard_count(app, 0);
|
||||
if (clip_count > 0){
|
||||
u8 string_space[256];
|
||||
Query_Bar bar = {};
|
||||
bar.prompt = string_u8_litexpr("How Many Slots To Paste: ");
|
||||
bar.string = SCu8(string_space, (umem)0);
|
||||
bar.string_capacity = sizeof(string_space);
|
||||
query_user_number(app, &bar);
|
||||
|
||||
i32 initial_paste_count = (i32)string_to_integer(bar.string, 10);
|
||||
initial_paste_count = clamp(1, initial_paste_count, clip_count);
|
||||
end_query_bar(app, &bar, 0);
|
||||
|
||||
multi_paste_interactive_up_down(app, initial_paste_count, clip_count);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal i32
|
||||
record_get_new_cursor_position_undo(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info record){
|
||||
i32 new_edit_position = 0;
|
||||
switch (record.kind){
|
||||
|
@ -1640,13 +1809,13 @@ record_get_new_cursor_position_undo(Application_Links *app, Buffer_ID buffer_id,
|
|||
return(new_edit_position);
|
||||
}
|
||||
|
||||
static i32
|
||||
internal i32
|
||||
record_get_new_cursor_position_undo(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){
|
||||
Record_Info record = buffer_history_get_record_info(app, buffer_id, index);
|
||||
return(record_get_new_cursor_position_undo(app, buffer_id, index, record));
|
||||
}
|
||||
|
||||
static i32
|
||||
internal i32
|
||||
record_get_new_cursor_position_redo(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info record){
|
||||
i64 new_edit_position = 0;
|
||||
switch (record.kind){
|
||||
|
@ -1664,7 +1833,7 @@ record_get_new_cursor_position_redo(Application_Links *app, Buffer_ID buffer_id,
|
|||
return((i32)(new_edit_position));
|
||||
}
|
||||
|
||||
static i32
|
||||
internal i32
|
||||
record_get_new_cursor_position_redo(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){
|
||||
Record_Info record = buffer_history_get_record_info(app, buffer_id, index);
|
||||
return(record_get_new_cursor_position_redo(app, buffer_id, index, record));
|
||||
|
|
|
@ -795,9 +795,9 @@ RENDER_CALLER_SIG(default_render_caller){
|
|||
}
|
||||
|
||||
HOOK_SIG(default_exit){
|
||||
// If this returns zero it cancels the exit.
|
||||
// If this returns false it cancels the exit.
|
||||
|
||||
i32 result = 1;
|
||||
b32 result = true;
|
||||
|
||||
if (!allow_immediate_close_without_checking_for_changes){
|
||||
b32 has_unsaved_changes = false;
|
||||
|
@ -813,7 +813,7 @@ HOOK_SIG(default_exit){
|
|||
if (has_unsaved_changes){
|
||||
View_ID view = get_active_view(app, AccessAll);
|
||||
do_gui_sure_to_close_4coder(app, view);
|
||||
result = 0;
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
#include "4coder_function_list.cpp"
|
||||
#include "4coder_scope_commands.cpp"
|
||||
#include "4coder_combined_write_commands.cpp"
|
||||
#include "4coder_miblo_numbers.cpp"
|
||||
|
||||
#include "4coder_default_hooks.cpp"
|
||||
#include "4coder_remapping_commands.cpp"
|
||||
|
|
|
@ -1,235 +0,0 @@
|
|||
/*
|
||||
4coder_experiments.cpp - Supplies extension bindings to the defaults with experimental new features.
|
||||
*/
|
||||
|
||||
// TOP
|
||||
|
||||
// TODO(allen): move all out of experimental
|
||||
|
||||
#include "4coder_default_include.cpp"
|
||||
#include "4coder_miblo_numbers.cpp"
|
||||
|
||||
#define NO_BINDING
|
||||
#include "4coder_default_bindings.cpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// NOTE(allen): An experimental mutli-pasting thing
|
||||
|
||||
CUSTOM_COMMAND_SIG(multi_paste){
|
||||
Scratch_Block scratch(app);
|
||||
|
||||
i32 count = clipboard_count(app, 0);
|
||||
if (count > 0){
|
||||
View_ID view = get_active_view(app, AccessOpen);
|
||||
Managed_Scope scope = view_get_managed_scope(app, view);
|
||||
|
||||
Rewrite_Type *rewrite = scope_attachment(app, scope, view_rewrite_loc, Rewrite_Type);
|
||||
if (*rewrite == Rewrite_Paste){
|
||||
Rewrite_Type *next_rewrite = scope_attachment(app, scope, view_next_rewrite_loc, Rewrite_Type);
|
||||
*next_rewrite = Rewrite_Paste;
|
||||
i32 *paste_index_ptr = scope_attachment(app, scope, view_paste_index_loc, i32);
|
||||
i32 paste_index = (*paste_index_ptr) + 1;
|
||||
*paste_index_ptr = paste_index;
|
||||
|
||||
String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index);
|
||||
|
||||
String_Const_u8 insert_string = push_u8_stringf(scratch, "\n%.*s", string_expand(string));
|
||||
|
||||
Buffer_ID buffer = view_get_buffer(app, view, AccessOpen);
|
||||
Range_i64 range = get_view_range(app, view);
|
||||
buffer_replace_range(app, buffer, Ii64(range.max), insert_string);
|
||||
view_set_mark(app, view, seek_pos(range.max + 1));
|
||||
view_set_cursor_and_preferred_x(app, view, seek_pos(range.max + insert_string.size));
|
||||
|
||||
Theme_Color paste = {};
|
||||
paste.tag = Stag_Paste;
|
||||
get_theme_colors(app, &paste, 1);
|
||||
view_post_fade(app, view, 0.667f, Ii64(range.max + 1, range.max + insert_string.size), paste.color);
|
||||
}
|
||||
else{
|
||||
paste(app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Range_i64
|
||||
multi_paste_range(Application_Links *app, View_ID view, Range_i64 range, i32 paste_count, b32 old_to_new){
|
||||
Scratch_Block scratch(app);
|
||||
|
||||
Range_i64 finish_range = range;
|
||||
if (paste_count >= 1){
|
||||
Buffer_ID buffer = view_get_buffer(app, view, AccessOpen);
|
||||
if (buffer != 0){
|
||||
i64 total_size = 0;
|
||||
for (i32 paste_index = 0; paste_index < paste_count; ++paste_index){
|
||||
Temp_Memory temp = begin_temp(scratch);
|
||||
String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index);
|
||||
total_size += string.size + 1;
|
||||
end_temp(temp);
|
||||
}
|
||||
total_size -= 1;
|
||||
|
||||
i32 first = paste_count - 1;
|
||||
i32 one_past_last = -1;
|
||||
i32 step = -1;
|
||||
if (!old_to_new){
|
||||
first = 0;
|
||||
one_past_last = paste_count;
|
||||
step = 1;
|
||||
}
|
||||
|
||||
List_String_Const_u8 list = {};
|
||||
|
||||
for (i32 paste_index = first; paste_index != one_past_last; paste_index += step){
|
||||
if (paste_index != first){
|
||||
string_list_push(scratch, &list, SCu8("\n", 1));
|
||||
}
|
||||
String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index);
|
||||
if (string.size > 0){
|
||||
string_list_push(scratch, &list, string);
|
||||
}
|
||||
}
|
||||
|
||||
String_Const_u8 flattened = string_list_flatten(scratch, list);
|
||||
|
||||
buffer_replace_range(app, buffer, range, flattened);
|
||||
i64 pos = range.min;
|
||||
finish_range.min = pos;
|
||||
finish_range.max = pos + total_size;
|
||||
view_set_mark(app, view, seek_pos(finish_range.min));
|
||||
view_set_cursor_and_preferred_x(app, view, seek_pos(finish_range.max));
|
||||
|
||||
// TODO(allen): Send this to all views.
|
||||
Theme_Color paste;
|
||||
paste.tag = Stag_Paste;
|
||||
get_theme_colors(app, &paste, 1);
|
||||
view_post_fade(app, view, 0.667f, finish_range, paste.color);
|
||||
}
|
||||
}
|
||||
return(finish_range);
|
||||
}
|
||||
|
||||
static void
|
||||
multi_paste_interactive_up_down(Application_Links *app, i32 paste_count, i32 clip_count){
|
||||
View_ID view = get_active_view(app, AccessOpen);
|
||||
i64 pos = view_get_cursor_pos(app, view);
|
||||
b32 old_to_new = true;
|
||||
Range_i64 range = multi_paste_range(app, view, Ii64(pos), paste_count, old_to_new);
|
||||
|
||||
Query_Bar bar = {};
|
||||
bar.prompt = string_u8_litexpr("Up and Down to condense and expand paste stages; R to reverse order; Return to finish; Escape to abort.");
|
||||
if (start_query_bar(app, &bar, 0) == 0) return;
|
||||
|
||||
User_Input in = {};
|
||||
for (;;){
|
||||
in = get_user_input(app, EventOnAnyKey, EventOnEsc);
|
||||
if (in.abort) break;
|
||||
|
||||
b32 did_modify = false;
|
||||
if (in.key.keycode == key_up){
|
||||
if (paste_count > 1){
|
||||
--paste_count;
|
||||
did_modify = true;
|
||||
}
|
||||
}
|
||||
else if (in.key.keycode == key_down){
|
||||
if (paste_count < clip_count){
|
||||
++paste_count;
|
||||
did_modify = true;
|
||||
}
|
||||
}
|
||||
else if (in.key.keycode == 'r' || in.key.keycode == 'R'){
|
||||
old_to_new = !old_to_new;
|
||||
did_modify = true;
|
||||
}
|
||||
else if (in.key.keycode == '\n'){
|
||||
break;
|
||||
}
|
||||
|
||||
if (did_modify){
|
||||
range = multi_paste_range(app, view, range, paste_count, old_to_new);
|
||||
}
|
||||
}
|
||||
|
||||
if (in.abort){
|
||||
Buffer_ID buffer = view_get_buffer(app, view, AccessOpen);
|
||||
buffer_replace_range(app, buffer, range, SCu8(""));
|
||||
}
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(multi_paste_interactive){
|
||||
i32 clip_count = clipboard_count(app, 0);
|
||||
if (clip_count > 0){
|
||||
multi_paste_interactive_up_down(app, 1, clip_count);
|
||||
}
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(multi_paste_interactive_quick){
|
||||
i32 clip_count = clipboard_count(app, 0);
|
||||
if (clip_count > 0){
|
||||
u8 string_space[256];
|
||||
Query_Bar bar = {};
|
||||
bar.prompt = string_u8_litexpr("How Many Slots To Paste: ");
|
||||
bar.string = SCu8(string_space, (umem)0);
|
||||
bar.string_capacity = sizeof(string_space);
|
||||
query_user_number(app, &bar);
|
||||
|
||||
i32 initial_paste_count = (i32)string_to_integer(bar.string, 10);
|
||||
initial_paste_count = clamp(1, initial_paste_count, clip_count);
|
||||
end_query_bar(app, &bar, 0);
|
||||
|
||||
multi_paste_interactive_up_down(app, initial_paste_count, clip_count);
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" i32
|
||||
get_bindings(void *data, i32 size){
|
||||
Bind_Helper context_ = begin_bind_helper(data, size);
|
||||
Bind_Helper *context = &context_;
|
||||
|
||||
set_hook(context, hook_buffer_viewer_update, default_view_adjust);
|
||||
|
||||
set_start_hook(context, default_start);
|
||||
set_open_file_hook(context, default_file_settings);
|
||||
set_new_file_hook(context, default_new_file);
|
||||
set_save_file_hook(context, default_file_save);
|
||||
set_file_edit_range_hook(context, default_file_edit_range);
|
||||
set_file_externally_modified_hook(context, default_file_externally_modified);
|
||||
|
||||
set_end_file_hook(context, end_file_close_jump_list);
|
||||
|
||||
set_command_caller(context, default_command_caller);
|
||||
set_render_caller(context, default_render_caller);
|
||||
set_input_filter(context, default_suppress_mouse_filter);
|
||||
set_scroll_rule(context, smooth_scroll_rule);
|
||||
set_buffer_name_resolver(context, default_buffer_name_resolution);
|
||||
set_modify_color_table_hook(context, default_modify_color_table);
|
||||
set_get_view_buffer_region_hook(context, default_view_buffer_region);
|
||||
|
||||
default_keys(context);
|
||||
|
||||
// NOTE(allen|a4.0.6): Command maps can be opened more than
|
||||
// once so that you can extend existing maps very easily.
|
||||
// You can also use the helper "restart_map" instead of
|
||||
// begin_map to clear everything that was in the map and
|
||||
// bind new things instead.
|
||||
begin_map(context, mapid_file);
|
||||
//bind(context, key_back, MDFR_ALT|MDFR_CTRL, kill_rect);
|
||||
//bind(context, ' ', MDFR_ALT|MDFR_CTRL, multi_line_edit);
|
||||
|
||||
bind(context, key_page_up, MDFR_ALT, miblo_increment_time_stamp);
|
||||
bind(context, key_page_down, MDFR_ALT, miblo_decrement_time_stamp);
|
||||
|
||||
bind(context, key_home, MDFR_ALT, miblo_increment_time_stamp_minute);
|
||||
bind(context, key_end, MDFR_ALT, miblo_decrement_time_stamp_minute);
|
||||
|
||||
bind(context, 'b', MDFR_CTRL, multi_paste_interactive_quick);
|
||||
bind(context, 'A', MDFR_CTRL, replace_in_all_buffers);
|
||||
end_map(context);
|
||||
|
||||
return(end_bind_helper(context));
|
||||
}
|
||||
|
||||
// BOTTOM
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#define PROC_LINKS(x,y) y
|
||||
#endif
|
||||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_mac_default);
|
||||
CUSTOM_COMMAND_SIG(seek_beginning_of_textual_line);
|
||||
CUSTOM_COMMAND_SIG(seek_end_of_textual_line);
|
||||
CUSTOM_COMMAND_SIG(seek_beginning_of_line);
|
||||
|
@ -227,14 +227,14 @@ CUSTOM_COMMAND_SIG(comment_line);
|
|||
CUSTOM_COMMAND_SIG(uncomment_line);
|
||||
CUSTOM_COMMAND_SIG(comment_line_toggle);
|
||||
CUSTOM_COMMAND_SIG(snippet_lister);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_choose);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_default);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_mac_default);
|
||||
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);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_choose);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_default);
|
||||
#endif
|
||||
struct Command_Metadata{
|
||||
PROC_LINKS(Custom_Command_Function, void) *proc;
|
||||
|
@ -247,7 +247,7 @@ i32 source_name_len;
|
|||
i32 line_number;
|
||||
};
|
||||
static Command_Metadata fcoder_metacmd_table[226] = {
|
||||
{ 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, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 249 },
|
||||
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 62 },
|
||||
{ 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, "w:\\4ed\\code\\4coder_seek.cpp", 27, 29 },
|
||||
{ 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, "w:\\4ed\\code\\4coder_seek.cpp", 27, 35 },
|
||||
{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 27, 41 },
|
||||
|
@ -359,11 +359,11 @@ static Command_Metadata fcoder_metacmd_table[226] = {
|
|||
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1597 },
|
||||
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1605 },
|
||||
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1615 },
|
||||
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1673 },
|
||||
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1686 },
|
||||
{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1700 },
|
||||
{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1771 },
|
||||
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1872 },
|
||||
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1842 },
|
||||
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1855 },
|
||||
{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1869 },
|
||||
{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1940 },
|
||||
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 2041 },
|
||||
{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 8 },
|
||||
{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\4coder_lists.cpp", 28, 15 },
|
||||
{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "w:\\4ed\\code\\4coder_lists.cpp", 28, 30 },
|
||||
|
@ -465,16 +465,16 @@ static Command_Metadata fcoder_metacmd_table[226] = {
|
|||
{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 137 },
|
||||
{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 149 },
|
||||
{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 233 },
|
||||
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 41 },
|
||||
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 51 },
|
||||
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 62 },
|
||||
{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 29 },
|
||||
{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 44 },
|
||||
{ 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, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 231 },
|
||||
{ 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, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 237 },
|
||||
{ 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, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 243 },
|
||||
{ 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, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 249 },
|
||||
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 41 },
|
||||
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 51 },
|
||||
};
|
||||
static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 0;
|
||||
static i32 fcoder_metacmd_ID_set_bindings_mac_default = 0;
|
||||
static i32 fcoder_metacmd_ID_seek_beginning_of_textual_line = 1;
|
||||
static i32 fcoder_metacmd_ID_seek_end_of_textual_line = 2;
|
||||
static i32 fcoder_metacmd_ID_seek_beginning_of_line = 3;
|
||||
|
@ -692,12 +692,12 @@ static i32 fcoder_metacmd_ID_comment_line = 214;
|
|||
static i32 fcoder_metacmd_ID_uncomment_line = 215;
|
||||
static i32 fcoder_metacmd_ID_comment_line_toggle = 216;
|
||||
static i32 fcoder_metacmd_ID_snippet_lister = 217;
|
||||
static i32 fcoder_metacmd_ID_set_bindings_choose = 218;
|
||||
static i32 fcoder_metacmd_ID_set_bindings_default = 219;
|
||||
static i32 fcoder_metacmd_ID_set_bindings_mac_default = 220;
|
||||
static i32 fcoder_metacmd_ID_miblo_increment_basic = 221;
|
||||
static i32 fcoder_metacmd_ID_miblo_decrement_basic = 222;
|
||||
static i32 fcoder_metacmd_ID_miblo_increment_time_stamp = 223;
|
||||
static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp = 224;
|
||||
static i32 fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 225;
|
||||
static i32 fcoder_metacmd_ID_miblo_increment_basic = 218;
|
||||
static i32 fcoder_metacmd_ID_miblo_decrement_basic = 219;
|
||||
static i32 fcoder_metacmd_ID_miblo_increment_time_stamp = 220;
|
||||
static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp = 221;
|
||||
static i32 fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 222;
|
||||
static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 223;
|
||||
static i32 fcoder_metacmd_ID_set_bindings_choose = 224;
|
||||
static i32 fcoder_metacmd_ID_set_bindings_default = 225;
|
||||
#endif
|
||||
|
|
|
@ -111,7 +111,6 @@ char **platform_includes[Platform_COUNT][Compiler_COUNT] = {
|
|||
|
||||
enum{
|
||||
Custom_Default,
|
||||
Custom_Experiments,
|
||||
Custom_Casey,
|
||||
Custom_ChronalVim,
|
||||
//
|
||||
|
@ -120,7 +119,6 @@ enum{
|
|||
|
||||
char *custom_files[] = {
|
||||
"../code/4coder_default_bindings.cpp",
|
||||
"../code/4coder_experiments.cpp",
|
||||
"../code/4coder_casey.cpp",
|
||||
"../4vim/4coder_chronal.cpp",
|
||||
};
|
||||
|
@ -569,8 +567,7 @@ build_main(Arena *arena, char *cdir, b32 update_local_theme, u32 flags, u32 arch
|
|||
|
||||
internal void
|
||||
standard_build(Arena *arena, char *cdir, u32 flags, u32 arch){
|
||||
//do_buildsuper(arena, cdir, fm_str(arena, custom_files[Custom_Default]), arch);
|
||||
do_buildsuper(arena, cdir, fm_str(arena, custom_files[Custom_Experiments]), arch);
|
||||
do_buildsuper(arena, cdir, fm_str(arena, custom_files[Custom_Default]), arch);
|
||||
//do_buildsuper(arena, cdir, fm_str(arena, custom_files[Custom_Casey]), arch);
|
||||
//do_buildsuper(arena, cdir, fm_str(arena, custom_files[Custom_ChronalVim]), arch);
|
||||
|
||||
|
|
Loading…
Reference in New Issue