LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is the key combination for moving to the beginning of the sentence? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-key-combination-for-moving-to-the-beginning-of-the-sentence-768008/)

ggyyree 11-09-2009 04:17 PM

What is the key combination for moving to the beginning of the sentence?
 
What is the key combination for moving to the beginning of the sentence?

For example,

I type the commands under bash shell or csh below,

Code:

$ ln -s /etc/X11 /hom/ggyyree/Desktop/X11_link
and I want to go to the beginning of the
Code:

/hom/ggyyree/Desktop/X11_link
when I at the end of the sentence because I make a mistake to type home as hom...

I know press Ctrl+a will go to the beginning of the whole command such as 'ln' above. Is there an easy way to go to the beginning of '/hom'?

Where can I find a whole list as a cheatsheet or something for all these key combination tricks? Cheers.

markush 11-09-2009 04:50 PM

Hello ggyyree,

in my Terminal (xterm with fvwm) i can use "Ctrl + Arrow" (left or right) to move one word to the left or to the right. But this has afaik nothing to do with bash but with how the windowmanager interprets the command. You will have to configure fvwm properly since otherwise you use "Ctrl + Arrow" for the same command as "Meta + Arrow", namely to change the page on the desktop.

Markus

ilikejam 11-09-2009 05:27 PM

Hi.

Bash generally uses the Emacs keybindings, so you can move back a word with Alt-b .
Some of these work:
http://wttools.sourceforge.net/emacs...ybindings.html

Dave

markush 11-09-2009 05:36 PM

Hello together,

Quote:

Originally Posted by ilikejam (Post 3750857)
...Bash generally uses the Emacs keybindings, so you can move back a word with Alt-b .

this works for me only on a terminal without X11. When you're using X the behavior of such key-combinations will depend on the settings in the WM and possibly on your own selfdefined keybindings.

Markus

ilikejam 11-09-2009 05:47 PM

Quote:

Originally Posted by markush (Post 3750872)
this works for me only on a terminal without X11.

Works for me on KDE, Fluxbox, CDE, Java Desktop and Cygwin-X. Have you got a weird keyboard layout or desktop environment?

mrrangerman 11-09-2009 06:13 PM

Alt + b will take you to the beginning of the previous word in a terminal.
Alt + f will take you one word ahead.

markush 11-10-2009 01:25 AM

Hello,

Quote:

Originally Posted by ilikejam (Post 3750883)
...Have you got a weird keyboard layout or desktop environment?

Well, I'm using a german keyboard-layout and fvwm2.

Markus


All times are GMT -5. The time now is 05:58 PM.