From f836f60b3b7b1f014f51867d3ee8709b5f99dc3b Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 11 Nov 2017 13:03:14 -0500 Subject: [PATCH] Site modifications --- 4coder_remapping_commands.cpp | 11 +- 4ed_api_implementation.cpp | 2 +- project.4coder | 2 +- site/source_material/binding_list.txt | 241 ++++++++++++++++++++++++-- 4 files changed, 229 insertions(+), 27 deletions(-) diff --git a/4coder_remapping_commands.cpp b/4coder_remapping_commands.cpp index 7fbbc8e8..cc30d797 100644 --- a/4coder_remapping_commands.cpp +++ b/4coder_remapping_commands.cpp @@ -155,8 +155,8 @@ default_key_template(Bind_Helper *context, int32_t t){ bind_vanilla_keys(context, write_character); bind(context, key_mouse_left, B_None, t, click_set_cursor); - bind(context, key_mouse_right, B_None, t, click_set_mark); bind(context, key_mouse_left_release, B_None, t, click_set_mark); + bind(context, key_mouse_right, B_None, t, click_set_mark); bind(context, key_left, B_None, t, move_left); bind(context, key_right, B_None, t, move_right); @@ -341,9 +341,8 @@ mac_default_keys(Bind_Helper *context){ bind_vanilla_keys(context, write_character); bind(context, key_mouse_left, MDFR_NONE, click_set_cursor); - bind(context, key_mouse_right, MDFR_NONE, click_set_mark); - 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); @@ -363,15 +362,15 @@ mac_default_keys(Bind_Helper *context){ 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_up, MDFR_CTRL, move_up_10); - bind(context, key_down, MDFR_CTRL, move_down_10); + bind(context, key_up, MDFR_ALT, move_up_10); + bind(context, key_down, MDFR_ALT, move_down_10); 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, ' ', MDFR_CTRL, set_mark); bind(context, 'a', MDFR_CMND, replace_in_range); bind(context, 'c', MDFR_CMND, copy); bind(context, 'd', MDFR_CMND, delete_range); diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 43be3bd8..00a7cf4b 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -2517,7 +2517,7 @@ DOC_PARAM(rel_path, This parameter specifies the path to change to, may include DOC_PARAM(rel_len, This parameter specifies the length of the rel_path string.) DOC_RETURN(This call returns non-zero if the call succeeds.) DOC( -This call succeeds if the new directory exists and the it fits inside the dir buffer. If the call succeeds the dir buffer is filled with the new directory and len is overwritten with the length of the new string in the buffer. +This call succeeds if the new directory exists and it fits inside the dir buffer. If the call succeeds the dir buffer is filled with the new directory and len is overwritten with the length of the new string in the buffer. For instance if dir contains "C:/Users/MySelf" and rel is "Documents" the buffer will contain "C:/Users/MySelf/Documents" and len will contain the length of that string. This call can also be used with rel set to ".." to traverse to parent folders. )*/{ diff --git a/project.4coder b/project.4coder index 6954b467..7ccf28ce 100644 --- a/project.4coder +++ b/project.4coder @@ -1,4 +1,4 @@ -extensions = ".c.cpp.h.m.bat.sh.4coder"; +extensions = ".c.cpp.h.m.bat.sh.4coder.txt"; open_recursively = true; fkey_command_win[1] = {"echo build: x64 & build.bat", "*compilation*" , true , true }; diff --git a/site/source_material/binding_list.txt b/site/source_material/binding_list.txt index 3b160c99..7604f15c 100644 --- a/site/source_material/binding_list.txt +++ b/site/source_material/binding_list.txt @@ -1,9 +1,30 @@ \INCLUDE{site_header.txt} -These are the default key bindings in 4coder version \VERSION +4coder version \VERSION -\SECTION{Global Bindings} +\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 +\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 +\END + +\SECTION{Map: default} + +\SECTION{Global} The following bindings apply in all situations. \LIST \ITEM \STYLE{code} \END Create a new panel with a vertical split @@ -19,6 +40,7 @@ The following bindings apply in all situations. \ITEM \STYLE{code} \END Switch open buffer dialogue \ITEM \STYLE{code} \END 'Save As' - save file into new name \ITEM \STYLE{code} \END Set hot directory to projet root directory + \ITEM \STYLE{code} \END Save all dirty buffers \ITEM \STYLE{code} \END Open color and font selection GUI \ITEM \STYLE{code} \END Open a debug information GUI @@ -33,7 +55,7 @@ The following bindings apply in all situations. \ITEM \STYLE{code} \END Execute arbitrary shell/terminal command in arbitrary buffer \ITEM \STYLE{code} \END Repeat previous shell/terminal command - \ITEM \STYLE{code} \END Execute 4coder internal command + \ITEM \STYLE{code} \END Execute "long command" (see long command section) \ITEM \STYLE{code} \END Show scrollbar \ITEM \STYLE{code} \END Hide scrollbar @@ -66,18 +88,7 @@ The following bindings apply in all situations. \END \END -\SECTION{4coder Internal Command} -Long name commands that can be typed in after \STYLE{code} \END 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 - \END -\END - -\SECTION{Text File Bindings} +\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} \END Insert character @@ -109,7 +120,8 @@ The following bindings apply in general text files and most apply in code files, \ITEM \STYLE{code} \END Delete word backwards \ITEM \STYLE{code} \END Delete word forwards - \ITEM \STYLE{code} \END snipe_token_or_word + \ITEM \STYLE{code} \END Snipe token (or word) left + \ITEM \STYLE{code} \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} \END Set mark to the cursor position @@ -152,7 +164,7 @@ The following bindings apply in general text files and most apply in code files, \END \END -\SECTION{Code File Bindings} +\SECTION{Code File} The following commands only apply in C/C++ files where the lexer (syntax highlighting) is turned on. \LIST @@ -169,9 +181,10 @@ The following commands only apply in C/C++ files where the lexer (syntax highlig \ITEM \STYLE{code} \END Auto indent the range \ITEM \STYLE{code} \END Auto indent the line at the cursor + \ITEM \STYLE{code} \END Insert a HACK commment + \ITEM \STYLE{code} \END Insert a block comment \ITEM \STYLE{code} \END Insert a TODO comment \ITEM \STYLE{code} \END Insert a NOTE comment - \ITEM \STYLE{code} \END Insert a block comment \ITEM \STYLE{code} \END Open a pair of braces \ITEM \STYLE{code} \END Open a pair of braces ended with a semicolon \ITEM \STYLE{code} \END Open a pair of braces ended with a break @@ -182,4 +195,194 @@ The following commands only apply in C/C++ files where the lexer (syntax highlig \ITEM \STYLE{code} \END List all function signatures in the current buffer \END -\END \ No newline at end of file +\END + +\END + +\SECTION{Map: mac-4coder-like} +This map is identical to "default" except that it uses different modifiers. + +"ctrl" is replaced with "ctrl" OR "alt" +"alt" is replaced with "cmnd" + +This setup is meant to match the jobs of the keys on the Mac keyboard to the jobs +of the keys in the relatively same position on other keyboards. +\END + +\SECTION{Map: mac-default} + +\SECTION{Global} +The following bindings apply in all situations. + \LIST + \ITEM \STYLE{code} \END Create a new panel with a vertical split + \ITEM \STYLE{code} \END Create a new panel with a horizontal split + \ITEM \STYLE{code} \END Close a panel + \ITEM \STYLE{code} \END Change active panel + \ITEM \STYLE{code} \END change active panel backwards + + \ITEM \STYLE{code} \END New file dialogue + \ITEM \STYLE{code} \END Open file dialogue + \ITEM \STYLE{code} \END Open file dialogue in other panel + \ITEM \STYLE{code} \END Kill buffer dialogue + \ITEM \STYLE{code} \END Switch open buffer dialogue + \ITEM \STYLE{code} \END 'Save As' - save file into new name + \ITEM \STYLE{code} \END Set hot directory to projet root directory + + \ITEM \STYLE{code} \END Open color and font selection GUI + \ITEM \STYLE{code} \END Open a debug information GUI + + \ITEM \STYLE{code} \END Change to footer build panel + \ITEM \STYLE{code} \END Close footer build panel + \ITEM \STYLE{code} \END Goto next error/jump location + \ITEM \STYLE{code} \END Goto previous error/jump location + \ITEM \STYLE{code} \END Goto first error/jump location + \ITEM \STYLE{code} \END Launch basic build (calls build.bat, build.sh, or Makefile) + + \ITEM \STYLE{code} \END Execute arbitrary shell/terminal command in arbitrary buffer + \ITEM \STYLE{code} \END Repeat previous shell/terminal command + + \ITEM \STYLE{code} \END Execute "long command" (see long command section) + + \ITEM \STYLE{code} \END Show scrollbar + \ITEM \STYLE{code} \END Hide scrollbar + \ITEM \STYLE{code} \END Toggle filebar + + \ITEM \STYLE{code} \END Toggle mouse input + \ITEM \STYLE{code} \END Toggle fullscreen mode + \ITEM \STYLE{code} \END Exit 4coder + + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + \ITEM \STYLE{code} \END Launch shell command set in a loaded project + + \END +\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} \END Insert character + + \ITEM \STYLE{code} \END Set cursor position to mouse position + \ITEM \STYLE{code} \END Set mark position to mouse position + \ITEM \STYLE{code} \END Set mark position to mouse position + + \ITEM \STYLE{code} \END Move left + \ITEM \STYLE{code} \END Move right + \ITEM \STYLE{code} \END Delete character + \ITEM \STYLE{code} \END Delete character + \ITEM \STYLE{code} \END Backspace character + \ITEM \STYLE{code} \END Backspace character + \ITEM \STYLE{code} \END Move up + \ITEM \STYLE{code} \END Move up + \ITEM \STYLE{code} \END Move to end of line + \ITEM \STYLE{code} \END Move to beginning of line + \ITEM \STYLE{code} \END Move up one whole page + \ITEM \STYLE{code} \END Move down one whole page + + \ITEM \STYLE{code} \END Seek right, stop at whitespace + \ITEM \STYLE{code} \END Seek left, stop at whitespace + \ITEM \STYLE{code} \END Seek up, stop at blank line + \ITEM \STYLE{code} \END Seek down, stop at blank line + + \ITEM \STYLE{code} \END Move up ten lines + \ITEM \STYLE{code} \END Move down ten lines + + \ITEM \STYLE{code} \END Delete word backwards + \ITEM \STYLE{code} \END Delete word forwards + \ITEM \STYLE{code} \END Snipe token (or word) left + \ITEM \STYLE{code} \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} \END Set mark to the cursor position + \ITEM \STYLE{code} \END Replace a substring in the range + \ITEM \STYLE{code} \END Copy text from the range + \ITEM \STYLE{code} \END Delete the text in the range + \ITEM \STYLE{code} \END Center the active view on the cursor + \ITEM \STYLE{code} \END Move the view so that it's left edge is near the cursor's current x position + \ITEM \STYLE{code} \END Begin an incremental search through the current buffer + \ITEM \STYLE{code} \END Create a jump location list of all loaded exact matches of a string + \ITEM \STYLE{code} \END Create a jump location list of all loaded substring matches of a string without case sensitivity + \ITEM \STYLE{code} \END Goto a specific line number + \ITEM \STYLE{code} \END Convert text in the range to lowercase + \ITEM \STYLE{code} \END Kill the current buffer + \ITEM \STYLE{code} \END Toggle line wrapping on the current buffer + \ITEM \STYLE{code} \END Swap the cursor and mark positions + \ITEM \STYLE{code} \END Reload the current buffer from the file system + \ITEM \STYLE{code} \END Begin an iterative query replace + \ITEM \STYLE{code} \END Begin an iterative query replace to replace the word under the cursor + \ITEM \STYLE{code} \END Begin a reversed incremental search through the current buffer + \ITEM \STYLE{code} \END Save the current buffer with it's given filename + \ITEM \STYLE{code} \END Begin an incremenal search through the current buffer for the word under the cursor + \ITEM \STYLE{code} \END Create a jump location list of all loaded exact matches of the word under the cursor + \ITEM \STYLE{code} \END Convert text in the range to uppercase + \ITEM \STYLE{code} \END Paste from the clipboard + \ITEM \STYLE{code} \END Toggle the virtual whitespace system + \ITEM \STYLE{code} \END Paste the next item on the clipboard, 4coder keeps a finite history of past 64 copies + \ITEM \STYLE{code} \END Copy text from the range and delete the range (aka cut) + \ITEM \STYLE{code} \END Redo + \ITEM \STYLE{code} \END Undo + + \ITEM \STYLE{code} \END Decrease the line wrap width for the current buffer + \ITEM \STYLE{code} \END Increase the line wrap width for the current buffer + + \ITEM \STYLE{code} \END Toggle the show whitespace option + \ITEM \STYLE{code} \END Clean trailing whitespace from all lines + \ITEM \STYLE{code} \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} \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} \END Seek right stop at alphanumeric or camel case + \ITEM \STYLE{code} \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} \END Automatically complete partial word + \ITEM \STYLE{code} \END Auto indent the range + \ITEM \STYLE{code} \END Auto indent the line at the cursor + + \ITEM \STYLE{code} \END Insert a HACK comment + \ITEM \STYLE{code} \END Insert a block comment + \ITEM \STYLE{code} \END Insert a TODO comment + \ITEM \STYLE{code} \END Insert a NOTE comment + \ITEM \STYLE{code} \END Open a pair of braces + \ITEM \STYLE{code} \END Open a pair of braces ended with a semicolon + \ITEM \STYLE{code} \END Open a pair of braces ended with a break + \ITEM \STYLE{code} \END Surround the range with #if 0 and #endif + \ITEM \STYLE{code} \END Try to open a file named by the string surrounded by quotes under the cursor + \ITEM \STYLE{code} \END Switch from .cpp \STYLE{code} <-> \END .h + \ITEM \STYLE{code} \END Insert the characters " = {0};" + \ITEM \STYLE{code} \END List all function signatures in the current buffer + + \END +\END + +\END + +