545 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'), |
547 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'), |
546 QApplication.translate('ViewManager', 'Move left one character'), |
548 QApplication.translate('ViewManager', 'Move left one character'), |
547 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
549 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
548 self.editorActGrp, 'vm_edit_move_left_char') |
550 self.editorActGrp, 'vm_edit_move_left_char') |
549 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
551 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
|
552 if isMacPlatform(): |
|
553 act.setAlternateShortcut(QKeySequence( |
|
554 QApplication.translate('ViewManager', 'Meta+B'))) |
550 act.triggered[()].connect(self.esm.map) |
555 act.triggered[()].connect(self.esm.map) |
551 self.editActions.append(act) |
556 self.editActions.append(act) |
552 |
557 |
553 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'), |
558 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'), |
554 QApplication.translate('ViewManager', 'Move right one character'), |
559 QApplication.translate('ViewManager', 'Move right one character'), |
555 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
560 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
556 self.editorActGrp, 'vm_edit_move_right_char') |
561 self.editorActGrp, 'vm_edit_move_right_char') |
|
562 if isMacPlatform(): |
|
563 act.setAlternateShortcut(QKeySequence( |
|
564 QApplication.translate('ViewManager', 'Meta+F'))) |
557 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
565 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
558 act.triggered[()].connect(self.esm.map) |
566 act.triggered[()].connect(self.esm.map) |
559 self.editActions.append(act) |
567 self.editActions.append(act) |
560 |
568 |
561 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'), |
569 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'), |
562 QApplication.translate('ViewManager', 'Move up one line'), |
570 QApplication.translate('ViewManager', 'Move up one line'), |
563 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
571 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
564 self.editorActGrp, 'vm_edit_move_up_line') |
572 self.editorActGrp, 'vm_edit_move_up_line') |
|
573 if isMacPlatform(): |
|
574 act.setAlternateShortcut(QKeySequence( |
|
575 QApplication.translate('ViewManager', 'Meta+P'))) |
565 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
576 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
566 act.triggered[()].connect(self.esm.map) |
577 act.triggered[()].connect(self.esm.map) |
567 self.editActions.append(act) |
578 self.editActions.append(act) |
568 |
579 |
569 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'), |
580 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'), |
570 QApplication.translate('ViewManager', 'Move down one line'), |
581 QApplication.translate('ViewManager', 'Move down one line'), |
571 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
582 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
572 self.editorActGrp, 'vm_edit_move_down_line') |
583 self.editorActGrp, 'vm_edit_move_down_line') |
|
584 if isMacPlatform(): |
|
585 act.setAlternateShortcut(QKeySequence( |
|
586 QApplication.translate('ViewManager', 'Meta+N'))) |
573 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
587 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
574 act.triggered[()].connect(self.esm.map) |
588 act.triggered[()].connect(self.esm.map) |
575 self.editActions.append(act) |
589 self.editActions.append(act) |
576 |
590 |
577 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'), |
591 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'), |
578 QApplication.translate('ViewManager', 'Move left one word part'), |
592 QApplication.translate('ViewManager', 'Move left one word part'), |
579 QKeySequence(QApplication.translate('ViewManager', 'Alt+Left')), 0, |
593 0, 0, |
580 self.editorActGrp, 'vm_edit_move_left_word_part') |
594 self.editorActGrp, 'vm_edit_move_left_word_part') |
|
595 if not isMacPlatform(): |
|
596 act.setShortcut(QKeySequence( |
|
597 QApplication.translate('ViewManager', 'Alt+Left'))) |
581 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
598 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
582 act.triggered[()].connect(self.esm.map) |
599 act.triggered[()].connect(self.esm.map) |
583 self.editActions.append(act) |
600 self.editActions.append(act) |
584 |
601 |
585 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'), |
602 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'), |
586 QApplication.translate('ViewManager', 'Move right one word part'), |
603 QApplication.translate('ViewManager', 'Move right one word part'), |
587 QKeySequence(QApplication.translate('ViewManager', 'Alt+Right')), 0, |
604 0, 0, |
588 self.editorActGrp, 'vm_edit_move_right_word_part') |
605 self.editorActGrp, 'vm_edit_move_right_word_part') |
|
606 if not isMacPlatform(): |
|
607 act.setShortcut(QKeySequence( |
|
608 QApplication.translate('ViewManager', 'Alt+Right'))) |
589 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
609 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
590 act.triggered[()].connect(self.esm.map) |
610 act.triggered[()].connect(self.esm.map) |
591 self.editActions.append(act) |
611 self.editActions.append(act) |
592 |
612 |
593 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'), |
613 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'), |
594 QApplication.translate('ViewManager', 'Move left one word'), |
614 QApplication.translate('ViewManager', 'Move left one word'), |
595 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Left')), 0, |
615 0, 0, |
596 self.editorActGrp, 'vm_edit_move_left_word') |
616 self.editorActGrp, 'vm_edit_move_left_word') |
|
617 if isMacPlatform(): |
|
618 act.setShortcut(QKeySequence( |
|
619 QApplication.translate('ViewManager', 'Alt+Left'))) |
|
620 else: |
|
621 act.setShortcut(QKeySequence( |
|
622 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
597 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
623 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
598 act.triggered[()].connect(self.esm.map) |
624 act.triggered[()].connect(self.esm.map) |
599 self.editActions.append(act) |
625 self.editActions.append(act) |
600 |
626 |
601 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'), |
627 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'), |
602 QApplication.translate('ViewManager', 'Move right one word'), |
628 QApplication.translate('ViewManager', 'Move right one word'), |
603 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Right')), |
629 0, 0, |
604 0, |
|
605 self.editorActGrp, 'vm_edit_move_right_word') |
630 self.editorActGrp, 'vm_edit_move_right_word') |
|
631 if isMacPlatform(): |
|
632 act.setShortcut(QKeySequence( |
|
633 QApplication.translate('ViewManager', 'Alt+Right'))) |
|
634 else: |
|
635 act.setShortcut(QKeySequence( |
|
636 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
606 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
637 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
607 act.triggered[()].connect(self.esm.map) |
638 act.triggered[()].connect(self.esm.map) |
608 self.editActions.append(act) |
639 self.editActions.append(act) |
609 |
640 |
610 act = E5Action(QApplication.translate('ViewManager', |
641 act = E5Action(QApplication.translate('ViewManager', |
611 'Move to first visible character in line'), |
642 'Move to first visible character in document line'), |
612 QApplication.translate('ViewManager', |
643 QApplication.translate('ViewManager', |
613 'Move to first visible character in line'), |
644 'Move to first visible character in document line'), |
614 QKeySequence(QApplication.translate('ViewManager', 'Home')), 0, |
645 0, 0, |
615 self.editorActGrp, 'vm_edit_move_first_visible_char') |
646 self.editorActGrp, 'vm_edit_move_first_visible_char') |
|
647 if not isMacPlatform(): |
|
648 act.setShortcut(QKeySequence( |
|
649 QApplication.translate('ViewManager', 'Home'))) |
616 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
650 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
617 act.triggered[()].connect(self.esm.map) |
651 act.triggered[()].connect(self.esm.map) |
618 self.editActions.append(act) |
652 self.editActions.append(act) |
619 |
653 |
620 act = E5Action(QApplication.translate('ViewManager', |
654 act = E5Action(QApplication.translate('ViewManager', |
621 'Move to start of displayed line'), |
655 'Move to start of display line'), |
622 QApplication.translate('ViewManager', |
656 QApplication.translate('ViewManager', |
623 'Move to start of displayed line'), |
657 'Move to start of display line'), |
624 QKeySequence(QApplication.translate('ViewManager', 'Alt+Home')), 0, |
658 0, 0, |
625 self.editorActGrp, 'vm_edit_move_start_line') |
659 self.editorActGrp, 'vm_edit_move_start_line') |
|
660 if isMacPlatform(): |
|
661 act.setShortcut(QKeySequence( |
|
662 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
|
663 else: |
|
664 act.setShortcut(QKeySequence( |
|
665 QApplication.translate('ViewManager', 'Alt+Home'))) |
626 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
666 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
627 act.triggered[()].connect(self.esm.map) |
667 act.triggered[()].connect(self.esm.map) |
628 self.editActions.append(act) |
668 self.editActions.append(act) |
629 |
669 |
630 act = E5Action(QApplication.translate('ViewManager', 'Move to end of line'), |
670 act = E5Action(QApplication.translate('ViewManager', |
631 QApplication.translate('ViewManager', 'Move to end of line'), |
671 'Move to end of document line'), |
632 QKeySequence(QApplication.translate('ViewManager', 'End')), 0, |
672 QApplication.translate('ViewManager', |
|
673 'Move to end of document line'), |
|
674 0, 0, |
633 self.editorActGrp, 'vm_edit_move_end_line') |
675 self.editorActGrp, 'vm_edit_move_end_line') |
|
676 if isMacPlatform(): |
|
677 act.setShortcut(QKeySequence( |
|
678 QApplication.translate('ViewManager', 'Meta+E'))) |
|
679 else: |
|
680 act.setShortcut(QKeySequence( |
|
681 QApplication.translate('ViewManager', 'End'))) |
634 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
682 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
635 act.triggered[()].connect(self.esm.map) |
683 act.triggered[()].connect(self.esm.map) |
636 self.editActions.append(act) |
684 self.editActions.append(act) |
637 |
685 |
638 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'), |
686 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'), |
677 |
725 |
678 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'), |
726 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'), |
679 QApplication.translate('ViewManager', 'Move down one page'), |
727 QApplication.translate('ViewManager', 'Move down one page'), |
680 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
728 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
681 self.editorActGrp, 'vm_edit_move_down_page') |
729 self.editorActGrp, 'vm_edit_move_down_page') |
|
730 if isMacPlatform(): |
|
731 act.setAlternateShortcut(QKeySequence( |
|
732 QApplication.translate('ViewManager', 'Meta+V'))) |
682 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
733 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
683 act.triggered[()].connect(self.esm.map) |
734 act.triggered[()].connect(self.esm.map) |
684 self.editActions.append(act) |
735 self.editActions.append(act) |
685 |
736 |
686 act = E5Action(QApplication.translate('ViewManager', 'Move to start of text'), |
737 act = E5Action(QApplication.translate('ViewManager', 'Move to start of document'), |
687 QApplication.translate('ViewManager', 'Move to start of text'), |
738 QApplication.translate('ViewManager', 'Move to start of document'), |
688 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Home')), 0, |
739 0, 0, |
689 self.editorActGrp, 'vm_edit_move_start_text') |
740 self.editorActGrp, 'vm_edit_move_start_text') |
|
741 if isMacPlatform(): |
|
742 act.setShortcut(QKeySequence( |
|
743 QApplication.translate('ViewManager', 'Ctrl+Up'))) |
|
744 else: |
|
745 act.setShortcut(QKeySequence( |
|
746 QApplication.translate('ViewManager', 'Ctrl+Home'))) |
690 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
747 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
691 act.triggered[()].connect(self.esm.map) |
748 act.triggered[()].connect(self.esm.map) |
692 self.editActions.append(act) |
749 self.editActions.append(act) |
693 |
750 |
694 act = E5Action(QApplication.translate('ViewManager', 'Move to end of text'), |
751 act = E5Action(QApplication.translate('ViewManager', 'Move to end of document'), |
695 QApplication.translate('ViewManager', 'Move to end of text'), |
752 QApplication.translate('ViewManager', 'Move to end of document'), |
696 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+End')), 0, |
753 0, 0, |
697 self.editorActGrp, 'vm_edit_move_end_text') |
754 self.editorActGrp, 'vm_edit_move_end_text') |
|
755 if isMacPlatform(): |
|
756 act.setShortcut(QKeySequence( |
|
757 QApplication.translate('ViewManager', 'Ctrl+Down'))) |
|
758 else: |
|
759 act.setShortcut(QKeySequence( |
|
760 QApplication.translate('ViewManager', 'Ctrl+End'))) |
698 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
761 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
699 act.triggered[()].connect(self.esm.map) |
762 act.triggered[()].connect(self.esm.map) |
700 self.editActions.append(act) |
763 self.editActions.append(act) |
701 |
764 |
702 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'), |
765 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'), |
752 QApplication.translate('ViewManager', |
824 QApplication.translate('ViewManager', |
753 'Extend selection down one line'), |
825 'Extend selection down one line'), |
754 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
826 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
755 0, |
827 0, |
756 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
828 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
|
829 if isMacPlatform(): |
|
830 act.setAlternateShortcut(QKeySequence( |
|
831 QApplication.translate('ViewManager', 'Meta+Shift+N'))) |
757 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
832 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
758 act.triggered[()].connect(self.esm.map) |
833 act.triggered[()].connect(self.esm.map) |
759 self.editActions.append(act) |
834 self.editActions.append(act) |
760 |
835 |
761 act = E5Action(QApplication.translate('ViewManager', |
836 act = E5Action(QApplication.translate('ViewManager', |
762 'Extend selection left one word part'), |
837 'Extend selection left one word part'), |
763 QApplication.translate('ViewManager', |
838 QApplication.translate('ViewManager', |
764 'Extend selection left one word part'), |
839 'Extend selection left one word part'), |
765 QKeySequence(QApplication.translate('ViewManager', |
840 0, 0, |
766 'Alt+Shift+Left')), |
|
767 0, |
|
768 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
841 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
|
842 if not isMacPlatform(): |
|
843 act.setShortcut(QKeySequence( |
|
844 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
769 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
845 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
770 act.triggered[()].connect(self.esm.map) |
846 act.triggered[()].connect(self.esm.map) |
771 self.editActions.append(act) |
847 self.editActions.append(act) |
772 |
848 |
773 act = E5Action(QApplication.translate('ViewManager', |
849 act = E5Action(QApplication.translate('ViewManager', |
774 'Extend selection right one word part'), |
850 'Extend selection right one word part'), |
775 QApplication.translate('ViewManager', |
851 QApplication.translate('ViewManager', |
776 'Extend selection right one word part'), |
852 'Extend selection right one word part'), |
777 QKeySequence(QApplication.translate('ViewManager', |
853 0, 0, |
778 'Alt+Shift+Right')), |
|
779 0, |
|
780 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
854 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
|
855 if not isMacPlatform(): |
|
856 act.setShortcut(QKeySequence( |
|
857 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
781 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
858 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
782 act.triggered[()].connect(self.esm.map) |
859 act.triggered[()].connect(self.esm.map) |
783 self.editActions.append(act) |
860 self.editActions.append(act) |
784 |
861 |
785 act = E5Action(QApplication.translate('ViewManager', |
862 act = E5Action(QApplication.translate('ViewManager', |
786 'Extend selection left one word'), |
863 'Extend selection left one word'), |
787 QApplication.translate('ViewManager', |
864 QApplication.translate('ViewManager', |
788 'Extend selection left one word'), |
865 'Extend selection left one word'), |
789 QKeySequence(QApplication.translate('ViewManager', |
866 0, 0, |
790 'Ctrl+Shift+Left')), |
|
791 0, |
|
792 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
867 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
|
868 if isMacPlatform(): |
|
869 act.setShortcut(QKeySequence( |
|
870 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
|
871 else: |
|
872 act.setShortcut(QKeySequence( |
|
873 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
793 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
874 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
794 act.triggered[()].connect(self.esm.map) |
875 act.triggered[()].connect(self.esm.map) |
795 self.editActions.append(act) |
876 self.editActions.append(act) |
796 |
877 |
797 act = E5Action(QApplication.translate('ViewManager', |
878 act = E5Action(QApplication.translate('ViewManager', |
798 'Extend selection right one word'), |
879 'Extend selection right one word'), |
799 QApplication.translate('ViewManager', |
880 QApplication.translate('ViewManager', |
800 'Extend selection right one word'), |
881 'Extend selection right one word'), |
801 QKeySequence(QApplication.translate('ViewManager', |
882 0, 0, |
802 'Ctrl+Shift+Right')), |
|
803 0, |
|
804 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
883 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
|
884 if isMacPlatform(): |
|
885 act.setShortcut(QKeySequence( |
|
886 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
|
887 else: |
|
888 act.setShortcut(QKeySequence( |
|
889 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
805 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
890 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
806 act.triggered[()].connect(self.esm.map) |
891 act.triggered[()].connect(self.esm.map) |
807 self.editActions.append(act) |
892 self.editActions.append(act) |
808 |
893 |
809 act = E5Action(QApplication.translate('ViewManager', |
894 act = E5Action(QApplication.translate('ViewManager', |
810 'Extend selection to first visible character in line'), |
895 'Extend selection to first visible character in document line'), |
811 QApplication.translate('ViewManager', |
896 QApplication.translate('ViewManager', |
812 'Extend selection to first visible character in line'), |
897 'Extend selection to first visible character in document line'), |
813 QKeySequence(QApplication.translate('ViewManager', 'Shift+Home')), |
898 0, 0, |
814 0, |
|
815 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
899 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
|
900 if not isMacPlatform(): |
|
901 act.setShortcut(QKeySequence( |
|
902 QApplication.translate('ViewManager', 'Shift+Home'))) |
816 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
903 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
817 act.triggered[()].connect(self.esm.map) |
904 act.triggered[()].connect(self.esm.map) |
818 self.editActions.append(act) |
905 self.editActions.append(act) |
819 |
906 |
820 act = E5Action(QApplication.translate('ViewManager', |
907 act = E5Action(QApplication.translate('ViewManager', |
821 'Extend selection to start of line'), |
908 'Extend selection to end of document line'), |
822 QApplication.translate('ViewManager', |
909 QApplication.translate('ViewManager', |
823 'Extend selection to start of line'), |
910 'Extend selection to end of document line'), |
824 QKeySequence(QApplication.translate('ViewManager', |
911 0, 0, |
825 'Alt+Shift+Home')), |
|
826 0, |
|
827 self.editorActGrp, 'vm_edit_extend_selection_start_line') |
|
828 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
|
829 act.triggered[()].connect(self.esm.map) |
|
830 self.editActions.append(act) |
|
831 |
|
832 act = E5Action(QApplication.translate('ViewManager', |
|
833 'Extend selection to end of line'), |
|
834 QApplication.translate('ViewManager', |
|
835 'Extend selection to end of line'), |
|
836 QKeySequence(QApplication.translate('ViewManager', 'Shift+End')), 0, |
|
837 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
912 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
|
913 if isMacPlatform(): |
|
914 act.setShortcut(QKeySequence( |
|
915 QApplication.translate('ViewManager', 'Meta+Shift+E'))) |
|
916 else: |
|
917 act.setShortcut(QKeySequence( |
|
918 QApplication.translate('ViewManager', 'Shift+End'))) |
838 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
919 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
839 act.triggered[()].connect(self.esm.map) |
920 act.triggered[()].connect(self.esm.map) |
840 self.editActions.append(act) |
921 self.editActions.append(act) |
841 |
922 |
842 act = E5Action(QApplication.translate('ViewManager', |
923 act = E5Action(QApplication.translate('ViewManager', |
878 QApplication.translate('ViewManager', |
959 QApplication.translate('ViewManager', |
879 'Extend selection down one page'), |
960 'Extend selection down one page'), |
880 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgDown')), |
961 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgDown')), |
881 0, |
962 0, |
882 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
963 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
|
964 if isMacPlatform(): |
|
965 act.setAlternateShortcut(QKeySequence( |
|
966 QApplication.translate('ViewManager', 'Meta+Shift+V'))) |
883 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
967 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
884 act.triggered[()].connect(self.esm.map) |
968 act.triggered[()].connect(self.esm.map) |
885 self.editActions.append(act) |
969 self.editActions.append(act) |
886 |
970 |
887 act = E5Action(QApplication.translate('ViewManager', |
971 act = E5Action(QApplication.translate('ViewManager', |
888 'Extend selection to start of text'), |
972 'Extend selection to start of document'), |
889 QApplication.translate('ViewManager', |
973 QApplication.translate('ViewManager', |
890 'Extend selection to start of text'), |
974 'Extend selection to start of document'), |
891 QKeySequence(QApplication.translate('ViewManager', |
975 0, 0, |
892 'Ctrl+Shift+Home')), |
|
893 0, |
|
894 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
976 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
|
977 if isMacPlatform(): |
|
978 act.setShortcut(QKeySequence( |
|
979 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
|
980 else: |
|
981 act.setShortcut(QKeySequence( |
|
982 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
895 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
983 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
896 act.triggered[()].connect(self.esm.map) |
984 act.triggered[()].connect(self.esm.map) |
897 self.editActions.append(act) |
985 self.editActions.append(act) |
898 |
986 |
899 act = E5Action(QApplication.translate('ViewManager', |
987 act = E5Action(QApplication.translate('ViewManager', |
900 'Extend selection to end of text'), |
988 'Extend selection to end of document'), |
901 QApplication.translate('ViewManager', |
989 QApplication.translate('ViewManager', |
902 'Extend selection to end of text'), |
990 'Extend selection to end of document'), |
903 QKeySequence(QApplication.translate('ViewManager', |
991 0, 0, |
904 'Ctrl+Shift+End')), |
|
905 0, |
|
906 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
992 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
|
993 if isMacPlatform(): |
|
994 act.setShortcut(QKeySequence( |
|
995 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
|
996 else: |
|
997 act.setShortcut(QKeySequence( |
|
998 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
907 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
999 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
908 act.triggered[()].connect(self.esm.map) |
1000 act.triggered[()].connect(self.esm.map) |
909 self.editActions.append(act) |
1001 self.editActions.append(act) |
910 |
1002 |
911 act = E5Action(QApplication.translate('ViewManager', |
1003 act = E5Action(QApplication.translate('ViewManager', |
912 'Delete previous character'), |
1004 'Delete previous character'), |
913 QApplication.translate('ViewManager', 'Delete previous character'), |
1005 QApplication.translate('ViewManager', 'Delete previous character'), |
914 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
1006 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
915 QKeySequence(QApplication.translate('ViewManager', |
1007 0, |
916 'Shift+Backspace')), |
|
917 self.editorActGrp, 'vm_edit_delete_previous_char') |
1008 self.editorActGrp, 'vm_edit_delete_previous_char') |
|
1009 if isMacPlatform(): |
|
1010 act.setAlternateShortcut(QKeySequence( |
|
1011 QApplication.translate('ViewManager', 'Meta+H'))) |
|
1012 else: |
|
1013 act.setAlternateShortcut(QKeySequence( |
|
1014 QApplication.translate('ViewManager', 'Shift+Backspace'))) |
918 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1015 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
919 act.triggered[()].connect(self.esm.map) |
1016 act.triggered[()].connect(self.esm.map) |
920 self.editActions.append(act) |
1017 self.editActions.append(act) |
921 |
1018 |
922 act = E5Action(QApplication.translate('ViewManager', |
1019 act = E5Action(QApplication.translate('ViewManager', |
923 'Delete previous character if not at line start'), |
1020 'Delete previous character if not at start of line'), |
924 QApplication.translate('ViewManager', |
1021 QApplication.translate('ViewManager', |
925 'Delete previous character if not at line start'), |
1022 'Delete previous character if not at start of line'), |
926 0, 0, |
1023 0, 0, |
927 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1024 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
928 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1025 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
929 act.triggered[()].connect(self.esm.map) |
1026 act.triggered[()].connect(self.esm.map) |
930 self.editActions.append(act) |
1027 self.editActions.append(act) |
931 |
1028 |
932 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'), |
1029 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'), |
933 QApplication.translate('ViewManager', 'Delete current character'), |
1030 QApplication.translate('ViewManager', 'Delete current character'), |
934 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
1031 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
935 self.editorActGrp, 'vm_edit_delete_current_char') |
1032 self.editorActGrp, 'vm_edit_delete_current_char') |
|
1033 if isMacPlatform(): |
|
1034 act.setAlternateShortcut(QKeySequence( |
|
1035 QApplication.translate('ViewManager', 'Meta+D'))) |
936 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1036 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
937 act.triggered[()].connect(self.esm.map) |
1037 act.triggered[()].connect(self.esm.map) |
938 self.editActions.append(act) |
1038 self.editActions.append(act) |
939 |
1039 |
940 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'), |
1040 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'), |
1146 'Extend rectangular selection right one character'), |
1268 'Extend rectangular selection right one character'), |
1147 QKeySequence(QApplication.translate('ViewManager', |
1269 QKeySequence(QApplication.translate('ViewManager', |
1148 'Alt+Ctrl+Right')), |
1270 'Alt+Ctrl+Right')), |
1149 0, |
1271 0, |
1150 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
1272 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
|
1273 if isMacPlatform(): |
|
1274 act.setAlternateShortcut(QKeySequence( |
|
1275 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
1151 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
1276 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
1152 act.triggered[()].connect(self.esm.map) |
1277 act.triggered[()].connect(self.esm.map) |
1153 self.editActions.append(act) |
1278 self.editActions.append(act) |
1154 |
1279 |
1155 act = E5Action(QApplication.translate('ViewManager', |
1280 act = E5Action(QApplication.translate('ViewManager', |
1156 'Extend rectangular selection to first' |
1281 'Extend rectangular selection to first' |
1157 ' visible character in line'), |
1282 ' visible character in document line'), |
1158 QApplication.translate('ViewManager', |
1283 QApplication.translate('ViewManager', |
1159 'Extend rectangular selection to first' |
1284 'Extend rectangular selection to first' |
1160 ' visible character in line'), |
1285 ' visible character in document line'), |
1161 QKeySequence(QApplication.translate('ViewManager', |
1286 0, 0, |
1162 'Alt+Ctrl+Home')), |
|
1163 0, |
|
1164 self.editorActGrp, |
1287 self.editorActGrp, |
1165 'vm_edit_extend_rect_selection_first_visible_char') |
1288 'vm_edit_extend_rect_selection_first_visible_char') |
|
1289 if not isMacPlatform(): |
|
1290 act.setShortcut(QKeySequence( |
|
1291 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
1166 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
1292 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
1167 act.triggered[()].connect(self.esm.map) |
1293 act.triggered[()].connect(self.esm.map) |
1168 self.editActions.append(act) |
1294 self.editActions.append(act) |
1169 |
1295 |
1170 act = E5Action(QApplication.translate('ViewManager', |
1296 act = E5Action(QApplication.translate('ViewManager', |
1171 'Extend rectangular selection to end of line'), |
1297 'Extend rectangular selection to end of document line'), |
1172 QApplication.translate('ViewManager', |
1298 QApplication.translate('ViewManager', |
1173 'Extend rectangular selection to end of line'), |
1299 'Extend rectangular selection to end of document line'), |
1174 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+End')), |
1300 0, 0, |
1175 0, |
|
1176 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
1301 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
|
1302 if isMacPlatform(): |
|
1303 act.setShortcut(QKeySequence( |
|
1304 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
|
1305 else: |
|
1306 act.setShortcut(QKeySequence( |
|
1307 QApplication.translate('ViewManager', 'Alt+Shift+End'))) |
1177 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
1308 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
1178 act.triggered[()].connect(self.esm.map) |
1309 act.triggered[()].connect(self.esm.map) |
1179 self.editActions.append(act) |
1310 self.editActions.append(act) |
1180 |
1311 |
1181 act = E5Action(QApplication.translate('ViewManager', |
1312 act = E5Action(QApplication.translate('ViewManager', |
1193 act = E5Action(QApplication.translate('ViewManager', |
1324 act = E5Action(QApplication.translate('ViewManager', |
1194 'Extend rectangular selection down one page'), |
1325 'Extend rectangular selection down one page'), |
1195 QApplication.translate('ViewManager', |
1326 QApplication.translate('ViewManager', |
1196 'Extend rectangular selection down one page'), |
1327 'Extend rectangular selection down one page'), |
1197 QKeySequence(QApplication.translate('ViewManager', |
1328 QKeySequence(QApplication.translate('ViewManager', |
1198 'Alt+Ctrl+PgDown')), |
1329 'Alt+Shift+PgDown')), |
1199 0, |
1330 0, |
1200 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
1331 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
|
1332 if isMacPlatform(): |
|
1333 act.setAlternateShortcut(QKeySequence( |
|
1334 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
1201 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
1335 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
1202 act.triggered[()].connect(self.esm.map) |
1336 act.triggered[()].connect(self.esm.map) |
1203 self.editActions.append(act) |
1337 self.editActions.append(act) |
|
1338 |
|
1339 act = E5Action(QApplication.translate('ViewManager', |
|
1340 'Duplicate current selection'), |
|
1341 QApplication.translate('ViewManager', |
|
1342 'Duplicate current selection'), |
|
1343 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+D')), |
|
1344 0, |
|
1345 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
|
1346 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
|
1347 act.triggered[()].connect(self.esm.map) |
|
1348 self.editActions.append(act) |
|
1349 |
|
1350 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
|
1351 act = E5Action(QApplication.translate('ViewManager', |
|
1352 'Scroll to start of document'), |
|
1353 QApplication.translate('ViewManager', |
|
1354 'Scroll to start of document'), |
|
1355 0, 0, |
|
1356 self.editorActGrp, 'vm_edit_scroll_start_text') |
|
1357 if isMacPlatform(): |
|
1358 act.setShortcut(QKeySequence( |
|
1359 QApplication.translate('ViewManager', 'Home'))) |
|
1360 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
|
1361 act.triggered[()].connect(self.esm.map) |
|
1362 self.editActions.append(act) |
|
1363 |
|
1364 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
|
1365 act = E5Action(QApplication.translate('ViewManager', |
|
1366 'Scroll to end of document'), |
|
1367 QApplication.translate('ViewManager', |
|
1368 'Scroll to end of document'), |
|
1369 0, 0, |
|
1370 self.editorActGrp, 'vm_edit_scroll_end_text') |
|
1371 if isMacPlatform(): |
|
1372 act.setShortcut(QKeySequence( |
|
1373 QApplication.translate('ViewManager', 'End'))) |
|
1374 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
|
1375 act.triggered[()].connect(self.esm.map) |
|
1376 self.editActions.append(act) |
|
1377 |
|
1378 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
|
1379 act = E5Action(QApplication.translate('ViewManager', |
|
1380 'Scroll vertically to center current line'), |
|
1381 QApplication.translate('ViewManager', |
|
1382 'Scroll vertically to center current line'), |
|
1383 0, 0, |
|
1384 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
|
1385 if isMacPlatform(): |
|
1386 act.setShortcut(QKeySequence( |
|
1387 QApplication.translate('ViewManager', 'Meta+L'))) |
|
1388 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
|
1389 act.triggered[()].connect(self.esm.map) |
|
1390 self.editActions.append(act) |
|
1391 |
|
1392 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
|
1393 act = E5Action(QApplication.translate('ViewManager', |
|
1394 'Move to end of next word'), |
|
1395 QApplication.translate('ViewManager', |
|
1396 'Move to end of next word'), |
|
1397 0, 0, |
|
1398 self.editorActGrp, 'vm_edit_move_end_next_word') |
|
1399 if isMacPlatform(): |
|
1400 act.setShortcut(QKeySequence( |
|
1401 QApplication.translate('ViewManager', 'Alt+Right'))) |
|
1402 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
|
1403 act.triggered[()].connect(self.esm.map) |
|
1404 self.editActions.append(act) |
|
1405 |
|
1406 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
|
1407 act = E5Action(QApplication.translate('ViewManager', |
|
1408 'Extend selection to end of next word'), |
|
1409 QApplication.translate('ViewManager', |
|
1410 'Extend selection to end of next word'), |
|
1411 0, 0, |
|
1412 self.editorActGrp, 'vm_edit_select_end_next_word') |
|
1413 if isMacPlatform(): |
|
1414 act.setShortcut(QKeySequence( |
|
1415 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
|
1416 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
|
1417 act.triggered[()].connect(self.esm.map) |
|
1418 self.editActions.append(act) |
|
1419 |
|
1420 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
|
1421 act = E5Action(QApplication.translate('ViewManager', |
|
1422 'Move to end of previous word'), |
|
1423 QApplication.translate('ViewManager', |
|
1424 'Move to end of previous word'), |
|
1425 0, 0, |
|
1426 self.editorActGrp, 'vm_edit_move_end_previous_word') |
|
1427 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
|
1428 act.triggered[()].connect(self.esm.map) |
|
1429 self.editActions.append(act) |
|
1430 |
|
1431 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
|
1432 act = E5Action(QApplication.translate('ViewManager', |
|
1433 'Extend selection to end of previous word'), |
|
1434 QApplication.translate('ViewManager', |
|
1435 'Extend selection to end of previous word'), |
|
1436 0, 0, |
|
1437 self.editorActGrp, 'vm_edit_select_end_previous_word') |
|
1438 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
|
1439 act.triggered[()].connect(self.esm.map) |
|
1440 self.editActions.append(act) |
|
1441 |
|
1442 if hasattr(QsciScintilla, "SCI_HOME"): |
|
1443 act = E5Action(QApplication.translate('ViewManager', |
|
1444 'Move to start of document line'), |
|
1445 QApplication.translate('ViewManager', |
|
1446 'Move to start of document line'), |
|
1447 0, 0, |
|
1448 self.editorActGrp, 'vm_edit_move_start_document_line') |
|
1449 if isMacPlatform(): |
|
1450 act.setShortcut(QKeySequence( |
|
1451 QApplication.translate('ViewManager', 'Meta+A'))) |
|
1452 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
|
1453 act.triggered[()].connect(self.esm.map) |
|
1454 self.editActions.append(act) |
|
1455 |
|
1456 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
|
1457 act = E5Action(QApplication.translate('ViewManager', |
|
1458 'Extend selection to start of document line'), |
|
1459 QApplication.translate('ViewManager', |
|
1460 'Extend selection to start of document line'), |
|
1461 0, 0, |
|
1462 self.editorActGrp, 'vm_edit_extend_selection_start_document_line') |
|
1463 if isMacPlatform(): |
|
1464 act.setShortcut(QKeySequence( |
|
1465 QApplication.translate('ViewManager', 'Meta+Shift+A'))) |
|
1466 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
|
1467 act.triggered[()].connect(self.esm.map) |
|
1468 self.editActions.append(act) |
|
1469 |
|
1470 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
|
1471 act = E5Action(QApplication.translate('ViewManager', |
|
1472 'Extend rectangular selection to start of document line'), |
|
1473 QApplication.translate('ViewManager', |
|
1474 'Extend rectangular selection to start of document line'), |
|
1475 0, 0, |
|
1476 self.editorActGrp, 'vm_edit_select_rect_start_line') |
|
1477 if isMacPlatform(): |
|
1478 act.setShortcut(QKeySequence( |
|
1479 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) |
|
1480 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
|
1481 act.triggered[()].connect(self.esm.map) |
|
1482 self.editActions.append(act) |
|
1483 |
|
1484 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
|
1485 act = E5Action(QApplication.translate('ViewManager', |
|
1486 'Extend selection to start of display line'), |
|
1487 QApplication.translate('ViewManager', |
|
1488 'Extend selection to start of display line'), |
|
1489 0, 0, |
|
1490 self.editorActGrp, 'vm_edit_extend_selection_start_display_line') |
|
1491 if isMacPlatform(): |
|
1492 act.setShortcut(QKeySequence( |
|
1493 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
|
1494 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
|
1495 act.triggered[()].connect(self.esm.map) |
|
1496 self.editActions.append(act) |
|
1497 |
|
1498 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
|
1499 act = E5Action(QApplication.translate('ViewManager', |
|
1500 'Move to start of display or document line'), |
|
1501 QApplication.translate('ViewManager', |
|
1502 'Move to start of display or document line'), |
|
1503 0, 0, |
|
1504 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
|
1505 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
|
1506 act.triggered[()].connect(self.esm.map) |
|
1507 self.editActions.append(act) |
|
1508 |
|
1509 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
|
1510 act = E5Action(QApplication.translate('ViewManager', |
|
1511 'Extend selection to start of display or document line'), |
|
1512 QApplication.translate('ViewManager', |
|
1513 'Extend selection to start of display or document line'), |
|
1514 0, 0, |
|
1515 self.editorActGrp, |
|
1516 'vm_edit_extend_selection_start_display_document_line') |
|
1517 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
|
1518 act.triggered[()].connect(self.esm.map) |
|
1519 self.editActions.append(act) |
|
1520 |
|
1521 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
|
1522 act = E5Action(QApplication.translate('ViewManager', |
|
1523 'Move to first visible character in display' |
|
1524 ' or document line'), |
|
1525 QApplication.translate('ViewManager', |
|
1526 'Move to first visible character in display' |
|
1527 ' or document line'), |
|
1528 0, 0, |
|
1529 self.editorActGrp, |
|
1530 'vm_edit_move_first_visible_char_document_line') |
|
1531 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) |
|
1532 act.triggered[()].connect(self.esm.map) |
|
1533 self.editActions.append(act) |
|
1534 |
|
1535 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): |
|
1536 act = E5Action(QApplication.translate('ViewManager', |
|
1537 'Extend selection to first visible character in' |
|
1538 ' display or document line'), |
|
1539 QApplication.translate('ViewManager', |
|
1540 'Extend selection to first visible character in' |
|
1541 ' display or document line'), |
|
1542 0, 0, |
|
1543 self.editorActGrp, |
|
1544 'vm_edit_extend_selection_first_visible_char_document_line') |
|
1545 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND) |
|
1546 act.triggered[()].connect(self.esm.map) |
|
1547 self.editActions.append(act) |
|
1548 |
|
1549 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): |
|
1550 act = E5Action(QApplication.translate('ViewManager', |
|
1551 'Move to end of display or document line'), |
|
1552 QApplication.translate('ViewManager', |
|
1553 'Move to end of display or document line'), |
|
1554 0, 0, |
|
1555 self.editorActGrp, 'vm_edit_end_start_display_document_line') |
|
1556 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) |
|
1557 act.triggered[()].connect(self.esm.map) |
|
1558 self.editActions.append(act) |
|
1559 |
|
1560 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): |
|
1561 act = E5Action(QApplication.translate('ViewManager', |
|
1562 'Extend selection to end of display or document line'), |
|
1563 QApplication.translate('ViewManager', |
|
1564 'Extend selection to end of display or document line'), |
|
1565 0, 0, |
|
1566 self.editorActGrp, |
|
1567 'vm_edit_extend_selection_end_display_document_line') |
|
1568 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) |
|
1569 act.triggered[()].connect(self.esm.map) |
|
1570 self.editActions.append(act) |
|
1571 |
|
1572 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): |
|
1573 act = E5Action(QApplication.translate('ViewManager', |
|
1574 'Stuttered move up one page'), |
|
1575 QApplication.translate('ViewManager', |
|
1576 'Stuttered move up one page'), |
|
1577 0, 0, |
|
1578 self.editorActGrp, 'vm_edit_stuttered_move_up_page') |
|
1579 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) |
|
1580 act.triggered[()].connect(self.esm.map) |
|
1581 self.editActions.append(act) |
|
1582 |
|
1583 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): |
|
1584 act = E5Action(QApplication.translate('ViewManager', |
|
1585 'Stuttered extend selection up one page'), |
|
1586 QApplication.translate('ViewManager', |
|
1587 'Stuttered extend selection up one page'), |
|
1588 0, 0, |
|
1589 self.editorActGrp, 'vm_edit_stuttered_extend_selection_up_page') |
|
1590 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) |
|
1591 act.triggered[()].connect(self.esm.map) |
|
1592 self.editActions.append(act) |
|
1593 |
|
1594 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): |
|
1595 act = E5Action(QApplication.translate('ViewManager', |
|
1596 'Stuttered move down one page'), |
|
1597 QApplication.translate('ViewManager', |
|
1598 'Stuttered move down one page'), |
|
1599 0, 0, |
|
1600 self.editorActGrp, 'vm_edit_stuttered_move_down_page') |
|
1601 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
|
1602 act.triggered[()].connect(self.esm.map) |
|
1603 self.editActions.append(act) |
|
1604 |
|
1605 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
|
1606 act = E5Action(QApplication.translate('ViewManager', |
|
1607 'Stuttered extend selection down one page'), |
|
1608 QApplication.translate('ViewManager', |
|
1609 'Stuttered extend selection down one page'), |
|
1610 0, 0, |
|
1611 self.editorActGrp, 'vm_edit_stuttered_extend_selection_down_page') |
|
1612 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
|
1613 act.triggered[()].connect(self.esm.map) |
|
1614 self.editActions.append(act) |
|
1615 |
|
1616 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
|
1617 act = E5Action(QApplication.translate('ViewManager', |
|
1618 'Delete right to end of next word'), |
|
1619 QApplication.translate('ViewManager', |
|
1620 'Delete right to end of next word'), |
|
1621 0, 0, |
|
1622 self.editorActGrp, 'vm_edit_delete_right_end_next_word') |
|
1623 if isMacPlatform(): |
|
1624 act.setShortcut(QKeySequence( |
|
1625 QApplication.translate('ViewManager', 'Alt+Del'))) |
|
1626 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
|
1627 act.triggered[()].connect(self.esm.map) |
|
1628 self.editActions.append(act) |
|
1629 |
|
1630 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
|
1631 act = E5Action(QApplication.translate('ViewManager', |
|
1632 'Move selected lines up one line'), |
|
1633 QApplication.translate('ViewManager', |
|
1634 'Move selected lines up one line'), |
|
1635 0, 0, |
|
1636 self.editorActGrp, 'vm_edit_move_selection_up_one_line') |
|
1637 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
|
1638 act.triggered[()].connect(self.esm.map) |
|
1639 self.editActions.append(act) |
|
1640 |
|
1641 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
|
1642 act = E5Action(QApplication.translate('ViewManager', |
|
1643 'Move selected lines down one line'), |
|
1644 QApplication.translate('ViewManager', |
|
1645 'Move selected lines down one line'), |
|
1646 0, 0, |
|
1647 self.editorActGrp, 'vm_edit_move_selection_down_one_line') |
|
1648 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
|
1649 act.triggered[()].connect(self.esm.map) |
|
1650 self.editActions.append(act) |
1204 |
1651 |
1205 act = E5Action(QApplication.translate('ViewManager', |
1652 act = E5Action(QApplication.translate('ViewManager', |
1206 'Duplicate current selection'), |
1653 'Duplicate current selection'), |
1207 QApplication.translate('ViewManager', |
1654 QApplication.translate('ViewManager', |
1208 'Duplicate current selection'), |
1655 'Duplicate current selection'), |