Compare commits

..

2 Commits

Author SHA1 Message Date
Krzosa Karol
239126db70 f12 2026-01-07 09:00:06 +01:00
Krzosa Karol
59320a749a Start the guide 2026-01-07 08:59:54 +01:00
3 changed files with 27 additions and 4 deletions

View File

@@ -1138,7 +1138,7 @@ void CMD_OpenUpFolder() {
BSet main = GetBSet(PrimaryWindowID); BSet main = GetBSet(PrimaryWindowID);
String name = ChopLastSlash(main.buffer->name); String name = ChopLastSlash(main.buffer->name);
Open(name); Open(name);
} RegisterCommand(CMD_OpenUpFolder, "ctrl-period", "Open current's file directory or up directory in other cases"); } RegisterCommand(CMD_OpenUpFolder, "ctrl-o", "Open current's file directory or up directory in other cases");
void CMD_EncloseLine() { void CMD_EncloseLine() {
BSet active = GetBSet(ActiveWindowID); BSet active = GetBSet(ActiveWindowID);
@@ -1182,7 +1182,7 @@ void CMD_OpenLoadWord() {
// window->active_goto_list = active.view->id; // window->active_goto_list = active.view->id;
// window->goto_list_pos = active.view->carets[0].range.min; // window->goto_list_pos = active.view->carets[0].range.min;
Open(load_word); Open(load_word);
} RegisterCommand(CMD_OpenLoadWord, "ctrl-q", "Open a link under the caret (file link, url, command) or open the selection"); } RegisterCommand(CMD_OpenLoadWord, "ctrl-q | f12", "Open a link under the caret (file link, url, command) or open the selection");
void CMD_KillSelectedLines() { void CMD_KillSelectedLines() {
BSet active = GetBSet(ActiveWindowID); BSet active = GetBSet(ActiveWindowID);

23
src/text_editor/guide.txt Normal file
View File

@@ -0,0 +1,23 @@
Hi! Welcome to my world, the world where text is all around and plentiful. I'm tee,
a simple text editor that hopefully will help you in your text journey!
Execute some of these using your mouse right button, hover over a
word like ":New" and click!
:New (ctrl-n) - create new text file
:OpenUpFolder (ctrl-o) - navigate directories
:ShowCommands (ctrl-shift-p) - open up the command lister
:ShowBufferList (ctrl-p) - open up a lister with open files
Alternatively you can open with your keyboard - ctrl-q / f12, try that also!
-----------------------------------------------------------------------------------------
Navigate to next parts of the guide by executing them like these commands you just played
with:
guide_big_picture.txt
guide_project.txt
guide_bindings_and_config.txt

View File

@@ -363,7 +363,7 @@ void CMD_SearchProject() {
View *view = WindowOpenBufferView(main.window, search_project_buffer->name); View *view = WindowOpenBufferView(main.window, search_project_buffer->name);
view->special = true; view->special = true;
view->kind = ViewKind_ActiveSearch; view->kind = ViewKind_ActiveSearch;
AddHook(&view->hooks, "Open", "ctrl-q | enter", CMD_CommandWindowOpen); AddHook(&view->hooks, "Open", "ctrl-q | enter | f12", CMD_CommandWindowOpen);
SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0)); SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0));
if (string.len) { if (string.len) {
Replace(view, string); Replace(view, string);
@@ -373,7 +373,7 @@ void CMD_SearchProject() {
void SetFuzzy(View *view) { void SetFuzzy(View *view) {
view->kind = ViewKind_FuzzySearch; view->kind = ViewKind_FuzzySearch;
AddHook(&view->hooks, "Open", "ctrl-q | enter", CMD_CommandWindowOpen); AddHook(&view->hooks, "Open", "ctrl-q | enter | f12", CMD_CommandWindowOpen);
} }
void CommandWindowInit() { void CommandWindowInit() {