In (any) vi, add a keystroke to format the current paragraph.

2010-04-11 1 min read Linux

<a id="aptureLink_F2g9MXMw3t" href="http://en.wikipedia.org/wiki/Vi">vi editor is very powerful in the sense that you can use maps, abbreviations and recordings. One such example is when you are trying to write a email or trying to write a paragraph and you want to format it. You can create a mapping like so, in your .exrc or .vimrc and use it to format the paragraph.

map ^A !}fmt<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/19/nano-text-editor-course/">Nano Text Editor Course (slumpedoverkeyboarddead.com) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/af58b127-c811-4fc3-bce6-9f44fcdc03c3/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b22.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">

comments powered by Disqus