diff --git a/TODO.md b/TODO.md index c8a97f80..18e06e88 100644 --- a/TODO.md +++ b/TODO.md @@ -1,11 +1,11 @@ # TODO + PRIME DIRECTIVE: SIMPLIFY ## Necessary -[] fix project creation - this should just work out of the box -[] remove automatic code layout for now [] remove parser [] fast enough to go read a node_modules folder and search on it +[] figure out why the built version has a different font size than this one. ## Nice to Have [] 4coder projects should have a startup script - so you can do things like add cl to the path @@ -19,4 +19,6 @@ PRIME DIRECTIVE: SIMPLIFY # DONE [x] reload dirty files if there are no local edits to them automatically [x] remove audio (search @Remove) -[x] backspace through entire filename in navigation strip at top \ No newline at end of file +[x] backspace through entire filename in navigation strip at top +[x] fix project creation - this should just work out of the box +[x] remove automatic code layout for now \ No newline at end of file diff --git a/code/4ed_working_set.cpp b/code/4ed_working_set.cpp index 6aff179e..4008a959 100644 --- a/code/4ed_working_set.cpp +++ b/code/4ed_working_set.cpp @@ -395,7 +395,7 @@ buffer_bind_name(Thread_Context *tctx, Models *models, Arena *scratch, Working_S node != used_nodes; node = node->next){ Editing_File *file_ptr = CastFromMember(Editing_File, main_chain_node, node); - if (file_ptr != 0 && string_match(base_name, string_from_file_name(&file_ptr->base_name))){ + if (file_ptr != 0 && string_match(base_name, string_from_file_name(&file_ptr->unique_name))){ Node_Ptr *new_node = push_array(scratch, Node_Ptr, 1); sll_queue_push(conflict_first, conflict_last, new_node); new_node->file_ptr = file_ptr; diff --git a/code/custom/4coder_config.cpp b/code/custom/4coder_config.cpp index 254cec93..a2ee9a8a 100644 --- a/code/custom/4coder_config.cpp +++ b/code/custom/4coder_config.cpp @@ -39,8 +39,7 @@ def_search_normal_fopen(Arena *arena, char *file_name, char *opt){ // NOTE(allen): Extension List function String_Const_u8_Array -parse_extension_line_to_extension_list(Application_Links *app, Arena *arena, String_Const_u8 str){ - ProfileScope(app, "parse extension line to extension list"); +parse_extension_line_to_extension_list(Arena *arena, String_Const_u8 str){ i32 count = 0; for (u64 i = 0; i < str.size; i += 1){ if (str.str[i] == '.'){ @@ -65,6 +64,13 @@ parse_extension_line_to_extension_list(Application_Links *app, Arena *arena, Str return(array); } + +function String_Const_u8_Array +parse_extension_line_to_extension_list(Application_Links *app, Arena *arena, String_Const_u8 str){ + ProfileScope(app, "parse extension line to extension list"); + return parse_extension_line_to_extension_list(arena, str); +} + //////////////////////////////// // NOTE(allen): Token Array diff --git a/code/custom/4coder_project_commands.cpp b/code/custom/4coder_project_commands.cpp index 4e2f7818..eeed9da3 100644 --- a/code/custom/4coder_project_commands.cpp +++ b/code/custom/4coder_project_commands.cpp @@ -459,17 +459,23 @@ prj_generate_project(Arena *scratch, String8 script_path, String8 script_file, S String8 file_name = push_u8_stringf(scratch, "%.*s/project.4coder", string_expand(script_path)); + String8 treat_as_code = def_get_config_string(scratch, vars_save_string_lit("treat_as_code")); + String8Array extensions = parse_extension_line_to_extension_list(scratch, treat_as_code); + FILE *out = fopen((char*)file_name.str, "wb"); if (out != 0){ fprintf(out, "version(2);\n"); fprintf(out, "project_name = \"%.*s\";\n", string_expand(binary_file)); fprintf(out, "patterns = {\n"); - fprintf(out, "\"*.c\",\n"); - fprintf(out, "\"*.cpp\",\n"); - fprintf(out, "\"*.h\",\n"); - fprintf(out, "\"*.m\",\n"); - fprintf(out, "\"*.bat\",\n"); - fprintf(out, "\"*.sh\",\n"); + for (i32 i = 0; i < extensions.count; i++) { + fprintf(out, "\"*.%.*s\",\n", string_expand(extensions.strings[i])); + } + // fprintf(out, "\"*.c\",\n"); + // fprintf(out, "\"*.cpp\",\n"); + // fprintf(out, "\"*.h\",\n"); + // fprintf(out, "\"*.m\",\n"); + // fprintf(out, "\"*.bat\",\n"); + // fprintf(out, "\"*.sh\",\n"); fprintf(out, "\"*.4coder\",\n"); fprintf(out, "};\n"); fprintf(out, "blacklist_patterns = {\n"); diff --git a/code/custom/generated/command_metadata.h b/code/custom/generated/command_metadata.h index 57441fd7..039da088 100644 --- a/code/custom/generated/command_metadata.h +++ b/code/custom/generated/command_metadata.h @@ -316,7 +316,7 @@ static Command_Metadata fcoder_metacmd_table[269] = { { PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 378 }, { PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 391 }, { PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "C:\\projects\\4coder_gs\\code\\custom\\4coder_clipboard.cpp", 54, 7 }, -{ PROC_LINKS(close_all_code, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 829 }, +{ PROC_LINKS(close_all_code, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 835 }, { PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "C:\\projects\\4coder_gs\\code\\custom\\4coder_build_commands.cpp", 59, 175 }, { PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 809 }, { PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "C:\\projects\\4coder_gs\\code\\custom\\4coder_docs.cpp", 49, 190 }, @@ -346,7 +346,7 @@ static Command_Metadata fcoder_metacmd_table[269] = { { PROC_LINKS(execute_any_cli, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_cli_command.cpp", 56, 22 }, { PROC_LINKS(execute_previous_cli, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_cli_command.cpp", 56, 7 }, { PROC_LINKS(exit_4coder, 0), false, "exit_4coder", 11, "Attempts to close 4coder.", 25, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 981 }, -{ PROC_LINKS(go_to_user_directory, 0), false, "go_to_user_directory", 20, "Go to the 4coder user directory", 31, "C:\\projects\\4coder_gs\\code\\custom\\4coder_config.cpp", 51, 1655 }, +{ PROC_LINKS(go_to_user_directory, 0), false, "go_to_user_directory", 20, "Go to the 4coder user directory", 31, "C:\\projects\\4coder_gs\\code\\custom\\4coder_config.cpp", 51, 1661 }, { PROC_LINKS(goto_beginning_of_file, 0), false, "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "C:\\projects\\4coder_gs\\code\\custom\\4coder_helper.cpp", 51, 2258 }, { PROC_LINKS(goto_end_of_file, 0), false, "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "C:\\projects\\4coder_gs\\code\\custom\\4coder_helper.cpp", 51, 2266 }, { PROC_LINKS(goto_first_jump, 0), false, "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "C:\\projects\\4coder_gs\\code\\custom\\4coder_jump_sticky.cpp", 56, 525 }, @@ -394,8 +394,8 @@ static Command_Metadata fcoder_metacmd_table[269] = { { PROC_LINKS(list_all_substring_locations, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_search.cpp", 51, 174 }, { PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_search.cpp", 51, 186 }, { PROC_LINKS(lister_search_all, 0), true, "lister_search_all", 17, "Runs a search lister on all code indices of the project", 55, "C:\\projects\\4coder_gs\\code\\custom\\4coder_code_index_listers.cpp", 63, 176 }, -{ PROC_LINKS(load_project, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 856 }, -{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "C:\\projects\\4coder_gs\\code\\custom\\4coder_config.cpp", 51, 1611 }, +{ PROC_LINKS(load_project, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 862 }, +{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "C:\\projects\\4coder_gs\\code\\custom\\4coder_config.cpp", 51, 1617 }, { PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "C:\\projects\\4coder_gs\\code\\custom\\4coder_default_framework.cpp", 62, 535 }, { PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "C:\\projects\\4coder_gs\\code\\custom\\4coder_default_framework.cpp", 62, 554 }, { PROC_LINKS(make_directory_query, 0), false, "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 1630 }, @@ -435,8 +435,8 @@ static Command_Metadata fcoder_metacmd_table[269] = { { PROC_LINKS(multi_paste, 0), false, "multi_paste", 11, "Paste multiple entries from the clipboard at once", 49, "C:\\projects\\4coder_gs\\code\\custom\\4coder_clipboard.cpp", 54, 229 }, { PROC_LINKS(multi_paste_interactive, 0), false, "multi_paste_interactive", 23, "Paste multiple lines from the clipboard history, controlled with arrow keys", 75, "C:\\projects\\4coder_gs\\code\\custom\\4coder_clipboard.cpp", 54, 371 }, { PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "C:\\projects\\4coder_gs\\code\\custom\\4coder_clipboard.cpp", 54, 380 }, -{ PROC_LINKS(open_all_code, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 838 }, -{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 847 }, +{ PROC_LINKS(open_all_code, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 844 }, +{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 853 }, { PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 1736 }, { PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 2219 }, { PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "C:\\projects\\4coder_gs\\code\\custom\\4coder_combined_write_commands.cpp", 68, 46 }, @@ -457,26 +457,26 @@ static Command_Metadata fcoder_metacmd_table[269] = { { PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "C:\\projects\\4coder_gs\\code\\custom\\4coder_profile.cpp", 52, 219 }, { PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "C:\\projects\\4coder_gs\\code\\custom\\4coder_profile.cpp", 52, 212 }, { PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "C:\\projects\\4coder_gs\\code\\custom\\4coder_profile_inspect.cpp", 60, 886 }, -{ PROC_LINKS(project_command_F1, 0), false, "project_command_F1", 18, "Run the command with index 1", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1084 }, -{ PROC_LINKS(project_command_F10, 0), false, "project_command_F10", 19, "Run the command with index 10", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1138 }, -{ PROC_LINKS(project_command_F11, 0), false, "project_command_F11", 19, "Run the command with index 11", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1144 }, -{ PROC_LINKS(project_command_F12, 0), false, "project_command_F12", 19, "Run the command with index 12", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1150 }, -{ PROC_LINKS(project_command_F13, 0), false, "project_command_F13", 19, "Run the command with index 13", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1156 }, -{ PROC_LINKS(project_command_F14, 0), false, "project_command_F14", 19, "Run the command with index 14", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1162 }, -{ PROC_LINKS(project_command_F15, 0), false, "project_command_F15", 19, "Run the command with index 15", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1168 }, -{ PROC_LINKS(project_command_F16, 0), false, "project_command_F16", 19, "Run the command with index 16", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1174 }, -{ PROC_LINKS(project_command_F2, 0), false, "project_command_F2", 18, "Run the command with index 2", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1090 }, -{ PROC_LINKS(project_command_F3, 0), false, "project_command_F3", 18, "Run the command with index 3", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1096 }, -{ PROC_LINKS(project_command_F4, 0), false, "project_command_F4", 18, "Run the command with index 4", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1102 }, -{ PROC_LINKS(project_command_F5, 0), false, "project_command_F5", 18, "Run the command with index 5", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1108 }, -{ PROC_LINKS(project_command_F6, 0), false, "project_command_F6", 18, "Run the command with index 6", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1114 }, -{ PROC_LINKS(project_command_F7, 0), false, "project_command_F7", 18, "Run the command with index 7", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1120 }, -{ PROC_LINKS(project_command_F8, 0), false, "project_command_F8", 18, "Run the command with index 8", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1126 }, -{ PROC_LINKS(project_command_F9, 0), false, "project_command_F9", 18, "Run the command with index 9", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1132 }, -{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1036 }, -{ PROC_LINKS(project_fkey_command, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 974 }, -{ PROC_LINKS(project_go_to_root_directory, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1000 }, -{ PROC_LINKS(project_reprint, 0), false, "project_reprint", 15, "Prints the current project to the file it was loaded from; prints in the most recent project file version", 105, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1046 }, +{ PROC_LINKS(project_command_F1, 0), false, "project_command_F1", 18, "Run the command with index 1", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1090 }, +{ PROC_LINKS(project_command_F10, 0), false, "project_command_F10", 19, "Run the command with index 10", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1144 }, +{ PROC_LINKS(project_command_F11, 0), false, "project_command_F11", 19, "Run the command with index 11", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1150 }, +{ PROC_LINKS(project_command_F12, 0), false, "project_command_F12", 19, "Run the command with index 12", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1156 }, +{ PROC_LINKS(project_command_F13, 0), false, "project_command_F13", 19, "Run the command with index 13", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1162 }, +{ PROC_LINKS(project_command_F14, 0), false, "project_command_F14", 19, "Run the command with index 14", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1168 }, +{ PROC_LINKS(project_command_F15, 0), false, "project_command_F15", 19, "Run the command with index 15", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1174 }, +{ PROC_LINKS(project_command_F16, 0), false, "project_command_F16", 19, "Run the command with index 16", 29, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1180 }, +{ PROC_LINKS(project_command_F2, 0), false, "project_command_F2", 18, "Run the command with index 2", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1096 }, +{ PROC_LINKS(project_command_F3, 0), false, "project_command_F3", 18, "Run the command with index 3", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1102 }, +{ PROC_LINKS(project_command_F4, 0), false, "project_command_F4", 18, "Run the command with index 4", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1108 }, +{ PROC_LINKS(project_command_F5, 0), false, "project_command_F5", 18, "Run the command with index 5", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1114 }, +{ PROC_LINKS(project_command_F6, 0), false, "project_command_F6", 18, "Run the command with index 6", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1120 }, +{ PROC_LINKS(project_command_F7, 0), false, "project_command_F7", 18, "Run the command with index 7", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1126 }, +{ PROC_LINKS(project_command_F8, 0), false, "project_command_F8", 18, "Run the command with index 8", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1132 }, +{ PROC_LINKS(project_command_F9, 0), false, "project_command_F9", 18, "Run the command with index 9", 28, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1138 }, +{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1042 }, +{ PROC_LINKS(project_fkey_command, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 980 }, +{ PROC_LINKS(project_go_to_root_directory, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1006 }, +{ PROC_LINKS(project_reprint, 0), false, "project_reprint", 15, "Prints the current project to the file it was loaded from; prints in the most recent project file version", 105, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1052 }, { PROC_LINKS(query_replace, 0), false, "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 1417 }, { PROC_LINKS(query_replace_identifier, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 1438 }, { PROC_LINKS(query_replace_selection, 0), false, "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 1454 }, @@ -515,10 +515,10 @@ static Command_Metadata fcoder_metacmd_table[269] = { { PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 115 }, { PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "C:\\projects\\4coder_gs\\code\\custom\\4coder_default_framework.cpp", 62, 499 }, { PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "C:\\projects\\4coder_gs\\code\\custom\\4coder_default_framework.cpp", 62, 493 }, -{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1018 }, -{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1030 }, -{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1024 }, -{ PROC_LINKS(setup_new_project, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1011 }, +{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1024 }, +{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1036 }, +{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "C:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1030 }, +{ PROC_LINKS(setup_new_project, 0), false, "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:\\projects\\4coder_gs\\code\\custom\\4coder_project_commands.cpp", 61, 1017 }, { PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 832 }, { PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "C:\\projects\\4coder_gs\\code\\custom\\4coder_base_commands.cpp", 58, 818 }, { PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "C:\\projects\\4coder_gs\\code\\custom\\4coder_log_parser.cpp", 55, 991 }, diff --git a/code/ship_files/config.4coder b/code/ship_files/config.4coder index 31ce55a3..00ea9ea3 100644 --- a/code/ship_files/config.4coder +++ b/code/ship_files/config.4coder @@ -40,14 +40,14 @@ mark_thickness = 2; lister_roundness = 20; // Code Wrapping -treat_as_code = ".cpp.c.hpp.h.cc.cs.java.rs.glsl.m.mm"; -enable_virtual_whitespace = true; -virtual_whitespace_regular_indent = 4; -enable_code_wrapping = true; +treat_as_code = ".cpp.c.hpp.h.cc.cs.java.rs.glsl.m.mm.js.ts.tsx.css.html.jai.json"; +enable_virtual_whitespace = false; +virtual_whitespace_regular_indent = 2; +enable_code_wrapping = false; // This only applies to code files in code-wrapping mode. // Plain text and code files without virtual-whitespace will not be effected. -automatically_indent_text_on_save = true; +automatically_indent_text_on_save = false; // When set to true, all unsaved changes will be saved on a build. automatically_save_changes_on_build = true; @@ -57,11 +57,11 @@ automatically_load_project = false; // Indentation indent_with_tabs = false; -indent_width = 4; -default_tab_width = 4; +indent_width = 2; +default_tab_width = 2; // Theme -default_theme_name = "4coder"; +default_theme_name = "theme-gs"; // Font default_font_name = "liberation-mono.ttf"; diff --git a/code/ship_files/themes/theme-gs.4coder b/code/ship_files/themes/theme-gs.4coder new file mode 100644 index 00000000..346f315f --- /dev/null +++ b/code/ship_files/themes/theme-gs.4coder @@ -0,0 +1,69 @@ +defcolor_bar = 0xFF1e1e1e; +defcolor_base = 0xFFfcaa05; +defcolor_pop1 = 0xffde8150; +defcolor_pop2 = 0xFFFF0000; +defcolor_back = 0xFF1e1e1e; +defcolor_margin = 0xFF222425; +defcolor_margin_hover = 0xff63523d; +defcolor_margin_active = 0xff63523d; +defcolor_list_item = { 0xFF222425, defcolor_back}; +defcolor_list_item_hover = { 0xff362e25, defcolor_margin}; +defcolor_list_item_active = { 0xff63523d, defcolor_margin}; +defcolor_cursor = { 0xFF00EE00, 0xffe0741b, 0xff1be094, 0xffba60c4 }; +defcolor_at_cursor = 0xFF0C0C0C; +defcolor_highlight_cursor_line = 0xFF1E1E1E; +defcolor_highlight = 0xFF303040; +defcolor_at_highlight = 0xFFFF44DD; +defcolor_mark = 0xFF494949; +defcolor_text_default = 0xffd4d4d4; +defcolor_comment = 0xff6a9956; +defcolor_comment_pop = { 0xff2ab34f, 0xFFdb2828 }; +defcolor_keyword = 0xffc586c0; +defcolor_str_constant = 0xffa77864; +defcolor_char_constant = 0xffa77864; +defcolor_int_constant = 0xffb4cda7; +defcolor_float_constant = 0xffb4cda7; +defcolor_bool_constant = 0xffb4cda7; +defcolor_preproc = 0xFFc485bf; +defcolor_include = 0xffc485bf; +defcolor_special_character = 0xFFFF0000; +defcolor_ghost_character = 0xFF4E5E46; +defcolor_highlight_junk = 0xFF3A0000; +defcolor_highlight_white = 0xFF003A3A; +defcolor_paste = 0xFFDDEE00; +defcolor_undo = 0xFF00DDEE; +defcolor_back_cycle = { defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back, defcolor_back}; +defcolor_text_cycle = { 0xFFA00000, 0xFF00A000, 0xFF0030B0, 0xFFA0A000 }; +defcolor_line_numbers_back = defcolor_back; +defcolor_line_numbers_text = 0xFF404040; + +fleury_color_syntax_crap = 0xff5c4d3c; +fleury_color_operators = 0xFFbd2d2d; +fleury_color_inactive_pane_overlay = 0x44000000; +fleury_color_inactive_pane_background = #1e1e1e; +fleury_color_file_progress_bar = 0x60634323; +fleury_color_brace_highlight = { 0xff8ffff2 }; +fleury_color_brace_line = { 0x809ba290 }; +fleury_color_brace_annotation = { 0x809ba290 }; +fleury_color_index_product_type = 0xFFedb211; +fleury_color_index_sum_type = 0xFFa7eb13; +fleury_color_index_function = 0xFFde451f; +fleury_color_index_macro = 0xFF2895c7; +fleury_color_index_constant = 0xff6eb535; +fleury_color_index_comment_tag = 0xffffae00; +fleury_color_index_decl = 0xffc9598a; +fleury_color_cursor_macro = 0xffde2368; +fleury_color_cursor_power_mode = 0xffefaf2f; +fleury_color_cursor_inactive = 0xFF880000; +fleury_color_plot_cycle = { 0xff03d3fc, 0xff22b80b, 0xfff0bb0c, 0xfff0500c }; +fleury_color_token_highlight = 0x88f2d357; +fleury_color_token_minor_highlight = 0x44d19045; +fleury_color_error_annotation = 0xffff0000; +fleury_color_lego_grab = 0xffefaf6f; +fleury_color_lego_splat = 0xffefaaef; +fleury_color_comment_user_name = 0xffffdd23; + +defcolor_function = 0xffdadaa9; +defcolor_operator = 0xffc5c5c5; +defcolor_type = 0xff4dc5ac; +defcolor_macro = 0xff5190c5; \ No newline at end of file