title: How to make zsh forward-word behaviour same as in bash/emacs
body: <p>zsh forward-word acts a bit different from bash/emacs, and I'd like to change that.</p>
  
  <p>Instead of description of all differences, let me just show you step by step behaviour of bash. I marked cursor as "^" symbol.</p>
  
  <pre><code>foo bar --non-needed-param --needed-param^
  </code></pre>
  
  <p>M-b</p>
  
  <pre><code>foo bar --non-needed-param --needed-^param
  </code></pre>
  
  <p>M-b</p>
  
  <pre><code>foo bar --non-needed-param --^needed-param
  </code></pre>
  
  <p>M-b</p>
  
  <pre><code>foo bar --non-needed-^param --needed-param
  </code></pre>
  
  <p>M-b</p>
  
  <pre><code>foo bar --non-^needed-param --needed-param
  </code></pre>
  
  <p>M-b</p>
  
  <pre><code>foo bar --^non-needed-param --needed-param
  </code></pre>
  
  <p>M-b</p>
  
  <pre><code>foo ^bar --non-needed-param --needed-param
  </code></pre>
  
  <p>M-f</p>
  
  <pre><code>foo bar^ --non-needed-param --needed-param
  </code></pre>
  
  <p>M-d</p>
  
  <pre><code>foo bar^-needed-param --needed-param
  </code></pre>
  
  <p>M-d</p>
  
  <pre><code>foo bar^-param --needed-param
  </code></pre>
  
  <p>M-d</p>
  
  <pre><code>foo bar^ --needed-param
  </code></pre>
  
  <p>This algorithm is both flexible for moving through words, removing parts of them for me. Also it's in emacs, so I'm used to it. I'd like to see it in zsh too. Thanks.</p>