Announcement

Collapse
No announcement yet.

How to Navigate in Kate? 1 keystroke, many blank lines

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Navigate in Kate? 1 keystroke, many blank lines


    using Kate Version 21.12.3 and
    sample text file below:


    Line 1 test1 of sample text file.







    Line 9 test2, Lines 2 to 8 are blank.



    With cursor at end of Line 1, see above ...


    With Gedit the command is one (1) keystroke.
    Ctrl-RightArrow = skip words, moves from Line 1 end to Line 9.


    With Kate the command is eight (8) keystrokes.
    Ctrl-RightArrow 8 times


    With Kate,
    How to move from above
    Line 1 end to
    Line 9 with one (1) keystroke?


    --​

    #2
    The standard 'end' key is the tradition key for this, not just for Kate.
    You can of course change things to your liking to match gedit, if you like:
    System Settings >> Shortcuts >> navigation

    Or via Kate's settings menus
    Last edited by claydoh; Sep 27, 2022, 11:33 AM.

    Comment


      #3
      Originally posted by claydoh View Post
      The standard 'end' key is the tradition key for this, not just for Kate.
      Doesn't do what the OP wants, at least not in my test using his example. Pressing the end key (with the cursor at the beginning of Line 1) just jumps the cursor to the end of line 1.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Somehow I read that wrong lol.

        Comment


          #5
          Doesn't look possible as far as I can see.
          I also don't seem to see any comments regarding this, either positive or negative

          This sort of thing *may * be an ideological choice here, akin to the vi vs emacs wars
          Or the setting is right under my nose and I don't see it.

          Comment


            #6
            Gedit is installable; it's in the repositories.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              I betcha, considering that kate is a more programming-orineted editor, that multiple blank lines is something its devs never considered.

              I also betcha that in the past that Kate probably acted the way the OP desires. However, both Krite now fully shares kate's core text editing component

              I also suspect it could be a Qt design thing/limitation as well? Featherpad (LxQt's text editor also behaves like Kate here). L3afpad , a gtk text editor, acts like gedit.

              Comment


                #8
                I am not entirely sure what you are trying to do, but <ctrl><end> jumps to the end of the text from whatever cursor position you are in. <shift><end> will select the text of one line, and <ctrl><shift><end> will select all text between the cursor and the end of the text body. You can also "go to" <ctrl><g>.

                So in your example, if you are at the end of line 1 and want to "go to" the beginning of line 9, it would be <ctrl><g>, 9, <return> (so three key strokes).

                Anyway, I would check settings/keyboard shortcuts in the menu.
                Last edited by ShadYoung; Sep 27, 2022, 02:45 PM.

                Comment


                  #9
                  Originally posted by ShadYoung View Post
                  I am not entirely sure what you are trying to do
                  A text file in Gedit would demonstrate what is desired.
                  But Gedit would have to be installed.

                  It is correct to say
                  Ctrl-g-9 goes to Line 9.
                  But it is an absolute move to Line 9 and it is more work.


                  But with Gedit it is a relative move.
                  When cursuor is at the end of Line 1 ...
                  Ctrl-RightArrow goes to the next word at any Line.

                  With Gedit and above example with
                  multi blank lines between words ...
                  when cursor is at the end of Line 1 and
                  Ctrl-RightArrow
                  then cursor goes to next word at
                  Line 9 or
                  Line 47 or
                  Line 812 depending on file contents.


                  Question phrased more generally...

                  How can Kate Ctrl-RightArrow be made to behave like Gedit?

                  or

                  What is the Kate command that does the same as
                  Gedit Ctrl-RightArrow
                  Gedit Ctrl-LeftArrow ?

                  or said differently

                  How can Kate Ctrl-RightArrow be changed to
                  move to next word with multi blank lines between the 2 words?

                  --

                  Comment


                    #10
                    Well, there are some unset keyboard shortcuts you may want to experiment with in both the goto and move sections that may accomplish what you seek. What does Gedit itself call the shortcut? We need to identify the actual behavior.

                    Comment


                      #11
                      Also, why not just install Gedit? Kate may not be able to do what you're asking. Besides, Kate's refusal to run as root easily often gets in the way. I kinda miss Gedit now that I think about it. I used to use it a lot many moons ago.

                      Comment


                        #12
                        You can open Settings > Configure Kate > Editing > VI Input Mode and add commands. Not really sure how that works, but you can add commands there.

                        Kate manual Chapter 9

                        Please Read Me

                        Comment


                          #13
                          But switching to Vi mode sort of changes the entire keyboard workflow, correct?

                          https://www.redhat.com/sysadmin/introduction-vi-editor

                          Comment


                            #14
                            Alt+Shift+Down(or Up) works if the line you're going to shorter as one click, or you need to press end for the second click if it's longer.

                            Comment


                              #15
                              Originally posted by ShadYoung View Post
                              Also, why not just install Gedit?
                              Kate comes with ISO.
                              The ideal way is to stay with ISO default editor, kate 21.12.3 in this case.


                              installing Gedit on one computer is possible.
                              installing Gedit on many computers becomes a make work project.


                              --

                              Comment

                              Working...
                              X