snipt

Ctrl+h for KB shortcuts

VimL

options to wrap and list

1
2
3
4
5
6
7
8
" opções para mostrar espaços e tabulações
set listchars=tab:\|\ ,extends:>,precedes:<,trail:-,nbsp:%
map <leader>l :set list! list?<cr>

" alterna o modo de quebra visual de linha
map <leader>b :set wrap! wrap?<cr>
" mostra +++ no começo de linhas longas sem wrap
set showbreak=+++
https://snipt.net/embed/e0b4de9495c1e89ff93ace05261167ed/
/raw/e0b4de9495c1e89ff93ace05261167ed/
e0b4de9495c1e89ff93ace05261167ed
vim
VimL
10
2019-06-18T00:34:36
True
False
False
/api/public/snipt/6037/
options-to-wrap-and-list
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</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; opções para mostrar espaços e tabulações</span> </span><span id="L-2"><a name="L-2"></a><span class="k">set</span> <span class="nb">listchars</span><span class="p">=</span><span class="k">tab</span>:\<span class="p">|</span>\ <span class="p">,</span>extends:<span class="p">&gt;,</span>precedes:<span class="p">&lt;,</span>trail:<span class="p">-,</span>nbsp:% </span><span id="L-3"><a name="L-3"></a>map <span class="p">&lt;</span>leader<span class="p">&gt;</span><span class="k">l</span> :<span class="k">set</span> <span class="nb">list</span><span class="p">!</span> <span class="nb">list</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="c">&quot; alterna o modo de quebra visual de linha</span> </span><span id="L-6"><a name="L-6"></a>map <span class="p">&lt;</span>leader<span class="p">&gt;</span><span class="k">b</span> :<span class="k">set</span> <span class="nb">wrap</span><span class="p">!</span> <span class="nb">wrap</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-7"><a name="L-7"></a><span class="c">&quot; mostra +++ no começo de linhas longas sem wrap</span> </span><span id="L-8"><a name="L-8"></a><span class="k">set</span> <span class="nb">showbreak</span><span class="p">=+++</span> </span></pre></div> </td></tr></table>
gvim, vim