1. Herbert Breunung
  2. Kephra

Commits

Herbert Breunung  committed b9794a0

added forewardings for most core ediing commands

  • Participants
  • Parent commits 2f30bed
  • Branches default

Comments (0)

Files changed (7)

File lib/Kephra/App/Bar/Document.pm

View file
 Kephra::CommandList::register_cmd_namespace('document');
 Kephra::CommandList::register_switch_var('Kephra::API::docbar');
 Kephra::CommandList::register_cmd({
-	'-select-left' => { 
-		sub => '$_->select_page_left',    label => 'Previous Tab',keys => 'ctrl+pageup', 
-		help => ''},
-	'-select-right' => {
-		sub => '$_->select_page_right',   label => 'Next Tab',keys => 'ctrl+pagedown',
-		help => ''},
-	'-select-leftmost'=> {
-		sub => '$_->select_page_leftmost',label => 'First Tab',keys => 'ctrl+shift+pageup',
-		help => ''},
-	'-select-rightmost' => {
-		sub => '$_->select_page_rightmost',label => 'Last Tab',keys => 'ctrl+shift+pagedown',
-		help => ''},
-	'-move-left' => {
-		sub => '$_->move_page_left',     label => 'Move Left',keys => 'alt+pageup',
-		help => ''},
-	'-move-right' => {
-		sub => '$_->move_page_right',    label => 'Move Right', keys => 'alt+pagedown',
-		help => ''},
-	'-move-leftmost'  => {
-		sub => '$_->move_page_leftmost', label => 'Move Leftmost',keys => 'alt+shift+pageup',
-		help => ''},
-	'-move-rightmost' => {
-		sub => '$_->move_page_rightmost',label => 'Move Rightmost',keys => 'alt+shift+pagedown',
-		help => ''},
+	'-select-left'   => { sub =>'$_->select_page_left',    label =>'Previous Tab',keys => 'ctrl+pageup'},
+	'-select-right'  => { sub =>'$_->select_page_right',   label =>'Next Tab',    keys => 'ctrl+pagedown'},
+	'-select-leftmost'=>{ sub =>'$_->select_page_leftmost',label =>'First Tab',   keys => 'ctrl+shift+pageup'},
+	'-select-rightmost'=>{sub =>'$_->select_page_rightmost',label=>'Last Tab',    keys => 'ctrl+shift+pagedown'},
+	'-move-left'     => { sub =>'$_->move_page_left',      label =>'Move Left',   keys => 'alt+pageup'},
+	'-move-right'    => { sub =>'$_->move_page_right',     label =>'Move Right',  keys => 'alt+pagedown'},
+	'-move-leftmost' => { sub =>'$_->move_page_leftmost',  label =>'Move Leftmost',keys=> 'alt+shift+pageup'},
+	'-move-rightmost'=> { sub =>'$_->move_page_rightmost', label =>'Move Rightmost',keys=>'alt+shift+pagedown'},
 });
 
 

File lib/Kephra/App/Dialog.pm

View file
 
 Kephra::CommandList::register_cmd({
 	'config-global-dialog' => {
-		sub => 'config',    label => 'Global Dialog',keys  => 'ctrl+alt+c', 
-		help => ''},
+		sub => 'config',    label => 'Global Dialog',keys  => 'ctrl+alt+c'},
 	'config-keymap-dialog' => {
-		sub => 'keymap',    label => 'Keymapping',keys  => 'ctrl+alt+k', 
-		help => ''},
+		sub => 'keymap',    label => 'Keymapping',keys  => 'ctrl+alt+k'},
 	'help-documentation' => {
-		sub => 'documentation', label => 'Documentation',keys  => 'F1',
-		help => ''},
+		sub => 'documentation', label => 'Documentation',keys  => 'F1'},
 	'help-about' => {
-		sub => 'about', label => 'About...', keys  => '',
-		help => ''},
+		sub => 'about', label => 'About...', keys  => ''},
 	'help-homepage' => {
 		sub => 'Kephra::App::Util::lounch_browser_with_site',
 		parameter => 'http://kephra.sourceforge.net/site/en/home_news.shtml',

File lib/Kephra/App/Editor.pm

View file
 use Kephra::Edit::Search;
 
 package Kephra::App::Editor;
-#our @ISA = 'Wx::StyledTextCtrl';
-our @ISA = 'Wx::ScintillaTextCtrl';
+our @ISA = 'Wx::StyledTextCtrl';
+#our @ISA = 'Wx::ScintillaTextCtrl';
 
 my $mk_color = Kephra::App::Util::get('create_color');
 

File lib/Kephra/Edit.pm

View file
 package Kephra::App::Editor;
 Kephra::CommandList::register_cmd_namespace('edit');
 Kephra::CommandList::register_cmd({
-	'undo' => {
-		sub => '$ed->Undo',    label => 'Undo',    keys => 'ctrl+z',
-		help => ''},
-	'redo' => {
-		sub => '$ed->Redo',    label => 'Redo',    keys => 'ctrl+shift+z',
-		help => ''} ,
-	'copy' => {
-		sub => '$ed->Copy',    label => 'Copy',    keys => 'ctrl+c',
-		help => ''},
-	'copy-line'=> {
-		sub => '$ed->LineCopy',label =>'Copy Line',keys => 'ctrl+shift+c',
-		help => ''},
-	'cut' => {
-		sub => '$ed->Cut',     label => 'Cut',     keys => 'ctrl+x',
-		help => ''},
-	'delete'  => {
-		sub =>'$ed->Clear',    label=>'Delete',    keys => 'delete',
-		help => ''},
-	'delete-back'  => {
-		sub =>'$ed->DeleteBack',label=>'Del Back', keys => 'back',
-		help => ''},
-	'delete-line'=> {
-		sub =>'$ed->LineDelete',label=>'Del Line', keys => 'ctrl+shift+delete', 
-		help => ''},
-	'insert'  => {
-		sub => '$ed->Paste',    label => 'Insert', keys => 'ctrl+v',
-		help => ''},
-	'replace' => {
-		sub => '$ed->replace',  label => 'Replace', keys => 'ctrl+shift+v', 
-		help => ''},
-	'double'  => {
-		sub => '$ed->SelectionDuplicate',label=> 'Double',keys => 'ctrl+d', 
-		help => ''},
-	'select-form' =>{
-		sub =>'$ed->select_form',  label => 'Form', keys => 'ctrl+y', 
-		help => ''},
-	'select-content'=>{
-		sub =>'$ed->select_content', label =>'Content',keys => 'ctrl+shift+y',
-		help => ''},
+	'-undo'          =>{ sub => '$ed->Undo',             label=> 'Undo',        keys=> 'ctrl+z' },
+	'-redo'          =>{ sub => '$ed->Redo',             label=> 'Redo',        keys=> 'ctrl+shift+z' },
+	'-copy'          =>{ sub => '$ed->Copy',             label=> 'Copy',        keys=> 'ctrl+c' },
+	'-copy-line'     =>{ sub => '$ed->LineCopy',         label=> 'Copy Line',   keys=> 'ctrl+shift+c'},
+	'-cut'           =>{ sub => '$ed->Cut',              label=> 'Cut',         keys=> 'ctrl+x'},
+	'-delete'        =>{ sub => '$ed->Clear',            label=> 'Delete',      keys=> 'delete'},
+	'-delete-back'   =>{ sub => '$ed->DeleteBack',       label=> 'Del Back',    keys=> 'back'},
+	'-delete-word-left'=>{sub=> '$ed->DelWordLeft',      label=> 'Del Word Left',keys=>'ctrl+back'},
+	'-delete-word-right'=>{sub=>'$ed->DelWordRight',     label=> 'Del Word Right',keys=>'ctrl+delete'},
+	'-delete-line'   =>{ sub => '$ed->LineDelete',       label=> 'Del Line',    keys=> 'ctrl+shift+delete'},
+	'-insert'        =>{ sub => '$ed->Paste',            label=> 'Insert',      keys=> 'ctrl+v'},
+	'-insert-newline'=>{ sub => '$ed->NewLine',          label=> 'Newline',     keys=> 'enter'},
+	'-replace'       =>{ sub => '$ed->replace',          label=> 'Replace',     keys=> 'ctrl+shift+v'},
+	'-double'        =>{ sub => '$ed->SelectionDuplicate',label=>'Double',      keys=> 'ctrl+d'},
+	'-select-form'   =>{ sub => '$ed->select_form',      label=> 'Form',        keys=> 'ctrl+y'},
+	'-select-content'=>{ sub => '$ed->select_content',   label=> 'Content',     keys=> 'ctrl+shift+y'},
 });
 
 sub get_clipboard_text {

File lib/Kephra/Edit/Comment.pm

View file
 package Kephra::App::Editor;
 
 Kephra::CommandList::register_cmd({
-	'comment-toggle'=>{
-		sub => '$ed->toggle_comment', label => 'Toggle Comment', keys => 'alt+#', 
-		help => ''},
+	'-comment-toggle'=>{ sub=> '$ed->toggle_comment', label=> 'Toggle Comment', keys=> 'alt+#' },
 });
 
 

File lib/Kephra/Edit/Format.pm

View file
 package Kephra::App::Editor;
 
 Kephra::CommandList::register_cmd({
-	'indent-level' => {
-		sub => '$ed->indent_level', label => 'Indent Level', keys => 'alt+right',
-		help => ''},
-	'dedent-level' => { sub => '$ed->dedent_level', label => 'Dedent Level',keys => 'alt+left', 
-		help => ''},
-	'move-line-up' => { sub=> '$ed->move_sel_or_line_up',label => 'Line Up',keys => 'alt+up', 
-		help => ''},
-	'move-line-down'=>{ sub=>'$ed->move_sel_or_line_down',label=>'Line Down',keys=>'alt+down', 
-		help => ''},
-	'goto-block-up' =>{ sub => '$ed->ParaUp',       label => 'Block Up',    keys => 'ctrl+up', 
-		help => ''},
-	'goto-block-down'=>{sub => '$ed->ParaDown',     label => 'Block Down',  keys => 'ctrl+down', 
-		help => ''},
-	'select-block-up'=>{sub => '$ed->ParaUpExtend', label => 'Block Up',    keys => 'ctrl+shift+up', 
-		help => ''},
-	'select-block-down'=>{
-		sub => '$ed->ParaDownExtend',label=> 'Block Down',keys => 'ctrl+shift+down', 
-		help => ''},
+	'-indent-level'     =>{ sub=> '$ed->indent_level',  label=> 'Indent Level',  keys=> 'alt+right' },
+	'-dedent-level'     =>{ sub=> '$ed->dedent_level',  label=> 'Dedent Level',  keys=> 'alt+left' },
+	'-move-line-up'     =>{ sub=> '$ed->move_sel_or_line_up',  label=>'Line Up', keys=> 'alt+up' },
+	'-move-line-down'   =>{ sub=> '$ed->move_sel_or_line_down',label=>'Line Down',keys=>'alt+down' },
+	'-goto-block-up'    =>{ sub=> '$ed->ParaUp',        label=> 'Block Up',      keys=> 'ctrl+up' },
+	'-goto-block-down'  =>{ sub=> '$ed->ParaDown',      label=> 'Block Down',    keys=> 'ctrl+down' },
+	'-select-block-up'  =>{ sub=> '$ed->ParaUpExtend',  label=> 'Block Up',      keys=> 'ctrl+shift+up' },
+	'-select-block-down'=>{ sub=> '$ed->ParaDownExtend',label=> 'Block Down',    keys=> 'ctrl+shift+down' },
 });
 
 

File lib/Kephra/Edit/Search.pm

View file
 package Kephra::App::Editor;
 
 Kephra::CommandList::register_cmd({
-	'goto-last-change'=>{
-		sub => '$ed->goto_last_change', label => 'Last Change', keys => 'ctrl+shift+g', 
-		help => ''},
-	'find-next-comment'=>{
-		sub => '$ed->next_comment', label => 'Next Comment', keys => 'ctrl+#', 
-		help => ''},
-	'find-prev-comment'=>{
-		sub => '$ed->prev_comment', label => 'Previous Comment', keys => 'ctrl+shift+#', 
-		help => ''},
+	'-goto-char-left'   =>{ sub=>'$ed->CharLeft',         label=>'Char Left',   keys=> 'left' },
+	'-goto-char-right'  =>{ sub=>'$ed->CharRight',        label=>'Char Right',  keys=> 'right' },
+	'-select-char-left' =>{ sub=>'$ed->CharLeftExtend',   label=>'Select Left', keys=> 'shift+left' },
+	'-select-char-right'=>{ sub=>'$ed->CharRightExtend',  label=>'Select Right',keys=> 'shift+right' },
+	'-goto-word-left'   =>{ sub=>'$ed->WordLeft',         label=>'Word Left',   keys=> 'ctrl+left' },
+	'-goto-word-right'  =>{ sub=>'$ed->WordRight',        label=>'Word Right',  keys=> 'ctrl+right' },
+	'-select-word-left' =>{ sub=>'$ed->WordLeftExtend',   label=>'Word Left',   keys=> 'ctrl+shift+left' },
+	'-select-word-right'=>{ sub=>'$ed->WordRightExtend',  label=>'Word Right',  keys=> 'ctrl+shift+right' },
+	'-goto-line-start'  =>{ sub=>'$ed->Home',             label=>'Line Start',  keys=> 'home'},
+	'-goto-line-end'    =>{ sub=>'$ed->LineEnd',          label=>'Line End',    keys=> 'end' },
+	'-select-line-start'=>{ sub=>'$ed->HomeExtend',       label=>'Line Start',  keys=> 'shift+home'},
+	'-select-line-end'  =>{ sub=>'$ed->LineEndExtend',    label=>'Line End',    keys=> 'shift+end' },
+	#'-goto-line-up'     =>{ sub=>'$ed->LineUp',           label=>'Line Up',     keys => 'up' },
+	#'-goto-line-down'   =>{ sub=>'$ed->LineDown',         label=>'Line Down',   keys => 'down' },
+	'-select-line-up'   =>{ sub=>'$ed->LineUpExtend',     label=>'Line Up',     keys=> 'shift+up' },
+	'-select-line-down' =>{ sub=>'$ed->LineDownExtend',   label=>'Line Down',   keys=> 'shift+down' },
+	'-goto-page-up'     =>{ sub=>'$ed->PageUp',           label=>'Page Up',     keys=> 'pageup' },
+	'-goto-page-down'   =>{ sub=>'$ed->PageDown',         label=>'Page Down',   keys=> 'pagedown' },
+	'-select-page-up'   =>{ sub=>'$ed->PageUpExtend',     label=>'Page Up',     keys=> 'shift+pageup' },
+	'-select-page-down' =>{ sub=>'$ed->PageDownExtend',   label=>'Page Down',   keys=> 'shift+pagedown'},
+	'-goto-doc-start'   =>{ sub=>'$ed->DocumentStart',    label=>'Doc Start',   keys=> 'ctrl+home'},
+	'-goto-doc-end'     =>{ sub=>'$ed->DocumentEnd',      label=>'Doc End',     keys=> 'ctrl+end' },
+	'-select-doc-start' =>{ sub=>'$ed->DocumentStartExtend',label=>'Doc Start', keys=> 'ctrl+shift+home'},
+	'-select-doc-end'   =>{ sub=>'$ed->DocumentEndExtend',label=>'Doc End',     keys=> 'ctrl+shift+end' },
+	'-goto-last-change' =>{ sub=>'$ed->goto_last_change', label=>'Last Change', keys=> 'ctrl+shift+g'},
+	'-find-next-comment'=>{ sub=>'$ed->next_comment',     label=>'Next Comment',keys=> 'ctrl+#' },
+	'-find-prev-comment'=>{ sub=>'$ed->prev_comment',     label=>'Prev Comment',keys=> 'ctrl+shift+#' },
 });
 
 
-#F3)            {$self->find_next} 
-#F3     + 1000) {$self->find_prev} 
-#F3     + 2000) {$self->search_for_selection} 
-#F3     + 3000) {$self->replace_with_selection} 
-#F3     + 4000) {$self->replace_next} 
-#F3     + 5000) {$self->replace_prev} 
+#F3            $self->find_next
+#F3+shift      $self->find_prev
+#F3+ctrl       $self->search_for_selection
+#F3+shift+ctrl $self->replace_with_selection
+#F3+alt        $self->replace_next
+#F3+shift+alt  $self->replace_prev
 
 sub goto_last_change {
 	my ($self) = @_;