jump to the next python class or function in vim
<p>I'm trying to jump to the next python class or function in vim with the following commands:</p>

<pre><code>autocmd FileType python nnoremap &lt;buffer&gt; [[ ?^class|^\s*def&lt;CR&gt;
autocmd FileType python nnoremap &lt;buffer&gt; ]] /^class|^\s*def&lt;CR&gt;
</code></pre>

<p>But it doesn't work. Vim prompted:</p>

<pre><code>Error detected while processing FileType Auto commands for "python":
E492: Not an editor command: ^\s*def&lt;CR&gt;
</code></pre>

<p>How to fix this?</p>