<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vim on yozy//NET</title>
    <link>https://yozy.net/tags/vim/</link>
    <description>Recent content in Vim on yozy//NET</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 02 Apr 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://yozy.net/tags/vim/feed.xml" rel="self" type="application/rss" />
    <item>
      <title>NeoVim plugin for visualising sentence length</title>
      <link>https://yozy.net/2026/04/neovim-plugin-for-visualising-sentence-length/</link>
      <pubDate>Thu, 02 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://yozy.net/2026/04/neovim-plugin-for-visualising-sentence-length/</guid>
      <description>&lt;div class=&#34;cw&#34;&gt;I used an LLM to generate the code for this plugin.&lt;/div&gt;&#xA;&lt;p&gt;I am trying to get better at writing. One of the recommendations I&amp;rsquo;ve read is&#xA;that varying the sentence length makes reading more enjoyable. Naturally, I&#xA;wanted to visualise this while writing. Coloring each sentence according to its&#xA;length, would make it possible to detect long blocks of same-length sentences;&#xA;they would be large uniformly colored blobs. Optionally also show the lengths&#xA;in a sidebar column.&lt;/p&gt;&#xA;&lt;p&gt;Since I use NeoVim for all of my writing, a Lua plugin would do just fine. So I&#xA;made one.&lt;/p&gt;&#xA;&lt;p&gt;Here is how it looks like, when ran on the source code for this very post:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://yozy.net/images/vim-prose-flow.png&#34; alt=&#34;Screenshot of vim-prose-flow&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Find it on GitHub&#xA;&lt;a href=&#34;https://github.com/jlegeny/vim-prose-flow&#34;&gt;jlegeny/vim-prose-flow&lt;/a&gt;&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;Although I use Source Hut for all of my code, for Lazy plugins it is&#xA;much easier to default to GitHub. You can also find the plugin at&#xA;&lt;a href=&#34;https://git.sr.ht/~yozy/vim-prose-flow/&#34;&gt;sr.ht&lt;/a&gt;.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>Vim setup</title>
      <link>https://yozy.net/2012/10/vim-setup/</link>
      <pubDate>Mon, 22 Oct 2012 15:14:01 +0000</pubDate>
      <guid>https://yozy.net/2012/10/vim-setup/</guid>
      <description>&lt;p&gt;Again, this is mostly a social bookmark to have a trace of what different parts&#xA;of my configuration files in my Vim folder do. Feel free to steal whatever part&#xA;you like. Note that not all of these settings will work without additional&#xA;plugins. The ones I use on daily basis are: &lt;strong&gt;Powerline&lt;/strong&gt;, &lt;strong&gt;bclose&lt;/strong&gt;, &lt;strong&gt;voom&lt;/strong&gt;&#xA;and &lt;strong&gt;latex-suite&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A hint: Since I am using several computers I use Dropbox to synchronize all of&#xA;my vim configurations thus my .vim folder on every machine is just a symlink to&#xA;the Dropbox folder. I have moved my vimrc file there as well and source it from&#xA;the original .vimrc file in the home folder.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;quot; In case we are in a 256 color capable terminal&#xA;set t_Co=256&#xA;&#xA;&amp;quot; Set a right colorscheme&#xA;colorscheme zenburn&#xA;&#xA;&amp;quot; Let Powerline use nice symbols&#xA;let g:Powerline_symbols = &#39;fancy&#39;&#xA;&#xA;&amp;quot; Look for modelines embedded in source files, this is especially useful when&#xA;&amp;quot; getting python code from other developers&#xA;set modeline&#xA;&#xA;&amp;quot; The only GUI element we want is the icon, remove menubar, toolbars etc.&#xA;set go=i&#xA;&#xA;&amp;quot; Always show the statusline&#xA;set laststatus=2&#xA;&#xA;&amp;quot; Display the beginning of the last line at the end of the buffer&#xA;set display=lastline&#xA;&#xA;&amp;quot; Turn on the syntax highlighting&#xA;syntax on&#xA;&#xA;&amp;quot; Set default window size to something sensible&#xA;set lines=60&#xA;set columns=170&#xA;&amp;quot;&#xA;&amp;quot; Set the editor to wrap long lines on words&#xA;set wrap&#xA;set linebreak&#xA;&#xA;&amp;quot; Do not insert break lines to long lines&#xA;set textwidth=0&#xA;set wrapmargin=0&#xA;&#xA;&amp;quot; Turn on folding&#xA;set foldenable&#xA;&#xA;&amp;quot; Make folding indent sensitive&#xA;set foldmethod=indent&#xA;&#xA;&amp;quot; Don&#39;t autofold anything (but I can still fold manually)&#xA;set foldlevel=100&#xA;&#xA;&amp;quot; don&#39;t open folds when you search into them&#xA;set foldopen-=search&#xA;&#xA;&amp;quot; don&#39;t open folds when you undo stuff&#xA;set foldopen-=undo&#xA;&#xA;&amp;quot; Start the filetype plugin, this is really necessary&#xA;filetype plugin on&#xA;&#xA;&amp;quot;set fuopt=maxvert&#xA;&#xA;&amp;quot; I use simple php templates&#xA;au BufNewFile,BufRead *.tmpl setf php&#xA;&#xA;&amp;quot; Load doxygen syntax highlighting when necessary&#xA;let g:load_doxygen_syntax=1&#xA;&#xA;&amp;quot; Add doxygen syntax highlighting to all cpp files&#xA;au BufNewFile,BufRead *.cpp setf cpp.doxygen&#xA;&#xA;&amp;quot; Add jQuery syntax highlighting&#xA;au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery&#xA;&#xA;&amp;quot; Activate line numbers&#xA;set number&#xA;&#xA;&amp;quot; Tab size to 4 spaces, and no expanding of tabs to spaces!&#xA;set tabstop=4&#xA;set shiftwidth=4&#xA;set noexpandtab&#xA;&#xA;&amp;quot; Display only 5 first suggestions when correcting orthograph&#xA;set spellsuggest=best,5&#xA;&#xA;&amp;quot; I use the &amp;lt;,&amp;gt; shortcut to align a paragraph to the wrap width&#xA;nmap , gqap&#xA;&amp;quot;&#xA;&amp;quot; Use Ctrl-W+` to close current file without closing the split (needs bclose&#xA;&amp;quot; plugin)&#xA;nmap &amp;lt;C-W&amp;gt;` &amp;lt;Plug&amp;gt;Kwbd&#xA;&#xA;&amp;quot; Enable the use of Ctrl-Space and Ctrl-Enter for completion&#xA;imap &amp;lt;C-S-space&amp;gt; &amp;lt;C-n&amp;gt;&#xA;imap &amp;lt;C-space&amp;gt; &amp;lt;C-p&amp;gt;&#xA;imap &amp;lt;C-CR&amp;gt; &amp;lt;C-x&amp;gt;&amp;lt;C-o&amp;gt;&#xA;&#xA;&amp;quot; Map the up/down arrow keys to follow visual lines, not the real ones&#xA;map &amp;lt;Up&amp;gt; gk&#xA;map &amp;lt;Down&amp;gt; gj&#xA;imap &amp;lt;Down&amp;gt; &amp;lt;C-o&amp;gt;gj&#xA;imap &amp;lt;Up&amp;gt; &amp;lt;C-o&amp;gt;gk&#xA;&#xA;&amp;quot; Map Meta-j and Meta-k to follow visual lines&#xA;map &amp;lt;M-j&amp;gt; gj&#xA;map &amp;lt;M-k&amp;gt; gk&#xA;&#xA;&amp;quot; Map Home and End to go to beginning and end of the visual line&#xA;map &amp;lt;End&amp;gt; g&amp;lt;End&amp;gt;&#xA;map &amp;lt;Home&amp;gt; g&amp;lt;Home&amp;gt;&#xA;imap &amp;lt;End&amp;gt; &amp;lt;C-o&amp;gt;g&amp;lt;End&amp;gt;&#xA;imap &amp;lt;Home&amp;gt; &amp;lt;C-o&amp;gt;g&amp;lt;Home&amp;gt;&#xA;&#xA;&amp;quot; Make Meta-Shift-MouseScroll create a visual block selection&#xA;noremap &amp;lt;M-S-LeftMouse&amp;gt; &amp;lt;4-LeftMouse&amp;gt;&#xA;inoremap &amp;lt;M-S-LeftMouse&amp;gt; &amp;lt;4-LeftMouse&amp;gt;&#xA;noremap &amp;lt;M-S-LeftDrag&amp;gt; &amp;lt;LeftDrag&amp;gt;&#xA;inoremap &amp;lt;M-S-LeftDrag&amp;gt; &amp;lt;LeftDrag&amp;gt;&#xA;&#xA;&amp;quot;set statusline=%&amp;lt;[%02n]\ %F%(\ %m%h%w%y%r%)\ %a%=\ %8l,%c%V/%L\ (%P)&#xA;&amp;quot; Map gw to switch the word under the cursors with the next one&#xA;nnoremap &amp;lt;silent&amp;gt; gw &amp;quot;_yiw:s/\(\%#\w\+\)\(\W\+\)\(\w\+\)/\3\2\1/&amp;lt;CR&amp;gt;&amp;lt;c-o&amp;gt;&amp;lt;c-l&amp;gt;&#xA;&#xA;&amp;quot; Map gl to switch the word under the cursor with the previous one&#xA;nnoremap &amp;lt;silent&amp;gt; gl &amp;quot;_yiw?\w\+\_W\+\%#&amp;lt;CR&amp;gt;:s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/&amp;lt;CR&amp;gt;&amp;lt;c-o&amp;gt;&amp;lt;c-l&amp;gt;&#xA;&#xA;&amp;quot; Map F3 to show the list of buffers&#xA;map &amp;lt;F3&amp;gt; :buffers&amp;lt;CR&amp;gt;:b&amp;lt;space&amp;gt;&#xA;&#xA;&amp;quot; Map F4 to switch between .h and .cpp file&#xA;map &amp;lt;F4&amp;gt; :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,&amp;lt;CR&amp;gt;g`&amp;quot;&#xA;&#xA;&amp;quot; Map F5 and F6 to go to next/previous error marker&#xA;map &amp;lt;F5&amp;gt; :cp&amp;lt;CR&amp;gt;&#xA;map &amp;lt;F6&amp;gt; :cn&amp;lt;CR&amp;gt;&#xA;&#xA;&amp;quot; Map F8 to save all files and run Make&#xA;map &amp;lt;F8&amp;gt; :wall&amp;lt;CR&amp;gt;:make&amp;lt;CR&amp;gt;&#xA;&#xA;&amp;quot; Start indenting scheme automatically&#xA;filetype plugin indent on&#xA;&#xA;&amp;quot; Use the right grep command on mac&#xA;set grepprg=grep\ -nH\ $*&#xA;&#xA;&amp;quot; Of course we are using latex&#xA;let g:tex_flavor=&#39;latex&#39;&#xA;&#xA;&amp;quot; Autogenerate ctags on C/C++ source file save&#xA;&amp;quot;au BufWritePost .c,.cpp,*.h silent! !ctags -R &amp;amp;amp;&#xA;&#xA;&amp;quot; If we are on a Mac&#xA;if has(&amp;quot;unix&amp;quot;) &amp;amp;amp;&amp;amp;amp; match(system(&amp;quot;uname&amp;quot;),&#39;Darwin&#39;) != -1&#xA;let g:platform_MAC=1&#xA;&amp;quot; Setup a nice font for powerline&#xA;set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h12&#xA;&#xA;&amp;quot; Receive option keys as meta&#xA;set macmeta&#xA;&#xA;&amp;quot; Map :TB for mode for writing text on a big screen&#xA;command TB colorscheme mayansmoke|set spell|set linespace=8|set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h20|set fu&#xA;&amp;quot; Map :TB for mode for writing text on a small screen&#xA;command T colorscheme mayansmoke|set spell|set linespace=8|set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h14&#xA;&amp;quot; Map :TB for mode for writing code&#xA;command C colorscheme zenburn|set nospell|set linespace=0|set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h12&#xA;&#xA;&amp;quot; If we are on Linux&#xA;else&#xA;set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12&#xA;let g:Powerline_symbols = &#39;fancy&#39;&#xA;&#xA;&amp;quot; Map Meta+V as paste from system clipboard&#xA;imap &amp;lt;M-v&amp;gt; &amp;lt;Esc&amp;gt;&amp;quot;+pa&#xA;imap &amp;lt;M-S-v&amp;gt; &amp;lt;Esc&amp;gt;&amp;quot;+Pa&#xA;nmap &amp;lt;M-v&amp;gt; &amp;quot;+p&#xA;nmap &amp;lt;M-S-v&amp;gt; &amp;quot;+P&#xA;&#xA;&amp;quot; Map Meta+C as copy to system clipboard&#xA;vmap &amp;lt;M-c&amp;gt; &amp;quot;+y&#xA;&#xA;&amp;quot; Map Ctrl+S as save&#xA;nmap &amp;lt;C-s&amp;gt; :w&amp;lt;CR&amp;gt;&#xA;imap &amp;lt;C-s&amp;gt; &amp;lt;Esc&amp;gt;:w&amp;lt;CR&amp;gt;a&#xA;&#xA;&amp;quot; Map :TB for mode for writing text&#xA;command T colorscheme mayansmoke|set spell|set linespace=8|set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 14&#xA;&amp;quot; Map :TB for mode for writing code&#xA;command C colorscheme zenburn|set nospell|set linespace=0|set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 10&#xA;endif&#xA;&#xA;&amp;quot; Deletes double lines and such from a SVN log&#xA;function! CleanSVNLog()&#xA;%s/^-*$//g&#xA;%s/^r\d\d*.*$//g&#xA;%s/\n\n\n*/\r\r/&#xA;endfunction&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</description>
    </item>
  </channel>
</rss>
