Skip to content

Commit

Permalink
Multi caret docs + Make find in files form dockable
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Sep 29, 2024
1 parent 60a1e5d commit c72094d
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 20 deletions.
Binary file added DocGen/images/multicaret-homeend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DocGen/images/multicaret-individual.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DocGen/images/multicaret.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion DocGen/source/simba/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Simba
.. toctree::
:maxdepth: 2

codetools.rst
codetools.rst
multicaret.rst
22 changes: 22 additions & 0 deletions DocGen/source/simba/multicaret.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
###########
Multi Caret
###########

The editor allows multiple carets with pressing :code:`Shift`, :code:`Control` and :code:`Left Click`.

Individually adding carets
""""""""""""""""""""""""""

.. image:: ../../images/multicaret-individual.gif

Adding carets to a selection
""""""""""""""""""""""""""""

.. image:: ../../images/multicaret.gif

Moving to start or end of line
""""""""""""""""""""""""""""""

Press the :code:`Home/End` key to move to the :code:`Start/End` of the lines.

.. image:: ../../images/multicaret-homeend.gif
5 changes: 2 additions & 3 deletions Source/ide/simba.form_findinfiles.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ object SimbaFindInFilesForm: TSimbaFindInFilesForm
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
Position = poMainFormCenter
ShowInTaskBar = stAlways
LCLVersion = '3.0.0.3'
LCLVersion = '3.4.0.0'
object PanelMatches: TPanel
Left = 12
Height = 167
Expand All @@ -30,7 +29,7 @@ object SimbaFindInFilesForm: TSimbaFindInFilesForm
TabOrder = 0
object MatchesLabel: TLabel
Left = 0
Height = 25
Height = 20
Top = 7
Width = 726
Align = alTop
Expand Down
8 changes: 0 additions & 8 deletions Source/ide/simba.form_findinfiles.pas
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ TSimbaFindInFilesForm = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure DialogSelectDirClose(Sender: TObject);
procedure FormShow(Sender: TObject);
private
Searcher: TSynEditSearch;
ButtonFind: TSimbaButton;
Expand Down Expand Up @@ -262,13 +261,6 @@ procedure TSimbaFindInFilesForm.DialogSelectDirClose(Sender: TObject);
EditLocation.Edit.Text := DialogSelectDir.FileName;
end;

procedure TSimbaFindInFilesForm.FormShow(Sender: TObject);
begin
ActiveControl := EditSearch;
if EditSearch.CanSetFocus() then
EditSearch.SetFocus();
end;

procedure TSimbaFindInFilesForm.DoSearching;
var
Total: Integer;
Expand Down
12 changes: 8 additions & 4 deletions Source/ide/simba.form_main.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object SimbaMainForm: TSimbaMainForm
Left = 4007
Left = -1136
Height = 539
Top = 508
Top = 461
Width = 1015
Caption = 'Simba'
ClientHeight = 539
Expand Down Expand Up @@ -438,6 +438,10 @@ object SimbaMainForm: TSimbaMainForm
AutoCheck = True
Caption = 'Backups'
end
object MenuItemFindInFiles: TMenuItem
AutoCheck = True
Caption = 'Find In Files'
end
object MenuItem3: TMenuItem
Caption = '-'
end
Expand Down Expand Up @@ -2807,11 +2811,11 @@ object SimbaMainForm: TSimbaMainForm
object MainMenuSearchSep1: TMenuItem
Caption = '-'
end
object MenuItemFindInFiles: TMenuItem
object MenuItemSearchFindInFiles: TMenuItem
Caption = 'Find in Files ...'
ImageIndex = 59
ShortCut = 24646
OnClick = MenuItemFindInFilesClick
OnClick = MenuItemSearchFindInFilesClick
end
object MainMenuSearchSep2: TMenuItem
Caption = '-'
Expand Down
12 changes: 8 additions & 4 deletions Source/ide/simba.form_main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ interface
TSimbaMainForm = class(TForm)
DockPanel: TAnchorDockPanel;
Images: TImageList;
MenuItemFindInFiles: TMenuItem;
MenuItemBackup: TMenuItem;
MenuItemRunLast: TMenuItem;
MenuItemShowCompilerHints: TMenuItem;
Expand All @@ -77,7 +78,7 @@ TSimbaMainForm = class(TForm)
MenuItemFind: TMenuItem;
MenuItemFindNext: TMenuItem;
MenuItemFindPrev: TMenuItem;
MenuItemFindInFiles: TMenuItem;
MenuItemSearchFindInFiles: TMenuItem;
MenuItemReplace: TMenuItem;
MenuItemGoto: TMenuItem;
MenuItemLowercase: TMenuItem;
Expand Down Expand Up @@ -188,7 +189,7 @@ TSimbaMainForm = class(TForm)
procedure MenuFindClick(Sender: TObject);
procedure MenuGotoClick(Sender: TObject);
procedure MenuItemDownloadSimbaClick(Sender: TObject);
procedure MenuItemFindInFilesClick(Sender: TObject);
procedure MenuItemSearchFindInFilesClick(Sender: TObject);
procedure MenuItemRunLastClick(Sender: TObject);
procedure MenuItemSelectLineClick(Sender: TObject);
procedure MenuItemSelectWordClick(Sender: TObject);
Expand Down Expand Up @@ -617,6 +618,7 @@ procedure TSimbaMainForm.Setup;
DockMaster.MakeDockable(SimbaDebugImageForm, MenuItemDebugImage);
DockMaster.MakeDockable(SimbaColorPickHistoryForm, MenuItemColourHistory);
DockMaster.MakeDockable(SimbaBackupsForm, MenuItemBackup);
DockMaster.MakeDockable(SimbaFindInFilesForm, MenuItemFindInFiles);

if (SimbaSettings.General.Layout.Value <> '') then
begin
Expand Down Expand Up @@ -809,9 +811,11 @@ procedure TSimbaMainForm.MenuItemDownloadSimbaClick(Sender: TObject);
SimbaDownloadSimbaForm.ShowModal();
end;

procedure TSimbaMainForm.MenuItemFindInFilesClick(Sender: TObject);
procedure TSimbaMainForm.MenuItemSearchFindInFilesClick(Sender: TObject);
begin
SimbaFindInFilesForm.ShowModal();
MenuItemFindInFiles.Checked := True;
if Assigned(MenuItemFindInFiles.OnClick) then
MenuItemFindInFiles.OnClick(MenuItemFindInFiles);
end;

procedure TSimbaMainForm.MenuItemRunLastClick(Sender: TObject);
Expand Down

0 comments on commit c72094d

Please sign in to comment.