snipt

Ctrl+h for KB shortcuts

VimL

how get char under cursor an put in cmd 's' on vim

"ayl ................. copia para o registro 'a' o caractere sob o cursor
:%s/<c-r>a/"/g ....... substitui o conteúdo do registro a por aspas simples
https://snipt.net/embed/5ce3aaad6db9d314a66427b677a24978/
/raw/5ce3aaad6db9d314a66427b677a24978/
5ce3aaad6db9d314a66427b677a24978
vim
VimL
2
2019-06-24T11:55:24
True
False
False
/api/public/snipt/5071/
how-get-char-under-cursor-an-put-in-cmd-s-on-vim
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c">&quot;ayl ................. copia para o registro &#39;a&#39; o caractere sob o cursor</span> </span><span id="L-2"><a name="L-2"></a><span class="p">:</span>%s<span class="sr">/&lt;c-r&gt;a/</span>&quot;/<span class="k">g</span> ....... substitui <span class="k">o</span> conteúdo <span class="k">do</span> registro <span class="k">a</span> por aspas simples </span></pre></div> </td></tr></table>
gvim, vim