Update todo, add indent size option
This commit is contained in:
@@ -394,8 +394,9 @@ void GenerateConfig() {
|
|||||||
colors.add({"TitleBarSelection", "GruvboxLight3"});
|
colors.add({"TitleBarSelection", "GruvboxLight3"});
|
||||||
|
|
||||||
Array<Var> style = {};
|
Array<Var> style = {};
|
||||||
style.add({"DrawLineNumbers", "0"});
|
style.add({"DrawLineNumbers", "1"});
|
||||||
style.add({"DrawScrollbar", "0"});
|
style.add({"DrawScrollbar", "1"});
|
||||||
|
style.add({"IndentSize", "2"});
|
||||||
|
|
||||||
{
|
{
|
||||||
MA_Scratch scratch;
|
MA_Scratch scratch;
|
||||||
|
|||||||
@@ -67,11 +67,12 @@ void Command_IndentSelectedLines(View *view, bool shift = false) {
|
|||||||
Range pos_range_of_line = GetLineRange(*buffer, i);
|
Range pos_range_of_line = GetLineRange(*buffer, i);
|
||||||
|
|
||||||
if (!shift) {
|
if (!shift) {
|
||||||
AddEdit(&edits, {pos_range_of_line.min, pos_range_of_line.min}, L" ");
|
String16 whitespace_string = {L" ", StyleIndentSize};
|
||||||
|
AddEdit(&edits, {pos_range_of_line.min, pos_range_of_line.min}, whitespace_string);
|
||||||
} else {
|
} else {
|
||||||
String16 string = GetString(*buffer, pos_range_of_line);
|
String16 string = GetString(*buffer, pos_range_of_line);
|
||||||
Int whitespace_len = 0;
|
Int whitespace_len = 0;
|
||||||
for (Int i = 0; i < 4 && i < string.len && string.data[i] == ' '; i += 1) {
|
for (Int i = 0; i < StyleIndentSize && i < string.len && string.data[i] == ' '; i += 1) {
|
||||||
whitespace_len += 1;
|
whitespace_len += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,9 @@ Color.TitleBarText = GruvboxDark2
|
|||||||
Color.TitleBarBackground = GruvboxLight1
|
Color.TitleBarBackground = GruvboxLight1
|
||||||
Color.TitleBarSelection = GruvboxLight3
|
Color.TitleBarSelection = GruvboxLight3
|
||||||
Style = {}
|
Style = {}
|
||||||
Style.DrawLineNumbers = 0
|
Style.DrawLineNumbers = 1
|
||||||
Style.DrawScrollbar = 0
|
Style.DrawScrollbar = 1
|
||||||
|
Style.IndentSize = 2
|
||||||
|
|
||||||
-- @todo: should we rewrite linux paths to windows on windows and vice-versa?
|
-- @todo: should we rewrite linux paths to windows on windows and vice-versa?
|
||||||
|
|
||||||
@@ -213,4 +214,5 @@ void ReloadStyle() {
|
|||||||
ColorTitleBarSelection = GetColor("TitleBarSelection", ColorTitleBarSelection);
|
ColorTitleBarSelection = GetColor("TitleBarSelection", ColorTitleBarSelection);
|
||||||
StyleDrawLineNumbers = GetStyle("DrawLineNumbers", StyleDrawLineNumbers);
|
StyleDrawLineNumbers = GetStyle("DrawLineNumbers", StyleDrawLineNumbers);
|
||||||
StyleDrawScrollbar = GetStyle("DrawScrollbar", StyleDrawScrollbar);
|
StyleDrawScrollbar = GetStyle("DrawScrollbar", StyleDrawScrollbar);
|
||||||
|
StyleIndentSize = GetStyle("IndentSize", StyleIndentSize);
|
||||||
}
|
}
|
||||||
@@ -51,5 +51,6 @@ Color ColorScrollbarScrollerSelected = GruvboxLight0Hard;
|
|||||||
Color ColorTitleBarText = GruvboxDark2;
|
Color ColorTitleBarText = GruvboxDark2;
|
||||||
Color ColorTitleBarBackground = GruvboxLight1;
|
Color ColorTitleBarBackground = GruvboxLight1;
|
||||||
Color ColorTitleBarSelection = GruvboxLight3;
|
Color ColorTitleBarSelection = GruvboxLight3;
|
||||||
Int StyleDrawLineNumbers = 0;
|
Int StyleDrawLineNumbers = 1;
|
||||||
Int StyleDrawScrollbar = 0;
|
Int StyleDrawScrollbar = 1;
|
||||||
|
Int StyleIndentSize = 2;
|
||||||
@@ -3,31 +3,39 @@
|
|||||||
- scrolling when clicking on scroller is busted
|
- scrolling when clicking on scroller is busted
|
||||||
- page up and down should also scroll and leave you in exactly same scroll
|
- page up and down should also scroll and leave you in exactly same scroll
|
||||||
- something about mouse stuff is busted and it randomly does big selections and stuff like that
|
- something about mouse stuff is busted and it randomly does big selections and stuff like that
|
||||||
|
|
||||||
- underline the word which can be loaded / executed
|
|
||||||
- search as a command to execute which is going to be in the title bar
|
|
||||||
- I think the way sublime text and we display line highlights is confusing with multiple cursors (line highlight can be confused with selection)
|
- I think the way sublime text and we display line highlights is confusing with multiple cursors (line highlight can be confused with selection)
|
||||||
|
- don't trim lines with cursor or selection on it
|
||||||
|
|
||||||
- commands:
|
- search backwards
|
||||||
- trim whitespace
|
- underline the word which can be loaded / executed
|
||||||
|
- load selected string or auto enclosed word when midclick?, ctrl + click, ctrl + e?
|
||||||
|
- experiment with using multiple cursors to select command and it's input
|
||||||
|
- search as a command to execute which is going to be in the title bar
|
||||||
- Ctrl + G should select the line number in bar
|
- Ctrl + G should select the line number in bar
|
||||||
- How to make search into bar?
|
- auto register commands, but we need to figure out how to properly structure lua stuff
|
||||||
- command window should close on esacpe but make it more coherent
|
- command window should close on esacpe but make it more coherent
|
||||||
- auto register commands
|
- make the editor replayable, store events and then replay, be careful about globals
|
||||||
|
- plumbing: look for raw buffer name then for filename with path
|
||||||
|
- try using buffer path for opening files
|
||||||
|
- maybe also add cursor selection to buffer name area
|
||||||
|
- I want a way to assign flags to buffers/views/windows from user perspective so that console window concept can be created from user space
|
||||||
|
- Search all buffers in 10X style, incrementally searched results popping up on every key press (maybe we need coroutine library in C so this is easier?)
|
||||||
|
- Implement shell interaction (here we also could use the coroutine library)
|
||||||
|
- word complete
|
||||||
|
- Colored strings
|
||||||
|
- Set scroll centered
|
||||||
|
- font cache and on demand unicode loads
|
||||||
|
- Search and replace
|
||||||
|
- Search result buffer
|
||||||
|
- yeet sheet
|
||||||
|
|
||||||
- simulation:
|
|
||||||
- make the editor replayable, store events and then replay
|
|
||||||
- be careful about globals
|
|
||||||
|
|
||||||
- Windows
|
- Windows
|
||||||
- layout using a tree!!
|
- layout using a tree!!
|
||||||
- search as part of title window?
|
- I don't think we need WindowIDs
|
||||||
- layouting, resize windows
|
- layouting, resize windows
|
||||||
- maybe we can use first line number to use the window?
|
|
||||||
- try to incorporate the acme square which allows you to put windows wherever and also scale the border
|
- try to incorporate the acme square which allows you to put windows wherever and also scale the border
|
||||||
- window borders as flag
|
|
||||||
- Modify error popups to not focus, introduce a interaction timer which after some time will make window invisible
|
|
||||||
- Implement shell interaction in a console buffer
|
|
||||||
|
|
||||||
- files
|
- files
|
||||||
- load directory
|
- load directory
|
||||||
@@ -35,26 +43,3 @@
|
|||||||
- commands should run in a directory specified by buffer so you don't have to specify whole path
|
- commands should run in a directory specified by buffer so you don't have to specify whole path
|
||||||
- each buffer would need a directory even the special ones: C:\a\b\c\+errors
|
- each buffer would need a directory even the special ones: C:\a\b\c\+errors
|
||||||
- this could be used for storing the path in the command window
|
- this could be used for storing the path in the command window
|
||||||
|
|
||||||
- plumbing
|
|
||||||
- add rule which first tries to look for open buffers and then if that fails we go look for files
|
|
||||||
- move all logic to config files
|
|
||||||
|
|
||||||
- execution
|
|
||||||
- experiment with using multiple cursors to select command and it's input
|
|
||||||
|
|
||||||
- mouse
|
|
||||||
- open selected string or auto enclosed word when right clicking or middle (this needs to be also handled on keyboard level)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- word completion
|
|
||||||
- Colored strings
|
|
||||||
- Set scroll centered
|
|
||||||
|
|
||||||
- font cache and on demand unicode loads
|
|
||||||
|
|
||||||
- Search all buffers
|
|
||||||
- Search and replace
|
|
||||||
- Search result buffer
|
|
||||||
- yeet sheet
|
|
||||||
|
|||||||
Reference in New Issue
Block a user