How do I move the cursor in Nano?

We are familiar with different keyboard shortcuts that are used in the nano text editor. So, we will find how to move your cursor or navigate through nano. As we know, you can navigate within a file using the arrows keys or through the Home, Page Up, and Page Down, End keys.

But, more specifically, here we will discuss above some shortcuts that we can use with the ^ symbol or Ctrl key for cursor navigation in Nano. If you have a problem with remembering these shortcuts, then, using Ctrl+G, you can display help where you can easily find all shortcuts for each specific action.

To move your cursor in the forward direction, you can use Ctrl+f and for backward movement, use Ctrl+b. These keys will move forward or backward your cursor one letter or character at a time. To move your cursor one word forward, then use Ctrl+Space and use Alt+Space to move one word backward.

  • Using Ctrl+A, your cursor will move at the start or beginning of the line.
  • Using Ctrl+E, move your cursor at the end of the line.
  • To move on the next page or down a page, use Ctrl +Y.
  • To move the cursor on the previous page or move up a page, use Ctrl+V.

Use Ctrl_ to move on a specific line in a file.

You can move the cursor one screenful down using ^V. Use ^Y to move your cursor at the screenful up.

You can search a word or specific text using Ctrl+w, just enter the word that you want to search and then press Enter.

If the text or a word that you are searching for contains in a file, then your cursor will be directed to that specific line. If the word exists in multiple lines, then using Alt+w, you can search for it. Use Ctrl+c to cancel the command. Insert tab at the cursor position using Ctrl+I.



from Linux Hint https://ift.tt/3o6vLrg

Post a Comment

0 Comments