When I use Ctrl+Left_arrow or Ctrl+Right_arrow in bash, I move backward a "word" and forward a "word" respectively. I belive, this is defined in /etc/inputrc  # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving "\e[1;5C": forward-word "\e[1;5D": backward-word "\e[5C": forward-word "\e[5D": backward-word "\e\e[C": forward-word "\e\e[D": backward-word   Unfortunately, the definition of "word" here is misleading. It considers /foo/bar as two words.  Is it possible to modify this so that the only word delimiter is space character ? (one or more spaces, or one or more tabs)   i.e. /foo/bar/ should be treated as one word  I am using Debian Wheezy
123809
Bash offers many useful emacs-style keybindings for simple commandline editing. For example, Ctrl+w deletes ("kills") word left from the cursor.  Another keybinding, Alt+d is supposed to be a "mirror" of the first one. It is supposed to delete a word right from the cursor.  However, I have noticed, these two keybindings do not act completely symetricaly. Whereas Ctrl+w treats foo.bar as one word, Alt+d treats it as two words  Even more annoyingly, # echo are two words for Ctrl+w, but one word for Alt+d.  Is there some logic in this? Is there some reason why they don't treat words in the same way?  Is there any way for me to change this?  I am using bash on Debian Wheezy
116434
This question follows directly from . In this case I am specifically unable to understand the part which says:     In that regard, its behaviour is closer to emacs' than with   bash(readline)/ksh/zsh emacs mode, but departs from the terminal   driver embedded line editor (in canonical mode), where Ctrl-W deletes   the previous word (werase, also in vi).   Here we are talking about shells and not editors which are two completely different programs. What does it mean to say shell is in some editor mode?  P.S: You can base your answer on the premise that I understand what a shell is and how to use vim for basic editing.
62249
As a Linux user, I'm a heavy workspace user. Windows 10 has that, but I would still like to switch between them the way I do in Linux, where I use ctrl+alt+right or left to switch between workspaces.  However, for Windows 10 it's rather ctrl+windows+right or left.  How do I modify these Windows 10 shortcuts to those of Linux?
73884
I've tried to change my prompt by editing .bashrc:  export PS1="\e[0;32m[\u@\h \W]\$ \e[m"   This seems to work, but ctrl-r to access reverse history ends up with my typing not appearing in the same place as it will be interpreted (like ). It is fine when using the up or down arrows to select previous commands though.  I've had a look at that question, but can't seem to work out where to apply the escape characters in my prompt. I've tried a few combinations but then I break normal text typing functionality or simple back/forwards through history.  If you could include an explanation of which instances of characters need escaping and why, that would help me (and hopefully others) learn.
52131
I typed . I believe I tab-completed @rumtscho and fully typed @MarthaF (since she doesn't tab complete). However, other people tell me that a Unicode character was inserted into the message; I can't see it:  Originally, I abandoned this bug report for a lack of reproducibility. But on another machine, I can see the character and managed to reproduce it: press tab, then press backspace. It works anywhere in a message, not just in a @-ping. (Actually, it seems that you just need to un-focus the input box; clicking elsewhere then hitting backspace works, too)  First machine is Firefox 12 (Iceweasel) on Debian GNU/Linux AMD64, testing+unstable. No user scripts. Greasemonkey is installed, but disabled in the extension manager Second machine is Firefox 10 (Iceweasel) on Debian GNU/Linux AMD64, testing+unstable. No user scripts, Greasemonkey not even installed Third machine (just tested) is Firefox 11 (Iceweasel) on Debian GNU/Linux AMD64. Greasemonkey installed and enabled, and there is a global userscript. Does not happen on Chromium 18.0.1025.151, running on machine #3.  So far, that's all the machines I've tested on, and it happens on all of them. It only happens in chat. Easiest way to produce it is to click on the page background, somewhere outside the text box, to un-focus the text box. Then press backspace. Note that not all browsers will display the character, even if its there (check  to see if yours does)
24489
#include &lt;stdio.h&gt; #include &lt;conio.h&gt; main() {     char ch,name[20];     int i=0;     clrscr();     printf("Enter a string:");     while((ch=getch())!='\n')     {         name[i]=ch;         i++;     }     name[i] = '\0';     printf("%s",name); }   When I give "abc" as input and if I press enter it's not working. Can anyone let me know why the condition ch=getch() != '\n' is not becoming false when I press enter? I have also observed that ch is taking \r instead of \n. Kindly let me know. Thanks
105270
After trying both commands, I noticed that \hspace* opposite to \hspace will insert a space over the end of the line.  So I was wondering if someone could explain how that works and also when to use either command.
98993
How do we extend a command to the next line? Basically whats the windows alternative for Linux's ls -l \ /usr/  Here we use backslashes to extend the command onto the next lines. What's the equivalent for Windows?
119425
I am trying to map Ctrl+H,J,K,L to arrow keys Left,Down,Up,Right, respectively, on Ubuntu OS (globally, not inside Vim).   I've attempted the solution posted , but the modifier commands are not working. Here is what I am trying:  xmodmap -e "keycode 45 Control_L = k Up" xmodmap -e "keycode 45 control = k Up"   (keycode 45 maps to "k")  Neither commands work. (They give no errors, but ctrl + k is not remapped to up arrow)  Is there a way to do this xmodmap, and if not, is there a cleaner workaround?  Thanks!  Edit: I have found my answer  - thanks to swift
20269
This is not about new macros like \newcommand, \def and others. This is not about autocompletion like using .cwl (in TexStudio) This is also not about using shortcuts for predefined commands that are listed in the shortcuts sections.   It is more closely related to the 3. Though. I want to define shortcuts for commands that are not listed there.  e.g. When I type Ctrl + Shift + B, I want   \begin{bmatrix} \end{bmatrix}   to be inserted just like Ctrl+ Enter inserts \\.
35837
Many command-line tools (grep, flex, etc.) use the ^ symbol to denote "beginning of line" and the $ symbol to denote "end of line." When did this convention arise? It seems perfectly reasonable to reserve two characters for these purposes, but it's a bit odd that on modern keyboards the $ symbol is to the left of the ^ symbol.  Is this a completely arbitrary decision? Does this come from some older keyboard layout? Is this convention used because some older tool decided to do things this way?  Regardless of the answer, are there primary sources that document this?
68466
I have a very simple question. When I do this:  \catcode`\@=0 \catcode`\\=11 @mycommand{a} @catcode`@\=0 \catcode`\@=11   It works perfectly and calls \mycommand correctly. However, when I try to define \mycommand with similar trickery:  \newcommand\mycommand[1]{   \catcode`\@=0   \catcode`\\=11   @textbf{Hello #1}   @catcode`@\=0   \catcode`\@=11 }   compilation stalls and gives me the * prompt. If I give it Ctrl+D, it terminates without producing any output. Indeed, it seems that changing the catcodes inside a command has no effect whatsoever, because the following works perfectly (whereas, from my understanding, it shouldn't):  \newcommand\mycommand[1]{   \catcode`\@=0   \catcode`\\=11   \textbf{Hello #1} }   Can anybody please explain to me what's happening?
80942
When I try to use one of the more "hacky" methods of getting a literal "special character" (such as backslash or a brace) then I get a different character: backslash seems to be an open quote, left brace a dash, and right brace a close quote.  What happened to my special characters?  \documentclass{minimal}  \begin{document}  \char`\\ \char`\{ \char`\}  \end{document}   produces: "-" (only the two "s are different).
73680
I do Ctrl+W in the mac terminal to delete a word (deletes from where the cursor is at to the beginning of the word)  How do I do the opposite - deletes from where the cursor is to the end of the word?
64001
The find command seems to differ from other Unix commands.  Why is there the empty curly brackets and a backward flash at the end of the following command?  find * -perm 777 -exec chmod 770 {} \;   I found one reason for the curly brackets but not for the backward flash.   The curly brackets are apparently for the path     Same as -exec, except that ``{}'' is   replaced with as many pathnames as   possible for each invocation of   utility
16238
How do I escape a backtick ` within a code block?  This is probably a duplicate, since I'm sure it's a common concern, but I can't find a question that addresses this specifically.  How do I write List'1 with the "1" character still in the code-text format?
28537
If I type it in between these parentheses -> () the backward slash inside the parentheses is removed.  As you see it is not there.  However if I surround it with spaces ( \ ), then it is rendered correctly.