<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>How I Vim</title>
    <description>Interviews with Vim users</description>
    <link>http://howivim.com/</link>
    <atom:link href="http://howivim.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Mon, 12 Dec 2016 04:14:47 +0000</pubDate>
    <lastBuildDate>Mon, 12 Dec 2016 04:14:47 +0000</lastBuildDate>
    <generator>Jekyll v3.3.1</generator>
    
      <item>
        <title>Karl Yngve Lervag</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;My name is Karl Yngve Lervåg. I’m a research scientist at SINTEF Energy
Research in Trondheim Norway. My main area of research is the study of flow
multiphase flow phenomena and thermodynamics.&lt;/p&gt;

&lt;p&gt;I use Vim for many things: writing papers (with vimtex), development of
numerical codes for solving scientific problems (mostly python and Fortran),
writing notes (vimwiki and markdown), writing scripts (bash, zsh, python).&lt;/p&gt;

&lt;p&gt;I started using Vim during my undergraduate studies, somewhere around
2003-2004. I learnt early on to use motions and commands, but I have to admit
that I was slow to learn about text objects. When I did, it really was
a revelation, and I begun to realize that Vi/Vim is like a language for editing
text. For me, this has become an essential thing, and today I use modal
settings for my terminal shell (zsh) and for my web reader (google chrome with
cvim). Anyway, I’ve learnt to use Vim obviously by using it a lot, and through
reading custom configurations. I think the help system is very good, and I use
it almost daily. I learned to write vimscript through contributing to plugins
like LaTeX-Box and through writing my own LaTeX plugin vimtex.&lt;/p&gt;

&lt;p&gt;When it comes to versions of Vim: I mainly use gvim, but of course also
terminal vim when necessary. I’ve looked into neovim: I like the idea, but with
age has also come some conservative attitudes. Vim works for me, and the
combination of vim with a terminal is great. So far there are no clear reasons
to switch. I use Arch Linux, and as such I tend to use very recent versions of
software such as Vim.  Today this means 8.0.86.&lt;/p&gt;

&lt;p&gt;I have to admit that I have looked into Emacs. It is clearly more powerful
and customizable, e.g. because of elisp. I really (really) like Lisp, although
I have not had the opportunity of working with it a lot. I think Spacemacs looks
very promising, as it combines the good from Emacs and Vim. Also, org-mode is
very tempting. There are no real alternatives to it for Vim, even though
vimwiki is OK. However, Vim really does work very well for me. After I’ve
become quite proficient with vimscript, I find I can typically add/implement
features that I want without too much work.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;My configuration consists of my &lt;code class=&quot;highlighter-rouge&quot;&gt;vimrc&lt;/code&gt; file, where plugins are loaded with
the well known and fantastic vim-plug. I also have a lot of minor additions in
a personal “plugin”. Thus my configurations looks like this:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dotvim
├── bundle
├── personal
│   ├── after
│   ├── autoload
│   ├── ftdetect
│   ├── ftplugin
│   ├── indent
│   ├── plugin
│   └── syntax
├── snippets
├── spell
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;If I clone my dotvim repo, then do &lt;code class=&quot;highlighter-rouge&quot;&gt;cat **/*.vim | wc -l&lt;/code&gt;, I find I have 2371
lines of Vim configuration. Most of it is in my &lt;code class=&quot;highlighter-rouge&quot;&gt;vimrc&lt;/code&gt; file, which currently
is at 1096 lines. Today I think it is a little bit too heavy, and I often try
to strip away things I don’t need. I have 59 plugins installed, but I would
guess that about 10 of them are not really that useful.&lt;/p&gt;

&lt;p&gt;When it comes to options, I think I use rather standard settings. I wrote my
&lt;code class=&quot;highlighter-rouge&quot;&gt;vimrc&lt;/code&gt; from scratch some time long ago, and I’ve tried to update it with the
idea that I should always know what I’m doing.&lt;/p&gt;

&lt;p&gt;I’ve relatively recently reverted from using a dedicated statusline plugin, as
I have found both that I can easily define my own statusline (and tabline, but
I rarely use tabs), and that I want to keep it very simple and distraction
free. The latter has become pretty important for me, so I also change the
default fold text to remove dashes, I use the cursor to indicate mode, and
I change some highlighting options to avoid underlines.&lt;/p&gt;

&lt;p&gt;A recent update to my configuration was to disable cursorline when vim focus
is lost. Today I use the following autocommands, which I think provides a nice
way to indicate where the current focus is.&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; Only use cursorline for current window&lt;/span&gt;
autocmd &lt;span class=&quot;nb&quot;&gt;WinEnter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;FocusGained&lt;/span&gt; * &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; cursorline
autocmd &lt;span class=&quot;nb&quot;&gt;WinLeave&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;FocusLost&lt;/span&gt;   * &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; nocursorline
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I have a few mappings, and I use &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;space&amp;gt;&lt;/code&gt; as my leader key. One of the most
important mappings is probably &lt;code class=&quot;highlighter-rouge&quot;&gt;jk -&amp;gt; &amp;lt;esc&amp;gt;&lt;/code&gt;, which I like because I now almost
never need the &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;esc&amp;gt;&lt;/code&gt; key. I know all the alternatives (move escape to caps
lock, etc), but I find this is enough for my needs. Other important mappings to
me are &lt;code class=&quot;highlighter-rouge&quot;&gt;gb&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;gB&lt;/code&gt; to change buffers and &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;leader&amp;gt;ev&lt;/code&gt; to open my &lt;code class=&quot;highlighter-rouge&quot;&gt;vimrc&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Finally, when it comes to plugins, I want to draw attention to junegunn’s
vim-easy-align. It provides a very convenient command to interactively
tabularize text based on delimiters, &lt;code class=&quot;highlighter-rouge&quot;&gt;:LiveEasyAlign&lt;/code&gt;. I don’t use it very
often, but I smile every time I do! I also find vim-sandwich by machakann
great: It provides both text objects and “verbs” for manipulating surroundings.
Opposed to surround.vim by tpope, it allows very advanced surround definitions.&lt;/p&gt;

&lt;p&gt;Further, I think Konfekts FastFold plugin is good: It solves the problem
with Vim’s slow folding for syntax and expression foldmethods. I also have to
mention tpopes fugitive, as well as Shougo’s neocomplete and unite and welle’s
targets.vim. Great plugins!&lt;/p&gt;

&lt;h2 id=&quot;tell-us-the-story-behind-vimtex&quot;&gt;Tell us the story behind vimtex.&lt;/h2&gt;

&lt;p&gt;vimtex is a plugin for writing LaTeX documents. LaTeX is a system for
typesetting beautiful documents, and is very much favored by mathematicians and
physicists e.g. because it is easy to write equations. I use it to write my
papers, as well as many other things. Although, I should mention that today
I use markdown for simple things, because it is more convenient.&lt;/p&gt;

&lt;p&gt;I had been contributing to LaTeX-Box for quite awhile before I started on
vimtex. I found it was difficult to solve issues, and I was thinking it had to
do with the structure of the code. I thought that it shouldn’t take too long to
rewrite the code and make things better, and so on a plane to Iceland I started
writing vimtex. It began as rewrite of LaTeX-Box, but it didn’t take long until
I had updated, changed, moved or removed almost every line.&lt;/p&gt;

&lt;p&gt;The core idea was to have a more consistent code structure. And even though
there are things I see today that I should have done differently, I think it
has been a success. With vimtex I now have a LaTeX plugin that does what
I want. It has relevant text objects and good commands for compiling and
viewing documents. I think the features are getting close to full, although
there might be some improvements to format expressions and motions in the
future. Else I think my efforts will mainly focus on solving issues and fixing
bugs (strange how there always seem to be some bugs remaining).&lt;/p&gt;

&lt;p&gt;The main issues today concern support for Windows, I think. I don’t really
use Vim on windows, and even though I do have a Windows computer where I can
test things, it takes much more time for me to do it. And time is a thing
I really don’t have much of these days. So, as the plugin is getting more
popular, so are issues related to running vimtex on Windows. I hope and think
that I am getting closer to a version that should work well for most people,
but I have realized that I need to add a section in the docs with
troubleshooting for Windows. Some things are just too difficult…&lt;/p&gt;

&lt;p&gt;I have to say that even though I have mainly developed vimtex all by myself,
it would NOT have been possible without the help from users who open issues and
help solve them. I think I have been lucky in that there are many users who
take their time to write good and thoughtful bug reports and feature requests.
This can not be stressed enough: vimtex would not have been as good as it is
today without contributions from fellow Vim users who write LaTeX documents!&lt;/p&gt;

&lt;h2 id=&quot;share-a-snippet-of-vim-script-youve-written-and-talk-about-what-it-does&quot;&gt;Share a snippet of Vim script you’ve written and talk about what it does.&lt;/h2&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;command&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; MergeMode &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;call&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:setup_merge_mode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:setup_merge_mode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;!&lt;/span&gt;&amp;amp;diff &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;endif&lt;/span&gt;

  &lt;span class=&quot;c&quot;&gt;&quot; Create straightforward mappings&lt;/span&gt;
  nmap     &lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;n&lt;/span&gt;
  nmap     &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;n&lt;/span&gt;
  nnoremap &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;nop&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
  nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;dp&lt;/span&gt;        &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;diffput&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
  nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; dol       &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;diffget&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
  nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; dor       &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;diffget&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
  nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; do1       &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;diffget&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
  nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; do3       &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;diffget&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
  nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;leader&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;q&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;xa&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;

  &lt;span class=&quot;c&quot;&gt;&quot; Add some more complex mapppings&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;sid &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; matchstr&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;expand&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'&amp;lt;sfile&amp;gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'\zs&amp;lt;SNR&amp;gt;\d\+_\ze.*$'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  execute &lt;span class=&quot;s1&quot;&gt;'nnoremap &amp;lt;silent&amp;gt; u :call '&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;sid &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'undo()&amp;lt;cr&amp;gt;'&lt;/span&gt;

  &lt;span class=&quot;c&quot;&gt;&quot; Set buffer options&lt;/span&gt;
  &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;wincmd&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;w&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; noswapfile
  &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; nomodifiable
  &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;wincmd&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;w&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; noswapfile
  &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; nomodifiable

  &lt;span class=&quot;c&quot;&gt;&quot; Move to local window and to first conflict&lt;/span&gt;
  &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;wincmd&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;w&lt;/span&gt;
  normal gg&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;endfunction&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:undo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; winnr&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt;# &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;
    normal&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;u&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;wincmd&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;w&lt;/span&gt;
    normal&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;u&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;wincmd&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;p&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;endif&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;endfunction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Combined with settings for git and Mercurial, I find Vim is really good at
solving merge conflicts.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#
# In .hgrc
#
[merge-tools]
vim.executable = gvim
vim.args = -f -d $local $output $other +MergeMode
vim.premerge = keep-merge3

#
# In .gitconfig
#
[merge]
  tool = mydiff
  conflictStyle = diff3

[mergetool]
  keepBackup = false
  prompt = false

[mergetool &quot;mydiff&quot;]
  cmd = gvim -f -d $LOCAL $MERGED $REMOTE -c &quot;MergeMode&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;First, I want to point out that the code snippet displays quite well my coding preference. I typically use two space indentation and I like to keep things in lower case. I use empty lines to separate blocks of code (then &lt;code class=&quot;highlighter-rouge&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;}&lt;/code&gt; make it easy to move between the blocks), and I try to write code that is easy to read - thus that don’t need too many comments. Still, I try to comment things that are difficult to understand.&lt;/p&gt;

&lt;p&gt;The function &lt;code class=&quot;highlighter-rouge&quot;&gt;s:setup_merge_mode()&lt;/code&gt; does most of the “magic”. First, it does nothing unless the &lt;code class=&quot;highlighter-rouge&quot;&gt;diff&lt;/code&gt; option is enabled (i.e., we are diffing something). Next, and important(!): It assumes we are opening three files: The local file is buffer 1 (local = left), the remote file is buffer 3 (remote = right), and the merge result is buffer 2 (middle). The function basically just does two things: Creates some mappings and turns the local/left and remote/right buffers nomodifiable (and turns of swap files). I map &lt;code class=&quot;highlighter-rouge&quot;&gt;]]&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;[[&lt;/code&gt; to move between conflicts (note that &lt;code class=&quot;highlighter-rouge&quot;&gt;[n&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;n&lt;/code&gt; come from tpope’s unimpaired). Then I map &lt;code class=&quot;highlighter-rouge&quot;&gt;do1&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;do3&lt;/code&gt; (or &lt;code class=&quot;highlighter-rouge&quot;&gt;dol&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;dor&lt;/code&gt;) to &lt;code class=&quot;highlighter-rouge&quot;&gt;&lt;span class=&quot;gh&quot;&gt;diff obtain left|right&lt;/span&gt;&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;dp&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;&lt;span class=&quot;gh&quot;&gt;diff put&lt;/span&gt;&lt;/code&gt;. I use the last mapping only when I’m navigating one of the local or remote buffers. The mappings make it simple to go through the conflicts and choose which side to use. Finally, I use the &lt;code class=&quot;highlighter-rouge&quot;&gt;s:undo&lt;/code&gt; mapped to u to allow undos to affect the merge result buffer, even when I am viewing the other buffers. Thus, if I do &lt;code class=&quot;highlighter-rouge&quot;&gt;dp&lt;/code&gt; from the local buffer, I can undo it with &lt;code class=&quot;highlighter-rouge&quot;&gt;u&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I have to stress: This snippet is specifically designed for my own workflow, and it needs to be used in a specific way. The function is used to define a command, and I’ve provided examples for how the command should be run in the &lt;code class=&quot;highlighter-rouge&quot;&gt;.hgrc&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;.gitconfig&lt;/code&gt; files.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/lervag/dotvim&quot;&gt;dotvim&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/lervag/vimtex&quot;&gt;vimtex&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/lervag/file-line&quot;&gt;file-line&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Sun, 11 Dec 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/karl-yngve-lervag/</link>
        <guid isPermaLink="true">http://howivim.com/2016/karl-yngve-lervag/</guid>
        
        
      </item>
    
      <item>
        <title>Kuniwak</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;My name is Kuniwak.
I’m a developer of &lt;a href=&quot;https://github.com/Kuniwak/vint&quot;&gt;Vint&lt;/a&gt;, that is a Vim script Lint.&lt;/p&gt;

&lt;p&gt;I met Vim when I was a student of Tokyo National College of Technology, and I began maintaining Linux routers as a moderator of the Internet of the college dorm.
But I didn’t know programming well (and also Vim, of course) because my course is electrical engineering.
I learned these things there; three-phase AC, Faraday’s law, Lenz’s law, …
So I knew only 3 things about Vim; how to open a file, how to switch modes and how to save and exit.&lt;/p&gt;

&lt;p&gt;After 5 years, I began learning about programming in earnest, and I understood how important efficient editing is.
Soon after this, I said, “Goodbye, my lovely cursor keys…” I decide to live with the HJKL keys.
Then Vim locked me in its key bindings.&lt;/p&gt;

&lt;p&gt;Now, I use Vim for Web development and writing technological books.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;I’m a Lint freak, so I love &lt;a href=&quot;https://github.com/scrooloose/syntastic&quot;&gt;Syntastic&lt;/a&gt;.
It is a plugin for syntax checkers (recently, Vint became one of builtin checkers of Syntastic).
I have been checking my code by Syntastic for all languages I use.&lt;/p&gt;

&lt;p&gt;And I also love the color scheme &lt;a href=&quot;http://cocopon.me/app/vim-iceberg/&quot;&gt;iceberg.vim&lt;/a&gt;.
I can find syntax errors easily because this color scheme uses red for only warning colors.&lt;/p&gt;

&lt;p&gt;One more thing.
I have the self-introduction command &lt;code class=&quot;highlighter-rouge&quot;&gt;:Kuniwak&lt;/code&gt;.
My Vim can introduce me by displaying my profile:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/kuniwak-vim-as-a-namecard.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I wrote the article &lt;a href=&quot;http://orgachem.hatenablog.com/entry/2013/12/19/130701&quot;&gt;How to Start “Vim as a Name card”&lt;/a&gt; (this article is written in Japanese).
You can stop carrying your name cards if you read it, maybe.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;Lint rules.&lt;/p&gt;

&lt;p&gt;Lint rules are made of many things should know such as the language history, pitfalls and so on.&lt;/p&gt;

&lt;p&gt;For example, the lint rule “ProhibitEqualTildeOperator” is described in &lt;a href=&quot;https://google.github.io/styleguide/vimscriptguide.xml&quot;&gt;Google Vimscript Style Guide&lt;/a&gt; tell us about 2 important things.
The first one is the following pitfall of comparative operators:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The matching behavior depends upon the user’s ignorecase and smartcase settings and on whether you compare them with the &lt;code class=&quot;highlighter-rouge&quot;&gt;=~&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;=~#&lt;/code&gt;, or &lt;code class=&quot;highlighter-rouge&quot;&gt;=~?&lt;/code&gt; family of operators.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We can avoid the pitfall in advance by only reading it.&lt;/p&gt;

&lt;p&gt;The second one is the useful operators such as &lt;code class=&quot;highlighter-rouge&quot;&gt;=~#&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;=~?&lt;/code&gt;.
Newbies will use the bad operators like &lt;code class=&quot;highlighter-rouge&quot;&gt;=~&lt;/code&gt; and fall the pitfall if didn’t know the rule.&lt;/p&gt;

&lt;p&gt;There are too many similar cases to list them all.
So I think lint rules are very useful resource to learn language.&lt;/p&gt;

&lt;h2 id=&quot;tell-us-about-your-project-vint&quot;&gt;Tell us about your project vint.&lt;/h2&gt;

&lt;p&gt;Vint is a Vim script Language Lint.&lt;/p&gt;

&lt;p&gt;You can know why Vint was born and what problems Vint can resolve by reading &lt;a href=&quot;https://speakerdeck.com/orgachem/vint-new-vim-script-lint&quot;&gt;this slide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The goal to reach for Vint is:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Highly extensible&lt;/li&gt;
  &lt;li&gt;Highly customizable&lt;/li&gt;
  &lt;li&gt;High performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think the most variable feature of lints is undefined variable detections.
I have always been using this feature for most languages.
Vint also support it, so you can find undefined variables.&lt;/p&gt;

&lt;p&gt;For example, the variable &lt;code class=&quot;highlighter-rouge&quot;&gt;param&lt;/code&gt; is not defined in the following code:&lt;/p&gt;

&lt;div class=&quot;language-viml highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; /tmp/hoge.vim&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; DoSomething&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;param&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
	echo param
&lt;span class=&quot;k&quot;&gt;endfunction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;then, Vint can report the error by the command &lt;code class=&quot;highlighter-rouge&quot;&gt;vint&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;vint&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; /tmp/hoge.vim
&lt;/span&gt;/tmp/hoge.vim:4:7: Undefined variable: param (see :help E738)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;And the default output format is designed to be QuickFix-friendly, so you can use Vint with the &lt;code class=&quot;highlighter-rouge&quot;&gt;cexpr&lt;/code&gt; command:&lt;/p&gt;

&lt;div class=&quot;language-viml highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;cexpr&lt;/span&gt; system&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'vint '&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; expand&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'%'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;And also, you can use Vint with Syntastic.&lt;/p&gt;

&lt;p&gt;Most recently Vint began to support &lt;a href=&quot;https://neovim.io/&quot;&gt;Neovim&lt;/a&gt;.
I’m extremely grateful for the contribution (and other valiant contributions too).&lt;/p&gt;

&lt;h2 id=&quot;are-you-involved-in-a-local-vim-community&quot;&gt;Are you involved in a local Vim community?&lt;/h2&gt;

&lt;p&gt;Yes, I’m a staff of &lt;a href=&quot;http://vimconf.vim-jp.org/2015/en/&quot;&gt;VimConf&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;VimConf is an international Vim conference that have held in Tokyo in 2013, 2014 and 2015.
In this conference, many Vimmers (inluding well-known contributors and plugin developers) spoke about their plugins or life-changing plugins or life hacking with Vim.&lt;/p&gt;

&lt;p&gt;You can see slides and video records of the past VimConf:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://vimconf.vim-jp.org/2015/en/#agenda&quot;&gt;VimConf 2015&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://vimconf.vim-jp.org/2014/reports/&quot;&gt;VimConf 2014&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://vimconf.vim-jp.org/2013/report.html&quot;&gt;VimConf 2013&lt;/a&gt; (slides only)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please contact &lt;a href=&quot;https://github.com/vim-jp/vimconf&quot;&gt;us&lt;/a&gt; if you are interested in our conference!&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/Kuniwak&quot;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/orga_chem&quot;&gt;Twitter&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://orgachem.hatenablog.com&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Fri, 10 Jun 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/kuniwak/</link>
        <guid isPermaLink="true">http://howivim.com/2016/kuniwak/</guid>
        
        
      </item>
    
      <item>
        <title>Kassio Borges</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;Hello there, I’m Kassio Borges. I’m a Brazilian Developer, currently working
mainly with Ruby and Rails at Plataformatec. So I do use vim and neovim for
coding, noting and draft ideas. I’ve been using vim for almost a decade, at the
beginning I used it more for work on text files on servers, nowadays I use it
for almost every text editing I have to do.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;First of all, I’d like to tell I care about my vim’s configurations a lot,
however I also love to try new configurations, so my config files change a lot.
My vim repo, on github, has more than a thousand commits, and it exists only for
4 years.&lt;/p&gt;

&lt;p&gt;Some configs change a lot on my files: key mappings and plugins loading. I’m
always trying new plugins, and also trying to live without some plugins. Today,
I’m using 26 plugins on my configs, some of them only for neovim.&lt;/p&gt;

&lt;p&gt;I have one config that I’d love to be default in vim, I use &lt;code class=&quot;highlighter-rouge&quot;&gt;!&lt;/code&gt; to search the
current word/selection without move the cursor. This is awesome to look
around where the current word/selection is being used, also to help with
replacing. It’s very common for me to use &lt;code class=&quot;highlighter-rouge&quot;&gt;:s//new-word/g&lt;/code&gt; just after a &lt;code class=&quot;highlighter-rouge&quot;&gt;!&lt;/code&gt;. This
way, before the replacement, I’ll see what’s changing on the file.&lt;/p&gt;

&lt;p&gt;Besides that, there are some plugins that I use a lot:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;CtrlP&lt;/p&gt;

    &lt;p&gt;I tried Unite.vim, fzf, and others, however CtrlP, for me, has the best UI in
 vim. It’s simple and fast enough with &lt;code class=&quot;highlighter-rouge&quot;&gt;ag&lt;/code&gt;. Sometimes I’d like it to be
 faster, but for my current projects, it’s ok.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;NERDTree&lt;/p&gt;

    &lt;p&gt;Sometimes I’m lazy enough to use my mouse. I know, I know… But sometimes I’m
just reading code and don’t want to use the keyboard. NERDTree helps a lot
with this, because, even in terminal, I just click, click, click and move
around the code. Besides that, I like to have a tree view of the project from
time to time.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Vim surround&lt;/p&gt;

    &lt;p&gt;This is the type of plugin that I think should be default on vim. I don’t know
when I use, but everytime I try to live without it I can’t. Vim without
surround, for coding, it’s to painful for me.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Vim repeat&lt;/p&gt;

    &lt;p&gt;This is another example of a plugin that should be default, I don’t recall to
use, or when it’s possible to use or not, I just use. And I tried remove it,
but, again, my coding day it’s too painful without it.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;ultisnips&lt;/p&gt;

    &lt;p&gt;I’m lazy, snips helps me a lot. And this was my chose, I don’t recall the
reason. I tried others, but this one fitted better to my use.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/kassio/vim-session_manager&quot;&gt;Vim Session Manager&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;This is a little plugin I created to help me when I want to restart vim
without loose my current window setup. I just run &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;leader&amp;gt;ss&lt;/code&gt; to save a
session, &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;leader&amp;gt;sl&lt;/code&gt; to load and &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;leader&amp;gt;sd&lt;/code&gt; to delete. The plugin manages
the session name and folder for me.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Neomake&lt;/p&gt;

    &lt;p&gt;As a coder, for me is awesome run the linter all the time I save a file, and
Neomake, with neovim, works like a charm for that.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Neoterm&lt;/p&gt;

    &lt;p&gt;Again, as a coder, and a lazy one, I like to run tests, or little terminal
jobs fast and without leave the editor. So I created this to wrapper the
&lt;code class=&quot;highlighter-rouge&quot;&gt;:terminal&lt;/code&gt; feature of neoterm and run tests, or use a REPL, os just send a
command without much effort.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Syntax plugins&lt;/p&gt;

    &lt;p&gt;From my 26 plugins, 9 are language syntaxes. Ruby, Rspec, Minitest, HTML,
Javascript, Elixir, Markdown and &lt;a href=&quot;tomdoc.org&quot;&gt;Tomdoc&lt;/a&gt;.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tried a lot of statusline plugins, but I didn’t like anyone so I use a fancy
statusline that I configured by myself.&lt;/p&gt;

&lt;p&gt;Currently I’m using ocean-next colors, on iTerm2 an neovim/vim. It’s very nice
on neovim with &lt;code class=&quot;highlighter-rouge&quot;&gt;$NVIM_TUI_ENABLE_TRUE_COLOR&lt;/code&gt; enabled.&lt;/p&gt;

&lt;p&gt;I already used as leader key &lt;code class=&quot;highlighter-rouge&quot;&gt;\&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;,&lt;/code&gt;, but nowadays I’m using &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;space&amp;gt;&lt;/code&gt;. It
makes a lot of sense for me to use the biggest key on the keyboard as the leader
one.&lt;/p&gt;

&lt;p&gt;Some people already asked my about how to organize vim configs. I like to
organize my configs as personal plugins. I have on my &lt;code class=&quot;highlighter-rouge&quot;&gt;vimrc&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;init.vim &lt;/code&gt; only
&lt;code class=&quot;highlighter-rouge&quot;&gt;set&lt;/code&gt;s and some little vim boot configs. All external plugins’s configurations
are on my &lt;code class=&quot;highlighter-rouge&quot;&gt;/plugins&lt;/code&gt; folder. All my custom functions are in &lt;code class=&quot;highlighter-rouge&quot;&gt;/autoload&lt;/code&gt;. This
made my setup easier to maintain and faster to load, because vim doesn’t load my
functions on boot.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;I read almost all &lt;code class=&quot;highlighter-rouge&quot;&gt;:help&lt;/code&gt;. I learned a lot reading the source code from the
plugins I use most, like vim-ruby. Vim-casts and Pratical Vim are also a good
place to learn how to improve the vim skills.
I love learn more about regexp and replace techniques, because refactoring large
code bases are hard and this can help a lot. Also, I like to learn about all the
news, so I try to follow every new feature/concept on vim/neovim.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I fell in love with vim few years ago, but it was missing some features. Neovim
brought some of the missing to the table. I just learned that vim 8.0 is back to
the track, bringing &lt;code class=&quot;highlighter-rouge&quot;&gt;channels&lt;/code&gt; and a native plugin manager and I’m really
excited about these new features.&lt;/p&gt;

&lt;h2 id=&quot;how-did-you-get-started-writing-vim-plugins&quot;&gt;How did you get started writing Vim plugins?&lt;/h2&gt;

&lt;p&gt;I guess my first plugin as the &lt;code class=&quot;highlighter-rouge&quot;&gt;vim-session_manager&lt;/code&gt;. Writing plugin, for me,
it’s not a vim thing, I’m always trying to get all I can from my tools.  With
vim, one way to do this is writing plugins. After writing &lt;code class=&quot;highlighter-rouge&quot;&gt;vim-session_manager&lt;/code&gt;,
I was more comfortable with vim script, so I started write a lot of custom
functions, and other little plugins.&lt;/p&gt;

&lt;h2 id=&quot;tell-us-the-story-behind-your-plugin-neoterm&quot;&gt;Tell us the story behind your plugin neoterm.&lt;/h2&gt;

&lt;p&gt;Before neovim I used to use vim+tmux. I had a plugin to send commands to tmux.
But I wasn’t satisfied with that. I’d like something more IDEish. So when neovim
brought &lt;code class=&quot;highlighter-rouge&quot;&gt;:terminal&lt;/code&gt; to the table I saw the opportunity to run tests and other
commands without leave vim, and that was awesome.
I’m currently without many time to work on neoterm, but I’d like to improve its
tests’ statusline feedback. Today it’s done by pattern match, I’d like to
improve it to use the test command status instead, this way we’d have a more
reliable test status on neovim’s statusline.&lt;/p&gt;

&lt;h2 id=&quot;are-you-involved-in-a-local-vim-community&quot;&gt;Are you involved in a local Vim community?&lt;/h2&gt;

&lt;p&gt;I went, recently, to the first vim meetup on São Paulo and talked about neovim
and vim configurations organization. I really enjoy help people to use better
vim/neovim, and I intend to do this again when possible.&lt;/p&gt;

&lt;h2 id=&quot;share-a-snippet-of-vim-script-youve-written-and-talk-about-what-it-does&quot;&gt;Share a snippet of Vim script you’ve written and talk about what it does.&lt;/h2&gt;

&lt;div class=&quot;language-viml highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;preserve&lt;/span&gt;#&lt;span class=&quot;k&quot;&gt;preserve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; lazyredraw
  &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;search&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;@/

  &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; last_view &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; winsaveview&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  execute &lt;span class=&quot;nv&quot;&gt;a:command&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;call&lt;/span&gt; winrestview&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;last_view&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; @/&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;search
  &lt;span class=&quot;k&quot;&gt;redraw&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;setlocal&lt;/span&gt; nolazyredraw
&lt;span class=&quot;k&quot;&gt;endfunction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This is a snippet that I copied the idea from I don’t know where (I think is
vim wiki). I use this function on many keymappings, and other functions. What it
does is very simple, it runs the given command without move the cursor or the
current window view. I use this, for instance, in the &lt;code class=&quot;highlighter-rouge&quot;&gt;!&lt;/code&gt; mapping that I
mentioned before.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.github.com/kassio&quot;&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Wed, 08 Jun 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/kassio-borges/</link>
        <guid isPermaLink="true">http://howivim.com/2016/kassio-borges/</guid>
        
        
      </item>
    
      <item>
        <title>Daniel Schauenberg</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;My name is Daniel and I’m a staff engineer at Etsy on the DevTools team. We
are an infrastructure team that handles things like maintaining the deployment
system and the development environment, the application level metrics stack,
and dev data access. My daily work is a very fun mix of software engineering
and operations type work.&lt;/p&gt;

&lt;p&gt;Due to the nature of that I write a lot of Chef, shell scripts, ruby, and PHP.
Outside of work I also write the occasional bit of Go or C++ for some of my open
source projects. For all of this I always use vim, 99% of the time running
inside a tmux session.&lt;/p&gt;

&lt;p&gt;I got introduced to vim in 2004 by a friend who showed me around Linux and
UNIX when we were both first semester university students. Back then I didn’t
have a preferred editor and as I learned more about Linux I just used vim as
it already was installed on most systems. I very quickly switched from Linux
to FreeBSD and with that from vim to vi (or nvi rather) as the default
installed editor. At that point I hadn’t really started using any plugins, so
going from vanilla vim to vi wasn’t really a big deal for me. I used it long
enough in that setup that when I got my first Mac and started using editors
like SubEthaEdit, Textmate, and Smultron because I liked their native look and
feel, I had already built up the vim muscle memory. And as I was using gVim on
the Windows machines at work, I kept the muscle memory although I wasn’t using
vim on my personal machines. When I went back to grad school I eventually
switched to MacVim. Mostly because Textmate and all the other OS X editors
seemed like abandon ware at the time. And I wanted something I was familiar
with and I knew would stick around. So I decided to go back to vim and go full
in with customizing it to my needs. And now roughly 7 years later vim is
basically the only way I edit text files on a computer. I use it for code,
blogging, journaling, meeting notes, emails (via mutt), and &lt;a href=&quot;https://unwiredcouch.com/2015/06/08/accounting-the-unix-way.html&quot;&gt;accounting (via
ledger)&lt;/a&gt;. I try to use as much of vanilla vim as possible as my job
includes working on a bunch of different servers and I don’t want to be slowed
down too much when I don’t have my vim config ready. I also try to only use
plugins that are purely written in VimL. That way I don’t have to deal with
how to build the right vim on the different platforms (OS X, Linux, FreeBSD)
I’m most likely to use it on.&lt;/p&gt;

&lt;p&gt;Sadly on the iPhone vim is not a super great choice so I use Editorial there,
mostly for writing blog posts when I don’t want to have a laptop open.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;When I went back to vim I also started using plugins for real. While writing
my undergrad thesis (with vim and latex) I had already started with a super
simple vimrc file I found somewhere and that is still the base of the setup I
use today - 9 years later. When I started adding plugins to my vim setup, some
of the first ones I added were pathogen and fugitive. I also was used to
having tab complete things so I installed supertab. From there I constantly
added and removed some plugins and over the years I’ve converged to a dozen or
so plugins that I have installed. I keep them together with my vimrc in a git
repo &lt;a href=&quot;https://github.com/mrtazz/vimfiles&quot;&gt;on GitHub&lt;/a&gt; and I wrote a Makefile that handles installing the
configuration via symlinks and updating and adding plugins via a vim-bundle
script I found somewhere and have downloaded into my ~/bin. The plugins I use
most are the ones that are just enabled in the background and do their thing,
like syntastic, supertab, tabline, or syntax highlighters. I do have some
others to add functionality, like ctrl-p, nerdtree, or VoOM. I do use them
occasionally, but most of the time forget about them. A plugin that falls into
that category but that I use a lot is vim-zenroom2. It creates a writeroom
style focus in vim and I love it for writing. I use it a lot for blog posts,
journaling, meeting notes, or documentation writing.&lt;/p&gt;

&lt;p&gt;Another plugin I wrote and use a lot is &lt;a href=&quot;https://github.com/mrtazz/vim-stencil&quot;&gt;vim-stencil&lt;/a&gt;. It provides a
simple way to have templates for vim that you can load into a buffer. It’s
inspired by the vim skeleton files and I use it a ton for meeting note
templates, journaling scaffold and weekly planning notes. A nice side effect
of writing emails in mutt is that I can also use it for canned responses. Plus
I can keep all of my templates in git together with my vim config. The plugin
also provides a very basic set of variable expansions for common things like
date or weekday.&lt;/p&gt;

&lt;p&gt;I use solarized light as my theme although I wasn’t a big fan when it came
out. I used a slightly patched version of molokai for many years. But one day
I realized that I was really annoyed by the different applications I use a lot
in the terminal (regular terminal colors, vim, mut, weechat) all look
different. And I wanted consistency and at the same time switch to a light
theme as it was easier on my eyes. And solarized light was the only one people
had already ported to most applications. So I gave it a real shot and now I
really enjoy it.&lt;/p&gt;

&lt;p&gt;Some of the maybe more interesting things in my vimrc is that I have line
numbers turned off. I used them for a long time, then played with relative
line numbers for a bit and then decided that I don’t really care about it most
of the time, so I just turned it off. When I really want the current line
number I just look in the statusline. I also have a lot of one off settings
and inline functions in my vimrc. I have a &lt;code class=&quot;highlighter-rouge&quot;&gt;Today()&lt;/code&gt; function that inserts the
current date in a specific format and is mapped to &lt;code class=&quot;highlighter-rouge&quot;&gt;,d&lt;/code&gt; (, is my leader key).
I use it a ton when writing my work journal or taking notes in meetings. I’ve
also inlined the &lt;code class=&quot;highlighter-rouge&quot;&gt;GoFormat&lt;/code&gt; function from the deprecated official plugin. They
made &lt;code class=&quot;highlighter-rouge&quot;&gt;vim-go&lt;/code&gt; the new official one and it did way too many things for my taste
as I only really wanted automatic formatting for my Go code.&lt;/p&gt;

&lt;p&gt;I also activate spelling for a certain set of file types. Funnily I still have
it enabled for &lt;code class=&quot;highlighter-rouge&quot;&gt;.tex&lt;/code&gt; files from my university days. But these days the
setting to enable it for markdown and mail (as I use mutt) is what I really
use. As those types of things are mostly read by others (email and
documentation) and written in English which isn’t my first language.&lt;/p&gt;

&lt;p&gt;Speaking of &lt;a href=&quot;https://unwiredcouch.com/2015/08/31/writing-workflow.html&quot;&gt;writing in vim&lt;/a&gt;. I use it a ton for non programming as
well. And as mentioned I use vim-zenroom for focused writing which depends on
Goyo. In order to make the experience better there I have some Goyo hooks in
my vimrc to close the buffer if it’s the last one in Goyo mode and also run a
command to disable the tmux status bar for complete focus.&lt;/p&gt;

&lt;p&gt;I also have the arrow keys disabled to force me to use hjkl for navigation. I
did that when I started at Etsy and knew I would be working in vim a lot more
so I decided to train that muscle memory. A side effect of that is that I
enable hjkl navigation support wherever possible in other apps.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;I think the most helpful resources have been the vim wikia and random blog
posts when I was researching some specific things like setups for writing or
programming in specific languages.&lt;/p&gt;

&lt;p&gt;When it comes to writing plugins, I think I learned the most from reading
&lt;a href=&quot;https://github.com/tpope&quot;&gt;@tpope’s&lt;/a&gt; and &lt;a href=&quot;https://github.com/mattn&quot;&gt;@mattn’s&lt;/a&gt; code on GitHub.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I can’t remember what the most recent thing is, but something I want to learn
is how to better navigate within text. I do use G, ctrl-d, and ctrl-u a lot
for longer jumps. And I use O/o and A/a and those commands a lot when I know I
want to insert things. However within textblocks or when in visual mode I
still hold down hjkl until the cursor is where I want it to be. I would love
to have a more ingrained understanding of how to jump more efficiently in vim.&lt;/p&gt;

&lt;h2 id=&quot;how-did-you-get-started-writing-vim-plugins&quot;&gt;How did you get started writing Vim plugins?&lt;/h2&gt;

&lt;p&gt;I think my first steps in plugin writing must have been around 2010 when I was
trying to add mustache support to the zencoding vim plugin. I was just
learning about the current state of web development and tried out a lot of
things. I was really into mustache and the idea of writing HTML faster with
zencoding intrigued me. I think I never actually got it working or I sent a
pull request and it didn’t get merged and I failed to follow up. But it was
super fun and I learned a lot.&lt;/p&gt;

&lt;h2 id=&quot;tell-us-about-your-plugin-simplenotevim&quot;&gt;Tell us about your plugin simplenote.vim.&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mrtazz/simplenote.vim&quot;&gt;simplenote.vim&lt;/a&gt; is a plugin that lets you edit and manage
your simplenote notes right from vim. It really grew out of the situation that
I was a big fan of simplenote and it was the only application I used for
writing outside of vim.  So I wanted to see if I couldn’t get it working as a
vim plugin and not have to got the route via Dropbox syncing. It was really
mostly a curiosity thing and something I thought would be cool to exist. My
initial plan was to write it completely in vim script. As I me tokens before I
really like having a vim setup that doesn’t need any special things compiled
in. And I had a rough version working that used curl for talking to the API
and presented JSON to edit. However when it came to JSON parsing all the
existing solutions were not super intuitive and I needed to somehow make it
easy to install the dependencies for the plugin as I wanted it to be really
easy to use. And then I would still have to write all the API wrapper methods
for the actual API. So I decided to just write a &lt;a href=&quot;https://github.com/mrtazz/simplenote.py&quot;&gt;python
module&lt;/a&gt; for the simplenote API and publish that as well. And
make a strict separation between data access and storage which would be Python
and vim interfacing which would be vim script. I chose Python at the time
because I was already familiar with it and had written a bunch of API wrappers
for different things in it already.&lt;/p&gt;

&lt;p&gt;The first version was super barebones and pretty rough, but it was incredibly
fun to write it. The hardest part was probably testing it as I had no idea how
to write unit tests for the vim script part of the plugin. So it was a lot of
editing, putting in echo statements, and opening another vim session to try it
out. I learned a ton about vim’s buffer and window model, how to run
concurrent Python inside my editor and how to manage a somewhat popular open
source project.&lt;/p&gt;

&lt;p&gt;After a couple of years of using it I stopped as I didn’t want to host my (at
times pretty personal) notes on someone else’s computer. And as I couldn’t
give the project the attention it deserved while not actively using it I
reached out to @atomicules who had been the most active outside contributor at
that point and asked him if he wanted to take over maintenance of the vim
plugin and the Python module. Fortunately he was up for it and so for the last
3 years he has been doing a fantastic job of maintaining and pushing the
project forward.&lt;/p&gt;

&lt;h2 id=&quot;are-you-involved-in-a-local-vim-community&quot;&gt;Are you involved in a local Vim community?&lt;/h2&gt;

&lt;p&gt;I’m not. For some reason that has never occurred to me.&lt;/p&gt;

&lt;h2 id=&quot;share-a-snippet-of-vim-script-youve-written-and-talk-about-what-it-does&quot;&gt;Share a snippet of Vim script you’ve written and talk about what it does.&lt;/h2&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;function! Today()
  let today = strftime(&quot;%A %m\/%d\/%Y&quot;)
  exe &quot;normal a&quot;. today
endfunction
command! Today :call Today()
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This is the snippet I talked about earlier that inserts the current date after
the cursor position. It’s pretty simple and yet incredibly useful for me. It
creates a string from the current date formatted as “weekday day/month/year”
and appends it at the current position. The function is then mapped to a
command with the same name so I can call it as &lt;code class=&quot;highlighter-rouge&quot;&gt;:Today&lt;/code&gt; and also map that
command to a leader key combo.&lt;/p&gt;

&lt;h2 id=&quot;what-have-you-been-working-on-recently-in-vim&quot;&gt;What have you been working on recently in Vim?&lt;/h2&gt;

&lt;p&gt;I’m currently working on a bunch of infrastructure projects at work that
mostly involve writing chef recipes or PHP. I also constantly use vim to
update documentation and write emails.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://unwiredcouch.com/&quot;&gt;Personal site&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sun, 05 Jun 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/daniel-schauenberg/</link>
        <guid isPermaLink="true">http://howivim.com/2016/daniel-schauenberg/</guid>
        
        
      </item>
    
      <item>
        <title>Gabriel Berke Williams</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;My name is Gabriel Berke-Williams and I am a developer at &lt;a href=&quot;https://thoughtbot.com/&quot;&gt;thoughtbot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I started using Vim years and years ago, but didn’t read the &lt;code class=&quot;highlighter-rouge&quot;&gt;:help&lt;/code&gt; enough and
started using Textmate instead because I thought it had more features. Once I
got to thoughtbot, I was surrounded by really great Vimmers and I switched back
to Vim. I use Vim write all of my code (Ruby, and increasingly Haskell) and all
of my blog posts. Sometimes I even use it to write long pull request comments. I
love Vim because I can move almost faster than I can think. Typing anywhere
except Vim feels slow without the modal bindings.&lt;/p&gt;

&lt;p&gt;I use the latest Vim version available in Homebrew (currently 7.4.x), and I
check for updates every few days. I use terminal vim because all of my workflow
is terminal based, and a graphical editor like gvim would break that flow.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;I’ve spent a lot of time – probably too much time! – on my Vim config, and I’m
adding bits and pieces constantly. It’s all public in &lt;a href=&quot;https://github.com/gabebw/dotfiles/tree/master/vim&quot;&gt;my dotfiles
repo&lt;/a&gt;. I’ve tried to make it
visitor-friendly, with lots of comments and documentation. (Check it out and
open an issue!)&lt;/p&gt;

&lt;p&gt;My Vim configuration is very split up. It’s a little complex, so if you’re
confused, or would like some help improving your own Vim configuration, let me
know &lt;a href=&quot;https://twitter.com/gabebw&quot;&gt;on Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I use &lt;a href=&quot;https://github.com/thoughtbot/rcm&quot;&gt;rcm&lt;/a&gt;, which is a tool that symlinks
files from a separate dotfiles directory (say, &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.dotfiles&lt;/code&gt;) directly into your
home directory. Any non-dot file or directory under the dotfiles
directory will be installed as a dotfile. For example, &lt;code class=&quot;highlighter-rouge&quot;&gt;.dotfiles/zshrc&lt;/code&gt; will be
installed into &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.zshrc&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;rcm lets me split up my dotfiles into different tags, so I can have separate
directories for tmux settings, git settings, etc. Each tool has its own extra
Vim settings – if someone wants to use my dotfiles but doesn’t use tmux, then
they can easily exclude tmux-specific Vim configuration with rcm since it’s in
its own directory. I like being able to point people to specific settings, e.g.
for &lt;a href=&quot;https://github.com/gabebw/dotfiles/tree/master/tag-tmux&quot;&gt;tmux&lt;/a&gt; or
&lt;a href=&quot;https://github.com/gabebw/dotfiles/tree/master/tag-haskell&quot;&gt;Haskell&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here’s a simplified diagram of my &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.dotfiles&lt;/code&gt; directory, which rcm links into
&lt;code class=&quot;highlighter-rouge&quot;&gt;~/.vim&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.zshrc&lt;/code&gt;, etc:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;vim
├── ftdetect
│   └── markdown.vim
├── ftplugin
│   └── gitcommit.vim
├── options.vim
├── plugins.vim
├── rcplugins
│   └── ctrlp.vim
tag-tmux
└── vim
    ├── ftdetect
    │   └── tmux.vim
    ├── plugins
    │   └── tmux.vim
    ├── rcplugins
    │   └── vim-tmux-runner.vim
    └── tmux.vim
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;rcplugins&lt;/code&gt; folder holds plugin-specific configuration, like
ctrlp.vim-specific settings.&lt;/p&gt;

&lt;p&gt;All of my Vim settings go in the &lt;code class=&quot;highlighter-rouge&quot;&gt;vim/&lt;/code&gt; directory.  I have my “main” plugins in
&lt;code class=&quot;highlighter-rouge&quot;&gt;vim/plugins.vim&lt;/code&gt;, and tool-specific plugins in &lt;code class=&quot;highlighter-rouge&quot;&gt;tag-PLUGIN_NAME/vim/plugins/PLUGIN_NAME.vim&lt;/code&gt;.
That way people who don’t use a given tool (like tmux) don’t pull in
tmux-specific Vim plugins. It also makes it easier for me to give advice to
people who are setting up tmux (or whatever) for the first time, because all the
plugins are in the same place.&lt;/p&gt;

&lt;p&gt;You can see that the &lt;code class=&quot;highlighter-rouge&quot;&gt;tag-tmux/vim&lt;/code&gt; structure mimics the &lt;code class=&quot;highlighter-rouge&quot;&gt;vim/&lt;/code&gt; structure –
that’s because rcm will copy them both into the &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.vim&lt;/code&gt; directory together,
so the separation is invisible to Vim. That’s a little hard to visualize, so
here’s the (simplified) output of &lt;code class=&quot;highlighter-rouge&quot;&gt;tree ~/.vim&lt;/code&gt;, assuming the same structure as above:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~/.vim
├── autocommand.vim -&amp;gt; /Users/gabe/.dotfiles/vim/autocommand.vim
├── autoload
│   └── plug.vim -&amp;gt; /Users/gabe/.dotfiles/vim/autoload/plug.vim
├── ftdetect
│   ├── markdown.vim -&amp;gt; /Users/gabe/.dotfiles/vim/ftdetect/markdown.vim
│   └── tmux.vim -&amp;gt; /Users/gabe/.dotfiles/tag-tmux/vim/ftdetect/tmux.vim
├── ftplugin
│   └── gitcommit.vim -&amp;gt; /Users/gabe/.dotfiles/vim/ftplugin/gitcommit.vim
├── options.vim -&amp;gt; /Users/gabe/.dotfiles/vim/options.vim
├── plugins
│   └── tmux.vim -&amp;gt; /Users/gabe/.dotfiles/tag-tmux/vim/plugins/tmux.vim
├── plugins.vim -&amp;gt; /Users/gabe/.dotfiles/vim/plugins.vim
├── rcplugins
│   ├── ctrlp.vim -&amp;gt; /Users/gabe/.dotfiles/vim/rcplugins/ctrlp.vim
│   └── vim-tmux-runner.vim -&amp;gt; /Users/gabe/.dotfiles/tag-tmux/vim/rcplugins/vim-tmux-runner.vim
└── tmux.vim -&amp;gt; /Users/gabe/.dotfiles/tag-tmux/vim/tmux.vim
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This structure lets me split up my configuration but still have it all in one
place at the end for Vim to read.&lt;/p&gt;

&lt;p&gt;Here are my base options:&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; showcmd
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; smarttab
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; cursorline
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; ignorecase
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; incsearch
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; smartcase
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; relativenumber
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;number&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; autowrite
&lt;span class=&quot;c&quot;&gt;&quot; Set leader to &amp;lt;Space&amp;gt;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; leader&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; &quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;My leader is Space because it’s a big key that’s easy to hit, and I can type it
with either hand.&lt;/p&gt;

&lt;p&gt;And here are some options I like that are less common:&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; When the type of shell script is /bin/sh, assume a POSIX-compatible shell for&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;&quot; syntax highlighting purposes.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;&quot; More on why: https://github.com/thoughtbot/dotfiles/pull/471&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;g:is_posix&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;&quot; Open below and to the right, the same way you read a page&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; splitbelow splitright
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;My most-surprising option is definitely &lt;code class=&quot;highlighter-rouge&quot;&gt;set scrolloff=999&lt;/code&gt;. It keeps the
cursor in the middle of the page while the text moves around it. I like it
because it makes it easier to track where the cursor is. (Though it’s made some
people a little dizzy when pairing!)&lt;/p&gt;

&lt;p&gt;I use a &lt;em&gt;lot&lt;/em&gt; of plugins, which I manage with junegunn’s excellent
&lt;a href=&quot;https://github.com/junegunn/vim-plug&quot;&gt;vim-plug&lt;/a&gt;. I used to use Vundle, but
vim-plug is much more actively maintained and has support for parallel
installation. My favorite plugins are all from &lt;a href=&quot;https://github.com/tpope&quot;&gt;Tim
Pope&lt;/a&gt; and my coworker &lt;a href=&quot;https://github.com/christoomey&quot;&gt;Chris
Toomey&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/christoomey/vim-tmux-runner&quot;&gt;christoomey/vim-tmux-runner&lt;/a&gt; sends commands from Vim to tmux&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/christoomey/vim-system-copy&quot;&gt;christoomey/vim-system-copy&lt;/a&gt; lets me use the system clipboard just as easily as I do the Vim clipboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have a bunch of Ruby/Rails plugins, including vim-ruby, vim-rails, vim-rake
(which is vim-rails, but for Ruby projects) and
&lt;a href=&quot;https://github.com/gabebw/vim-spec-runner&quot;&gt;vim-spec-runner&lt;/a&gt;, which I wrote
with Chris Toomey, which I use for running RSpec tests. It works really nicely
with vim-tmux-runner.&lt;/p&gt;

&lt;p&gt;I use &lt;code class=&quot;highlighter-rouge&quot;&gt;ctrlp.vim&lt;/code&gt; for fuzzy finding. I’ve configured it to use &lt;code class=&quot;highlighter-rouge&quot;&gt;ag&lt;/code&gt; under the
hood, which is so fast that I don’t even need to cache:&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;g:ctrlp_user_command&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ag %s -l --hidden --nocolor -g &quot;&quot;'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;g:ctrlp_use_caching&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;One holdover from my Textmate days is that I use &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;Leader&amp;gt;t&lt;/code&gt; to trigger
&lt;code class=&quot;highlighter-rouge&quot;&gt;ctrlp.vim&lt;/code&gt;, to mimic &lt;code class=&quot;highlighter-rouge&quot;&gt;Cmd-t&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;g:ctrlp_map&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'&amp;lt;Leader&amp;gt;t'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here are some non-language-specific plugins I can’t live without:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/itchyny/lightline.vim&quot;&gt;lightline.vim&lt;/a&gt;, a fancy statusline&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/derekprior/vim-trimmer&quot;&gt;vim-trimmer&lt;/a&gt;, to remove trailing whitespace on write&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rking/ag.vim&quot;&gt;ag.vim&lt;/a&gt;, for searching&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/duggiefresh/vim-easydir&quot;&gt;vim-easydir&lt;/a&gt;, which auto-creates parent directories when I write a file that’s
in a nonexistent directory&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/nanotech/jellybeans.vim&quot;&gt;jellybeans.vim&lt;/a&gt;, my One True Colorscheme (I pair it with the &lt;a href=&quot;https://github.com/chriskempson/tomorrow-theme/tree/master/OS%20X%20Terminal&quot;&gt;Tomorrow Night Eighties terminal theme&lt;/a&gt;).&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/junegunn/vim-emoji&quot;&gt;vim-emoji&lt;/a&gt;, so I can put emoji in my statusline, because I like seeing emoji
all the time. (OK, maybe I could live without this one.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;My coworkers &lt;a href=&quot;https://github.com/christoomey/dotfiles&quot;&gt;Chris Toomey&lt;/a&gt; and &lt;a href=&quot;https://github.com/gfontenot/dotfiles&quot;&gt;Gordon Fontenot&lt;/a&gt; are Vim tinkerers like me, so we
watch each other’s dotfiles on GitHub, comment on neat stuff, and copy what
looks cool. All three of us have a lot of code with comments like “Thanks
Gordon!” or “Stolen wholesale from christoomey”. Pairing with other people has
been the best way for me to learn Vim. At some point during the pairing they’ll
do something cool and I’ll ask about it, which always leads to me learning
something new. Steve Losh’s &lt;a href=&quot;http://stevelosh.com/projects/learnvimscriptthehardway/&quot;&gt;Learn Vimscript the Hard
Way&lt;/a&gt; was invaluable
when I decided to write my first Vim plugin.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I learned that there’s an autocommand for when Vim is resized. It’s really
helpful because it gets triggered whenever I open a tmux split next to Vim. I
use it to resize all of the Vim splits when Vim is resized:&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;autocmd &lt;span class=&quot;nb&quot;&gt;VimResized&lt;/span&gt; * &lt;span class=&quot;k&quot;&gt;wincmd&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Chris Toomey also reminded me how great custom text objects and “verbs” are, and
introduced me to &lt;a href=&quot;https://github.com/gabebw/dotfiles/commit/220de8248e678f4590ae93d0d3f668a997833b3b&quot;&gt;some new
ones&lt;/a&gt;.
The most useful one recently is
&lt;a href=&quot;https://github.com/kana/vim-textobj-entire&quot;&gt;vim-textobj-entire&lt;/a&gt;, which when
combined with Chris’s
&lt;a href=&quot;https://github.com/christoomey/vim-system-copy&quot;&gt;vim-system-copy&lt;/a&gt; plugin lets me
do &lt;code class=&quot;highlighter-rouge&quot;&gt;cpae&lt;/code&gt; to copy an entire file to the system clipboard for pasting in other
places.&lt;/p&gt;

&lt;h2 id=&quot;how-did-you-get-started-writing-vim-plugins&quot;&gt;How did you get started writing Vim plugins?&lt;/h2&gt;

&lt;p&gt;I’d been using Vim for a while and wanted to get to know my editor more. I read
Learn Vimscript the Hard Way, played around with it, then paired with Chris
Toomey to write vim-spec-runner. We wrote vim-spec-runner for a couple of
reasons:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Existing spec runners didn’t integrate well with arbitrary command runners
(e.g. you couldn’t configure them to send commands to tmux)&lt;/li&gt;
  &lt;li&gt;I wanted to learn how to write a “real” Vim plugin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that I felt confident enough to write
&lt;a href=&quot;https://github.com/gabebw/vim-rdio&quot;&gt;vim-rdio&lt;/a&gt;, which is a totally absurd plugin
that uses Vim to run AppleScript to send commands to an Rdio tab in
Chrome or Firefox. It was a neat technical challenge (I &lt;a href=&quot;https://robots.thoughtbot.com/control-rdio-from-vim&quot;&gt;wrote about
it&lt;/a&gt;) and worked well, until
Rdio tragically shut down.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://gabebw.com/&quot;&gt;Gabriel’s website&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/gabebw/dotfiles&quot;&gt;Gabriel’s dotfiles&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/gabebw&quot;&gt;Gabriel on Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Wed, 04 May 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/gabriel-berke-williams/</link>
        <guid isPermaLink="true">http://howivim.com/2016/gabriel-berke-williams/</guid>
        
        
      </item>
    
      <item>
        <title>Josh Branchaud</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;I am a software developer at Hashrocket, a web development consultancy. We
primarily do Ruby on Rails development, but this generally involves heavy
use of JavaScript and PostgreSQL. Everyone I work with at Hashrocket uses
Vim. There are &lt;a href=&quot;https://github.com/hashrocket/dotmatrix&quot;&gt;a common set of plugins and configurations&lt;/a&gt; that we have installed across all
machines. We pair 100% of the time, so having a consistent Vim setup makes
it easy to transition between computers and projects.&lt;/p&gt;

&lt;p&gt;I use Vim extensively outside of professional work. Not only do I use it
when working on side software projects, but also for just about any kind of
writing. I write daily posts in &lt;a href=&quot;https://github.com/jbranchaud/til&quot;&gt;my TIL repository&lt;/a&gt; about using Vim. I even put together a
project-specific vimrc file to give myself a custom utility function just
for that project. I also blog with markdown files in Vim. I recently
discovered that the vim-markdown plugin supports syntax highlighting of
fenced code blocks, so that is a game changer.&lt;/p&gt;

&lt;p&gt;I’ve been using Vim since college, so for about 6 or 7 years. It has only
been in about the last 2 years though that I’ve really felt like I’ve had
any mastery of Vim. I used to do a lot of Java development in college and it
didn’t make a lot of sense to do that outside of any IDE (like Eclipse), so
I used Vim less frequently then than I do now.&lt;/p&gt;

&lt;p&gt;I like to use Vim in the terminal with the Macvim binary. I almost
exclusively use a Mac and while the system Vim is fine, the Macvim binary
provides tighter integration with OS X. This means
that I can copy stuff from another program into Vim with &lt;code class=&quot;highlighter-rouge&quot;&gt;p&lt;/code&gt; and likewise I
can yank text from Vim for use in another program. I sometimes use Atom and
Sublime (with Vim-mode enabled), but I usually end up getting frustrated
when I start hitting the bindings for my favorite plugins and they aren’t
there.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;A long time ago I wanted to step up my Vim game, but I didn’t really
understand how to tailor/configure Vim to my needs. I ended up copying a
fellow developer’s vimrc file, which was heavily customized. As I’ve came to
understand those settings and develop my own opinions, I’ve began to tweak
things here and there. In the last couple years, I’ve started to cull back
some of the customizations. Many of them were there but I wasn’t even using
them.&lt;/p&gt;

&lt;p&gt;I’ve heard people say, “Don’t put anything in your Vim configuration that
you don’t understand.” I mostly agree with that. However, the defaults for
Vim are not great for extended use. People just getting started with Vim
are going to experience a lot of friction with the defaults. Learning to use
Vim and configure it at the same time is a daunting task. For this reason, I
really like &lt;a href=&quot;https://github.com/tpope/vim-sensible&quot;&gt;sensible.vim&lt;/a&gt;. It makes
Vim behave in a sane way without over-customizing it.&lt;/p&gt;

&lt;p&gt;What I’m getting at is that I’m not too picky about any particular vimrc
settings as long as the stuff you find in sensible.vim is turned on and I
have my plugins (see below).&lt;/p&gt;

&lt;p&gt;One line in my vimrc that I really like having around for everyday
development, but don’t see very often is:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;runtime! ftplugin/man.vim
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This enables a built-in plugin that opens man pages in a Vim split window by
using the &lt;code class=&quot;highlighter-rouge&quot;&gt;:Man&lt;/code&gt; command (e.g. &lt;code class=&quot;highlighter-rouge&quot;&gt;:Man vim&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Some of my favorite plugins are the ones that can be used in just about any
context. The three that come to mind are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/tpope/vim-surround&quot;&gt;surround.vim&lt;/a&gt; - I take advantage of
this plugin in just about any language and even in just markdown files (I
use parenthesis a lot) because it is so flexible and powerful.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/tpope/vim-eunuch&quot;&gt;eunuch.vim&lt;/a&gt; - I like not having to
leave Vim to do quick one-off tasks like remove and renaming files. Sure I
can shell out, but this plugin makes those things even easier.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/jlanzarotta/bufexplorer&quot;&gt;bufexplorer&lt;/a&gt; - This plugin
makes it easy to quick jump between a handful of buffers when I get into a
development cycle. I use this plugin almost exclusively for the
&lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;leader&amp;gt;bs&lt;/code&gt; feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, I use &lt;a href=&quot;https://github.com/tpope/vim-rails&quot;&gt;rails.vim&lt;/a&gt; and
&lt;a href=&quot;https://github.com/tpope/vim-fugitive&quot;&gt;fugitive.vim&lt;/a&gt; a ton at work. These
two plugins alone allow us to achieve a really tight, efficient development
cycle when working on Rails applications.&lt;/p&gt;

&lt;p&gt;I use many more plugins, but these are the ones I’d have a hard time living
without.&lt;/p&gt;

&lt;p&gt;I don’t get to caught up in a particular color scheme as long as the
different syntax elements are clear. I do, however, prefer a black
background. My current color scheme seems to be railscasts.&lt;/p&gt;

&lt;p&gt;My leader key is backslash (&lt;code class=&quot;highlighter-rouge&quot;&gt;\&lt;/code&gt;). I don’t tend to use many leader mappings,
but there are a couple that I’ve been experimenting with recently.&lt;/p&gt;

&lt;p&gt;I have mapped &lt;code class=&quot;highlighter-rouge&quot;&gt;\d&lt;/code&gt; to quickly open the parent directory of the current file
with netrw.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;nmap &amp;lt;leader&amp;gt;d :e %:h&amp;lt;cr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I also have &lt;code class=&quot;highlighter-rouge&quot;&gt;\D&lt;/code&gt; to quickly create any directories for the current file
path.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;nmap &amp;lt;leader&amp;gt;D :!mkdir -p %:h&amp;lt;cr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Although, I’ve been using this less and less since discovering eunuch.vim’s
&lt;code class=&quot;highlighter-rouge&quot;&gt;:Mkdir!&lt;/code&gt; command.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;I mentioned earlier that despite having been using Vim for the past 6 or 7
years, it was only in the last couple years that I’ve really started to feel
like I’ve mastered it. The reason for this is because I am just now
discovering the best resources for learning Vim.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;First and foremost, I learn an incredible amount my pair programming
everyday in Vim. All my coworkers at Hashrocket combine to be a wealth of
Vim knowledge. Every time I switch pairs I learn a handful of new things
and more efficient workflows.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I’ve started to effectively use the Vim help files. There is so much
information in those files. Sometimes I will be looking up one command
and 15 minutes later I will be halfway down the help file reading about
all these Vim features I had no idea about.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Drew Neil’s &lt;em&gt;Practical Vim&lt;/em&gt; is another really valuable resource. I only
recently read it. I wish I would have discovered it years ago.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I recently wrote a blog posted titled “&lt;a href=&quot;https://hashrocket.com/blog/posts/how-to-get-help-with-vim&quot;&gt;How to get help with Vim&lt;/a&gt;” which is a big
part of this.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I recently learned about the &lt;code class=&quot;highlighter-rouge&quot;&gt;gn&lt;/code&gt; motion for interacting with matches to a
search pattern. I’ve yet to use it much, but I can see how it is a great
complement to doing standard substitutions.&lt;/p&gt;

&lt;p&gt;What I love about Vim is the composability aspect. In learning one simple
motion, I’ve actually learned a bunch of different ways to interact with and
manipulate a piece of the buffer.&lt;/p&gt;

&lt;h2 id=&quot;are-you-involved-in-a-local-vim-community&quot;&gt;Are you involved in a local Vim community?&lt;/h2&gt;

&lt;p&gt;I help organize &lt;a href=&quot;http://vimchi.com/&quot;&gt;VimChi&lt;/a&gt;, Chicago’s Vim Meetup. We meet
once a month and we either invite a single speaker to talk about something
they are interested in or we do lightning talks. Any Vim users in the
Chicago area should definitely check it out.&lt;/p&gt;

&lt;p&gt;I’ve given talks about how I use buffers in Vim and how sensible.vim works.&lt;/p&gt;

&lt;h2 id=&quot;share-a-snippet-of-vim-script-youve-written-and-talk-about-what-it-does&quot;&gt;Share a snippet of Vim script you’ve written and talk about what it does.&lt;/h2&gt;

&lt;p&gt;It’s not much, but I added this small snippet of vimscript to my TIL
repository to make it easier to get a count of the TILs:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;function! CountTILs()
    execute '%s/^- \[//n'
endfunction

nnoremap &amp;lt;leader&amp;gt;c :call CountTILs()&amp;lt;cr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;It is a fairly standard substitution command, except for the &lt;code class=&quot;highlighter-rouge&quot;&gt;n&lt;/code&gt; on the end.
With the &lt;code class=&quot;highlighter-rouge&quot;&gt;n&lt;/code&gt; there, instead of doing a substitution, this returns a count of
the number of matches for the given pattern. I feel like this is a little
known feature of the substitution command. It’s pretty handy though.&lt;/p&gt;

&lt;h2 id=&quot;what-have-you-been-working-on-recently-in-vim&quot;&gt;What have you been working on recently in Vim?&lt;/h2&gt;

&lt;p&gt;I am constantly exploring new languages. It is always interesting to see
what sorts of tooling different communities have wrapped into Vim plugins.&lt;/p&gt;

&lt;p&gt;For instance, I do Clojure development in Vim from time to time. While many
people might recommend using Emacs for a lisp-style language, there is
actually some pretty good tooling for Vim. There is a plugin (fireplace.vim)
that connects to a Clojure REPL so that you can execute snippets of code
from within Vim. Another plugin (vim-sexp-mappings-for-regular-people)
provides some handy mappings for manipulating Clojure code.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;github.com/jbranchaud/til&quot;&gt;Josh on GitHub&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;twitter.com/jbrancha&quot;&gt;Josh on Twitter&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://hashrocket.com/blog&quot;&gt;The Hashrocket blog&lt;/a&gt;, which from time to time features writing by Josh or coworkers about Vim&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Mon, 02 May 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/josh-branchaud/</link>
        <guid isPermaLink="true">http://howivim.com/2016/josh-branchaud/</guid>
        
        
      </item>
    
      <item>
        <title>Artur Shaikhullin</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;I am a software developer, working in a private company engaged in reception of payments and payment services. On this job, I have a wide range of technical duties. Begin with configuration of the servers, ending with the modification of the payment system code.&lt;/p&gt;

&lt;p&gt;Perhaps not surprisingly, I use vim in the work, because it is always in my hand. And what is most remarkable is the fact that the entire stack development and support I produce in vim.&lt;/p&gt;

&lt;p&gt;At work I write in such languages as java, c++, python, javascript, bash.&lt;/p&gt;

&lt;p&gt;I am a big fan of free and open source software.&lt;/p&gt;

&lt;p&gt;I have been using Linux as the primary operating system about 8 years, and with vim I met almost immediately, although the first meeting was in the spirit of “wtf… how to get out of here?!”. But frequent configuration server via the command line become to the fact that I learned basic commands. So I use vim for about 6 years. But work with it closely I began 2 years ago.&lt;/p&gt;

&lt;p&gt;I use vim for all my daily tasks. I have not had to choose from other similar editors, historically, as I said, I started using vim forced. In addition to vim I use a lot of console applications with vi-like navigation method. Therefore, I have no need for a GUI text editor. In the war of Vim vs. Emacs, the winner became vim :).&lt;/p&gt;

&lt;p&gt;Working closely with this editor made me vim addicted. Now keys of most applications that I use, have similar combinations as vim. I use a tiled window manager - &lt;a href=&quot;https://github.com/baskerville/bspwm&quot;&gt;bspwm&lt;/a&gt;, &lt;a href=&quot;http://www.mutt.org/&quot;&gt;mutt&lt;/a&gt; as the mailer, &lt;a href=&quot;https://weechat.org/&quot;&gt;weechat&lt;/a&gt; with &lt;code class=&quot;highlighter-rouge&quot;&gt;vi-mode&lt;/code&gt; plugin as a messenger, &lt;a href=&quot;http://www.elinks.cz/&quot;&gt;elinks&lt;/a&gt; for fast surfing and &lt;a href=&quot;https://github.com/The-Compiler/qutebrowser&quot;&gt;qutebrowser&lt;/a&gt; for javascript heavy sites and etc. In the terminal, I always run &lt;a href=&quot;https://tmux.github.io/&quot;&gt;tmux&lt;/a&gt;, and &lt;a href=&quot;http://www.zsh.org/&quot;&gt;zsh&lt;/a&gt; operates in vi mode. Many applications do not have ability to setup vi like hotkeys, so I did a system wide vi mode, in this mode hjkl converted to the arrow keys. In my &lt;a href=&quot;https://github.com/artur-shaik/vimmer-dotfiles&quot;&gt;dotfiles&lt;/a&gt; I accumulate configurations for applications used by me.
I use console vim 7.4.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;I try not to change my configuration frequently. Reading the blogs or watching screencasts and bumping into interesting solution, I try them, sometimes keeping. One of the latest:
&lt;code class=&quot;highlighter-rouge&quot;&gt;
nnoremap g= gg=Gg``
&lt;/code&gt;
corrects the indentation of all file from any position.&lt;/p&gt;

&lt;p&gt;I often use third-party extensions, I have about 60 plugins. Sometimes I check the list and remove plugins that I do not use. I think now is the time to do it :).&lt;/p&gt;

&lt;p&gt;One of the most popular and actively used is &lt;a href=&quot;https://github.com/easymotion/vim-easymotion&quot;&gt;vim-easymotions&lt;/a&gt;. My &lt;code class=&quot;highlighter-rouge&quot;&gt;space&lt;/code&gt; key triggers the plugin and I can jump fastly wherever I need, workflow is super cool, sometimes I want to use it in other applications which has vi mode.&lt;/p&gt;

&lt;p&gt;To navigate through the file system I use &lt;a href=&quot;https://github.com/vifm/vifm&quot;&gt;vifm&lt;/a&gt;, and plugin &lt;a href=&quot;https://github.com/vifm/vifm.vim&quot;&gt;vifm.vim&lt;/a&gt;. I like to use this file manager, because it looks like a continuation of my editor, there I can use commands such delete, yank, and navigation as well as in vim and, while having a great set of features. The work is a more holistic.&lt;/p&gt;

&lt;p&gt;I also like to use &lt;a href=&quot;https://github.com/mhinz/vim-startify&quot;&gt;startify&lt;/a&gt;. It gives joy to my editor and makes it easier to continue editing the files.&lt;/p&gt;

&lt;p&gt;Certainly, &lt;a href=&quot;https://github.com/Shougo/unite.vim&quot;&gt;unite&lt;/a&gt;. This is probably the most commonly used plugin. Search files, navigate buffers, menu design, etc. For example, for my main project, I created a menu with commands to run maven, I can now quickly choose from menu to compile the application, start the server, do deploy applications, run test, etc.&lt;/p&gt;

&lt;p&gt;For completion I use &lt;a href=&quot;https://github.com/Valloric/YouCompleteMe&quot;&gt;YCM&lt;/a&gt;, in general, I happy with it, it works well with C++ projects, and in my case with Qt.&lt;/p&gt;

&lt;p&gt;As a manager of plugins I use &lt;a href=&quot;https://github.com/Shougo/neobundle.vim&quot;&gt;NeoBundle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Of course, I changed my leader to &lt;code class=&quot;highlighter-rouge&quot;&gt;,&lt;/code&gt; but to be honest I do not really like to use it. Also I reversed &lt;code class=&quot;highlighter-rouge&quot;&gt;;&lt;/code&gt; and ‘:’, I often use the command line, and this change is unloaded my little finger.&lt;/p&gt;

&lt;p&gt;My color palette is adjusted by my terminal (&lt;a href=&quot;http://software.schmorp.de/pkg/rxvt-unicode.html&quot;&gt;urxvt&lt;/a&gt;), in which I use two colorschemes based on my desktop wallpaper colors - dark and light one. Vim colorscheme in this case, only configuring colors for different elements of the text using system’s 16 colors.&lt;/p&gt;

&lt;p&gt;I do not use plug-ins for the statusline. It’s pretty simple, I found it configuration in some blog. In the beginning, I added vim logo, using powerline patched font, below the cursor position in the line, file name, file status, dev branch, file format, and the current position in the file.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;My first serious resource was &lt;a href=&quot;http://www.swaroopch.com/notes/vim/&quot;&gt;A Byte Of Vim&lt;/a&gt;. Most of the information I got from there. Then, various blog posts, screencasts, now from time to time I’m reading &lt;a href=&quot;https://pragprog.com/book/dnvim2/practical-vim-second-edition&quot;&gt;Practical Vim&lt;/a&gt;. To deal with VimScript I read &lt;a href=&quot;http://learnvimscriptthehardway.stevelosh.com&quot;&gt;Learn Vimscript the Hard Way&lt;/a&gt;. And of course &lt;code class=&quot;highlighter-rouge&quot;&gt;:help&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I just figured out that &lt;code class=&quot;highlighter-rouge&quot;&gt;zz&lt;/code&gt; move screen line to the middle. And why I did not know this before.&lt;/p&gt;

&lt;h2 id=&quot;how-did-you-get-started-writing-vim-plugins&quot;&gt;How did you get started writing Vim plugins?&lt;/h2&gt;

&lt;p&gt;The first plugin I started writing out of despair. When I did not want to run java IDE, to make small changes in the project, but would like to have at least the minimum operating completion. I had to fix errors in the original plugin &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1785&quot;&gt;vim-javacomplete&lt;/a&gt;, that was stopping to work time to time. When such corrections have accumulated quite a lot, I have decided to release an updated plug-in.&lt;/p&gt;

&lt;p&gt;Java often requires to be verbose, so the code generation in the IDE keeps many from switching to vim.&lt;/p&gt;

&lt;p&gt;As soon as I switched completely to develop java applications in vim, of course, I wanted to have more features. Such as code generation and simple refactoring. I will continue to work on functionality, as I will have free time. Also in the plans to revise the documentation, there is now a mess, in which hard to navigate. Work on the plug-in stability also priorities.&lt;/p&gt;

&lt;p&gt;The main inspiration of vimscript code is probably given by the author of the original plugin &lt;code class=&quot;highlighter-rouge&quot;&gt;vim-javacomplete&lt;/code&gt;. As well as &lt;a href=&quot;https://github.com/mattn&quot;&gt;mattn&lt;/a&gt;, and other experienced VimScript developers who have done a lot of useful PR, after the publication of the plugin.&lt;/p&gt;

&lt;h2 id=&quot;are-you-involved-in-a-local-vim-community&quot;&gt;Are you involved in a local Vim community?&lt;/h2&gt;

&lt;p&gt;Honestly, I am not sure that such communities exist here.&lt;/p&gt;

&lt;h2 id=&quot;share-a-snippet-of-vim-script-youve-written-and-talk-about-what-it-does&quot;&gt;Share a snippet of Vim script you’ve written and talk about what it does.&lt;/h2&gt;

&lt;p&gt;I often use renaming the word under the cursor around the file:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;nnoremap &amp;lt;Leader&amp;gt;s :%s/\&amp;lt;&amp;lt;C-r&amp;gt;&amp;lt;C-w&amp;gt;\&amp;gt;/&amp;lt;C-r&amp;gt;&amp;lt;C-w&amp;gt;/g&amp;lt;Left&amp;gt;&amp;lt;Left&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;My &lt;code class=&quot;highlighter-rouge&quot;&gt;unite&lt;/code&gt; menu for maven execution:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    let g:unite_source_menu_menus.mvnee = {
        \ 'description' : 'Maven project with glassfish',
        \}
    let g:unite_source_menu_menus.mvnee.command_candidates = [
        \[' mvn clean', 'make clean'],
        \[' mvn compile', 'make compile'],
        \[' mvn package', 'make package'],
        \[' mvn clean package', 'make clean package'],
        \[' mvn deploy', 'make -pl project-ear asadmin:deploy'],
        \[' mvn undeploy', 'make -pl project-ear asadmin:undeploy'],
        \[' mvn restart-domain', 'make -pl project-ear asadmin:restart-domain'],
        \[' mvn stop-domain', 'make -pl project-ear asadmin:stop-domain'],
        \[' mvn test', 'make test'],
        \]
    nnoremap &amp;lt;silent&amp;gt; &amp;lt;space&amp;gt;m :Unite -direction=botright -silent -buffer-name=mvnee menu:mvnee&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h2 id=&quot;what-have-you-been-working-on-recently-in-vim&quot;&gt;What have you been working on recently in Vim?&lt;/h2&gt;

&lt;p&gt;I try to do everything in vim. Development, writing an email, writing this text. As almost all the system functions I perform with the same keys combinations as in vim, it fairly easy to switch between tasks. And all the work is a single hands’ flight over the keys of the keyboard. It is the most important advantage of my switch to vim for the development. And it is fast enough to run.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/artur-shaik&quot;&gt;Artur on GitHub&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/eastwindmusic&quot;&gt;Artur on Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Thu, 14 Apr 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/artur-shaikhullin/</link>
        <guid isPermaLink="true">http://howivim.com/2016/artur-shaikhullin/</guid>
        
        
      </item>
    
      <item>
        <title>Andre Torrez</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;I’m a software developer who lives and works in San Francisco. I work at Slack and before that I had a bunch of projects that I don’t work on any more.&lt;/p&gt;

&lt;p&gt;I use Vim solely for writing code. I’ve tried using it for writing blog posts or note taking but I think it’s uncomfortable for that and so I stopped. I will say I’m a Vim novice and I probably learn something new every week, so maybe I’ll rethink the code-only rule when I get better.&lt;/p&gt;

&lt;p&gt;I first used Vim like most people: in a panic because ctrl-c did nothing and my only resort was backgrounding the job and killing it. This was in the mid-90s while tinkering with Linux. Over the years my usage of Linux grew but Vim was always something I had to use because it was the only text editor that was always available. I could &lt;code class=&quot;highlighter-rouge&quot;&gt;:wq&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;u&lt;/code&gt; plus a few other things and that was good enough for conf files.&lt;/p&gt;

&lt;p&gt;A few of years ago, while getting by with my &lt;code class=&quot;highlighter-rouge&quot;&gt;ci&quot;&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;dd&lt;/code&gt;, I found myself administering a bunch of Linux machines and I decided to finally figure out what the heck I was doing with Vim. I knew what &lt;code class=&quot;highlighter-rouge&quot;&gt;ci&quot;&lt;/code&gt; did, but I couldn’t tell you &lt;em&gt;why&lt;/em&gt;. So I went all in: full-screen on my Mac, deleted SublimeText, installed Janus, NERDtree, a bunch of themes, a bunch of snippets from other people’s .vimrc files, and anything else I could get my hands on.&lt;/p&gt;

&lt;p&gt;It was a disaster! I wasn’t learning Vim at all. I was learning how to use all the add-ons and configurations from people who had been using Vim for a while thought they might like. I had no idea what I actually needed.&lt;/p&gt;

&lt;p&gt;So I started over with an empty .vimrc and have slowly (very slowly) added lines as needed. And the funny thing is the longer I use Vim the more I realize I don’t need very many lines at all.&lt;/p&gt;

&lt;p&gt;My work computer is a Chromebook Pixel. I run a chroot with a headless Ubuntu (Trusty) inside of it and therefore whatever version of Vim that installs when you run apt-get is what I use. I switched to this setup after many years of trying to replicate production environments (Linux/Ubuntu) with development computers (Mac OS X). I was tired of the gymnastics required to build certain libraries when on my Linux servers they just worked.&lt;/p&gt;

&lt;p&gt;Being able to get my work done using Vim made it that much easier to switch. I didn’t really consider it until I answered this question but I never would have been able to switch to the Chromebook had I not spent a year getting competent with Vim.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;It’s 17 lines! I’m just going to comment on the sections:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;execute pathogen#infect()
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;For ctrlp, vim-gitgutter, and vim-surround, but I
often forget I even have vim-surround. I should
probably use it more.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;syntax on
filetype plugin indent on
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I write a lot of PHP and Python and the two
styles could not be more different.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set list
set lcs=tab:\|-,trail:-
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I adored the invisible character view in 
SublimeText and I tried to replicate it.
It’s not nearly as nice.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set autoindent
set tags=tags;
set hlsearch
set incsearch
set ruler
set number
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Some standard stuff here.
ctags are my life.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;nnoremap &amp;lt;C-J&amp;gt; &amp;lt;C-W&amp;gt;&amp;lt;C-J&amp;gt;
nnoremap &amp;lt;C-K&amp;gt; &amp;lt;C-W&amp;gt;&amp;lt;C-K&amp;gt;
nnoremap &amp;lt;C-L&amp;gt; &amp;lt;C-W&amp;gt;&amp;lt;C-L&amp;gt;
nnoremap &amp;lt;C-H&amp;gt; &amp;lt;C-W&amp;gt;&amp;lt;C-H&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I swiped this from someplace when I was
into splits. They’re shortcuts for switching focus.
I use tabs now, but occasionally
I will need these for a file split or :help.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set runtimepath^=~/.vim/bundle/ctrlp.vim
set shell=/bin/bash
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Bundle settings. The second line is because
I use Fish shell and vim-gitgutter won’t work
with it so I have to override my shell in Vim.&lt;/p&gt;

&lt;p&gt;I know this is a pretty sparse .vimrc. I keep it in a private repo now with my Fish shell config so I can drop it onto any system I plan on using a lot. The nice thing about my config is that if I do find myself on a vanilla install of Vim I don’t feel like I’m missing too much.&lt;/p&gt;

&lt;p&gt;I don’t think this config has changed significantly in over six months. I keep meaning to set up ctrlp to use ag (Silver Searcher) and I might do that now that I just Googled how to do it. But otherwise I’m pretty happy with this setup.&lt;/p&gt;

&lt;p&gt;You’ll probably notice I don’t even have a colorscheme! I used to use Solarized dark on my Mac but I like the default ChromeOS color scheme so much I didn’t even bother changing it when I got the Pixel.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;I read Practical Vim by Drew Neil in a day when I rebooted my .vimrc. Now I just use :help whenever I get in a jam. Or I Google something that sounds like the thing I want to do and read from there. I probably end up on vi.stackexchange.com at least once a day. I think I could just use :help but sometimes I have to describe what I want to do and let Google point the way.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;Registers! I never paid attention to them because it felt so awkward typing that many keys to save something. When I used to work on a Mac I’d rely on a clipboard manager that kept my last 100 copied strings. I didn’t realize Vim was doing this from 0-9 and I was ignorantly using named registers when I got myself in a jam.&lt;/p&gt;

&lt;p&gt;It really pays to remember to use &lt;code class=&quot;highlighter-rouge&quot;&gt;:help somefeature&lt;/code&gt; even when you think you know what somefeature does.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://torrez.org/&quot;&gt;Andre’s blog&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/torrez&quot;&gt;Andre on Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Tue, 22 Mar 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/andre-torrez/</link>
        <guid isPermaLink="true">http://howivim.com/2016/andre-torrez/</guid>
        
        
      </item>
    
      <item>
        <title>Andy Stewart</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;I am a programmer who runs a small software-as-a-service business.  I mainly write Ruby, Haml, Coffeescript and Bash.&lt;/p&gt;

&lt;p&gt;I switched to Vim from an IDE in 2001.  I knew the learning curve would be vertiginous but I’m an optimist and I thought it would pay off in the end.  For the first few days I felt hamstrung while my Eclipse-using colleagues laughed at my fumbling efforts.  Eventually I got the hang of it and was able to get half a day’s work done while they waited for Eclipse to launch.&lt;/p&gt;

&lt;p&gt;Having decided to switch, I narrowed the choices down to Vim and Emacs.  Both sounded powerful and worthwhile though Emacs also had its Lisp appeal.  But my overriding concern was to minimise typing strain and on that basis Vim’s modal editing triumphed over Emacs’ chords.  Also just-a-text-editor seemed neater to me than includes-a-text-editor.&lt;/p&gt;

&lt;p&gt;These days I use Vim for everything plain text or software-related, which is pretty much everything.  But not email; it’s always seemed too much hassle to get Vim working with Apple Mail.  Recently I’ve started hoping that someone will figure out how to embed Neovim within Mail.&lt;/p&gt;

&lt;p&gt;I’m on OS X and I use MacVim, currently 7.4.969 via Homebrew.  I don’t follow the day to day commits to Vim or MacVim and I only upgrade every few months.  Occasionally I might run into a specific bug, and I’ll modify the Homebrew recipe to re-build Vim with a patch from the mailing list, but that’s unusual.&lt;/p&gt;

&lt;p&gt;I prefer the GUI version to the terminal version because the GUI fires focus events.  I use FocusLost to &lt;a href=&quot;https://github.com/airblade/dotvim/blob/b97494da7b42234a7f2c16063a3afbb566967ccb/vimrc#L242-L254&quot;&gt;avoid typing &lt;code class=&quot;highlighter-rouge&quot;&gt;:w&lt;/code&gt;&lt;/a&gt; every time I switch away and FocusGained to &lt;a href=&quot;https://github.com/airblade/dotvim/blob/dd5d7737e39aad5e24c1a4a8c0d115ff2ae7b488/vimrc#L294-L310&quot;&gt;pulse the cursorline&lt;/a&gt; and have &lt;a href=&quot;https://github.com/airblade/vim-gitgutter/blob/e884a0e26dcce8d86c95c13fb3305fe065815eaf/plugin/gitgutter.vim#L179&quot;&gt;vim-gitgutter automatically update all the visible buffers&lt;/a&gt; when I switch back to MacVim.&lt;/p&gt;

&lt;p&gt;It’s good to see text editors in general flourishing at the moment, and the consequent cross-pollination of ideas.&lt;/p&gt;

&lt;p&gt;One day I’d like to write a kind of Coffeescript for Vimscript, perhaps a bit like &lt;a href=&quot;https://github.com/luke-gru/riml&quot;&gt;riml&lt;/a&gt;, but I’m not sure when I’ll ever have the time.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;I started from nothing and I’ve slowly built it up over time.  I try to keep it as lean as possible and I never copy-paste stuff I don’t understand.  As and when I change my config I try it for a few weeks before deciding whether to keep the change or drop it.  Usually I drop it.&lt;/p&gt;

&lt;p&gt;I’m not a fan of “distributions”, those large bundles of plugins and configuration.  They might provide a short term benefit but I believe they hinder learning how unadorned Vim works, and they can easily bloat Vim.  Vim’s got enough to wrap one’s head around without having to learn heaps of plugins at the same time.&lt;/p&gt;

&lt;p&gt;I really value how easily one can read plugin source code on places like GitHub and BitBucket.  It’s impossible on vim.org where all the code is hidden away inside zip files.&lt;/p&gt;

&lt;p&gt;Alongside &lt;a href=&quot;https://github.com/tpope/vim-pathogen&quot;&gt;Pathogen&lt;/a&gt; to manage Vim’s path, I use my own plugin “manager”, &lt;a href=&quot;https://github.com/airblade/voom&quot;&gt;voom&lt;/a&gt;, to install, update and uninstall plugins.  It’s a 100 line bash script.  I looked at the plugin managers out there and they’re all hundreds if not thousands of lines of Vimscript.  At the end of the day all I want to do is download some files to disk and maybe make some symlinks.  If you use Vimscript you’re going to end up calling out to bash to do that, with the added fragility of Vim’s &lt;code class=&quot;highlighter-rouge&quot;&gt;system()&lt;/code&gt;, so why not cut out the middleman and just do it in bash?  To my mind that’s the simplest thing that works.&lt;/p&gt;

&lt;p&gt;I believe the biggest problem afflicting Vim plugin development is the lack of a way to express dependencies.  Every other language has a dependency mechanism for its libraries.  Vim doesn’t and as a result every plugin has to reimplement (and debug) the same utility functions over and over again.&lt;/p&gt;

&lt;p&gt;For example it would be great to have a plugin which simply provides an easy-to-use DSL over Vim’s clunky signs commands, and avoids the gotchas when handling signs.  Instead every plugin which uses signs has to re-implement the same functionality.&lt;/p&gt;

&lt;p&gt;To make this happen we need a standard way to express dependencies.  JSON would make a good format: Vim reads it natively as of v&lt;a href=&quot;https://github.com/vim/vim/releases/tag/v7.4.1154&quot;&gt;7.4.1154&lt;/a&gt; (and it’s easy to parse in Vimscript for earlier versions).  Once the dependency file has been agreed, plugin authors could add it to their plugins and plugin managers could start to use it.&lt;/p&gt;

&lt;p&gt;Anyway, you can see the &lt;a href=&quot;https://github.com/airblade/dotvim/blob/master/plugins&quot;&gt;plugins I use here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Vim users navigate their buffers and files all the time.  You want this to be as efficient and intuitive as possible.  Efficiency is objective but intuitive-ness is subjective, which is why there are so many plugins in this area.  Personally I like &lt;a href=&quot;https://github.com/jlanzarotta/bufexplorer&quot;&gt;bufexplorer&lt;/a&gt; for buffers though it would be nice to drop the old winmanager integration and incorporate git-status information.  I invoke it all the time so I [map &lt;CR&gt;][map-cr] to open it - much faster than the default `&lt;Leader&gt;be`.&lt;/Leader&gt;&lt;/CR&gt;&lt;/p&gt;

&lt;p&gt;To open files I either use &lt;a href=&quot;https://github.com/jeetsukumaran/vim-filebeagle&quot;&gt;filebeagle&lt;/a&gt; if the file is near the current buffer’s file or a fuzzy finder.  I think fuzzy finders are great; I have tried several though I haven’t really settled on one.  Originally I used PeepOpen but I can’t get it installed on El Capitan.  I would use &lt;a href=&quot;https://github.com/garybernhardt/selecta&quot;&gt;selecta&lt;/a&gt; if it worked with MacVim.  Currently I used &lt;a href=&quot;https://github.com/torbiak/probe&quot;&gt;probe&lt;/a&gt; which does the job nicely.  I keep meaning to try out &lt;a href=&quot;https://github.com/Shougo/unite.vim&quot;&gt;Unite&lt;/a&gt; which seems like it could replace bufexplorer, filebeagle and probe…but with 4,000 lines of instructions I never feel I have enough time available to get to grips with it properly.&lt;/p&gt;

&lt;p&gt;I don’t use tabs; more accurately the only time I use a second tab is for reading the help docs.&lt;/p&gt;

&lt;p&gt;I’ve also tried several alignment plugins.  You need to give them three pieces of information: which lines to align, what character(s) to align on, and what alignment you want.  Each plugin has a different way to specify these three things and &lt;a href=&quot;https://github.com/tommcdo/vim-lion&quot;&gt;lion&lt;/a&gt; is the only I can use without having to check the docs each time.&lt;/p&gt;

&lt;p&gt;Colorscheme-wise I use solarized-dark.  I find dark backgrounds easier on the eyes, and while I have no idea what to make of solarized’s colour-science stuff, I do like its colours.&lt;/p&gt;

&lt;p&gt;For a long time I used &lt;a href=&quot;https://github.com/vim-airline/vim-airline&quot;&gt;airline&lt;/a&gt; for my status line.  But I like keeping things minimal and I was trying to configure it not to display various of its bits and bobs and it took me ages to figure out.  I realised it was crazy to install a huge statusline manager and then spend time figuring out its custom syntax in order to turn off most of its output.&lt;/p&gt;

&lt;p&gt;So I spent 10 minutes deciding what I did and did not want to see in my statusline, e.g. not the current line because I can look at the line number in the margin.  And then I spent 10 minutes reading &lt;code class=&quot;highlighter-rouge&quot;&gt;:help statusline&lt;/code&gt;.  And then I uninstalled airline and spent 30 minutes or so &lt;a href=&quot;https://github.com/airblade/dotvim/blob/dd5d7737e39aad5e24c1a4a8c0d115ff2ae7b488/vimrc#L49-L91&quot;&gt;implementing&lt;/a&gt; exactly what I wanted and fiddling with the colours.  Very satisfying!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/andy-stewart-screenshot.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I like the file path: the filename stands out while the the relative path is there if you need it.  I haven’t see this two-colour innovation anywhere else and I trust it will lead to fame and fortune.  I use the window number for jumping around (see below).&lt;/p&gt;

&lt;p&gt;Everything else is fairly standard I think.  I use the default leader key.  I’ve never wanted to change it, though I saw a suggestion somewhere to use the space bar instead which sounded like a promising idea.&lt;/p&gt;

&lt;p&gt;I like mappings which augment, rather than replace, Vim’s built-in commands.  For example:&lt;/p&gt;

&lt;div class=&quot;language-viml highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; Use | and _ to split windows (while preserving original behaviour of [count]bar and [count]_).&lt;/span&gt;
nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;expr&lt;span class=&quot;p&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;Bar&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;count &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; ? &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;C-W&amp;gt;v&amp;lt;C-W&amp;gt;&amp;lt;Right&amp;gt;&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;:&amp;lt;C-U&amp;gt;normal! 0&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;count&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;Bar&amp;gt;&amp;lt;CR&amp;gt;&quot;&lt;/span&gt;
nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;expr&lt;span class=&quot;p&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;silent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; _     &lt;span class=&quot;k&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;count &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; ? &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;C-W&amp;gt;s&amp;lt;C-W&amp;gt;&amp;lt;Down&amp;gt;&quot;&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;:&amp;lt;C-U&amp;gt;normal! &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;count&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;_&amp;lt;CR&amp;gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I turn off Vim’s &lt;a href=&quot;https://github.com/airblade/dotvim/blob/dd5d7737e39aad5e24c1a4a8c0d115ff2ae7b488/vimrc#L109-L111&quot;&gt;backups and swapfiles&lt;/a&gt; because they solve problems I don’t have and introduce new ones I don’t need.&lt;/p&gt;

&lt;p&gt;I used to think that one day I’d properly analyse how I use Vim, along the lines of Seth Brown’s &lt;a href=&quot;http://www.drbunsen.org/vim-croquet/&quot;&gt;Vim Croquet&lt;/a&gt; or Drew Neil’s &lt;a href=&quot;http://vimcasts.org/blog/2013/05/vimprint---a-vim-keystroke-parser/&quot;&gt;Vimprint&lt;/a&gt;, to discover ways I could squeeze out a little more efficiency.  Now I think it couldn’t possibly be &lt;a href=&quot;https://xkcd.com/1205/&quot;&gt;worth the time&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;When I started I read the &lt;a href=&quot;http://www.moolenaar.net/habits.html&quot;&gt;7 Habits Of Effective Text Editing&lt;/a&gt; and the first few chapters of Vim’s manual.  After that I used &lt;code class=&quot;highlighter-rouge&quot;&gt;:help&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;:helpgrep&lt;/code&gt; to look up anything I didn’t know, which was just about everything.&lt;/p&gt;

&lt;p&gt;I looked up and learned what every key on the keyboard did in normal mode, and then tried to use each one where appropriate.&lt;/p&gt;

&lt;p&gt;Early on I found an excellent &lt;a href=&quot;http://tnerual.eriogerg.free.fr/vimqrc.pdf&quot;&gt;reference card&lt;/a&gt; which I stuck to my monitor.  I crossed off each line as I learned it, which kept alive the hope of ever being able to use Vim well.&lt;/p&gt;

&lt;p&gt;More recently Drew Neil’s &lt;a href=&quot;http://vimcasts.org&quot;&gt;Vimcasts&lt;/a&gt; were excellent.&lt;/p&gt;

&lt;p&gt;These days for Vimscript I turn to Steve Losh’s &lt;a href=&quot;http://learnvimscriptthehardway.stevelosh.com&quot;&gt;Learn Vimscript the Hard Way&lt;/a&gt; and, of course, I look on GitHub at how people have already solved whatever problem I’m stuck on.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I just learned how to implement custom completion, which turned out to be easy.  I’ve been typing a lot of German recently and I wanted to be able to &lt;a href=&quot;https://github.com/airblade/vim-accent&quot;&gt;auto-complete accented letters&lt;/a&gt; instead of learning a few digraphs.&lt;/p&gt;

&lt;p&gt;Neovim-wise I recently looked at its &lt;a href=&quot;https://neovim.io/doc/user/job_control.html&quot;&gt;job control&lt;/a&gt; mechanism so vim-gitgutter can run its diffs asynchronously.  Vim itself has just added async capability in v&lt;a href=&quot;https://github.com/vim/vim/releases/tag/v7.4.1274&quot;&gt;7.4.1274&lt;/a&gt; though it’s not clear how stable the API is yet.&lt;/p&gt;

&lt;h2 id=&quot;how-did-you-get-started-writing-vim-plugins&quot;&gt;How did you get started writing Vim plugins?&lt;/h2&gt;

&lt;p&gt;Geoffrey Grosenbach, of PeepCode (now Pluralsight), asked me to write a &lt;a href=&quot;https://github.com/topfunky/PeepOpen/tree/master/Support/vim-peepopen&quot;&gt;plugin for PeepOpen&lt;/a&gt;, a desktop app for switching between files in text editors.  I had previously volunteered to write &lt;a href=&quot;http://app.pluralsight.com/courses/smash-into-vim&quot;&gt;a PeepCode screencast on Vim&lt;/a&gt;, so when he built PeepOpen he asked me to provide a plugin.&lt;/p&gt;

&lt;p&gt;I had never written a Vim plugin before and it took me hours to write those 30 lines of Vimscript.  The part I found confusing was linking up functions, commands, and maps.  Even today I find this part of Vim unintuitive.&lt;/p&gt;

&lt;p&gt;Once Vim was able to talk to PeepOpen, Geoffrey asked me to write something to automatically change Vim’s working directory to the project root.  This is &lt;a href=&quot;https://github.com/airblade/vim-rooter&quot;&gt;vim-rooter&lt;/a&gt;.  Having Vim change directory automatically isn’t everybody’s cup of tea – but I like it and it helps when working on two projects in the same session, e.g. a Rails app and a gem dependency.&lt;/p&gt;

&lt;h2 id=&quot;your-most-well-known-plugin-is-probably-vim-gitgutter-what-can-you-tell-us-about-the-story-of-its-development&quot;&gt;Your most well-known plugin is probably vim-gitgutter. What can you tell us about the story of its development?&lt;/h2&gt;

&lt;p&gt;Six years ago I read a blog post entitled &lt;a href=&quot;http://blog.extracheese.org/2009/10/cyclomatic-complexity-in-vim-first-steps.html&quot;&gt;Cyclomatic Complexity in Vim: First Steps&lt;/a&gt;.  In it Gary Bernhardt, who later went on to make the &lt;a href=&quot;https://www.destroyallsoftware.com/screencasts&quot;&gt;Destroy All Software&lt;/a&gt; screencasts, got Vim to highlight the complexity of each function in the margin (a.k.a. SignColumn).  I had never seen Vim do anything like it and I wanted to do something similar myself…but I couldn’t think of anything suitable.&lt;/p&gt;

&lt;p&gt;Three years later I read a blog post entitled &lt;a href=&quot;http://www.jisaacks.com/gitgutter/&quot;&gt;GitGutter&lt;/a&gt;.  JD Isaacks had written a Sublime Text plugin to show git-diff markers in the margin.  I thought it was interesting, though not very useful, and looked for a Vim version to try.  I couldn’t find one; and I realised this was the excuse I’d been looking for to try doing something with the SignColumn.&lt;/p&gt;

&lt;p&gt;I wrote the first version in a day or two.  It was the simplest thing that worked: a proof of concept really.  It didn’t have any realtime updating and it was slow, but it made me happy because I had finally got the SignColumn doing something.  And to my great surprise I found it useful after all.&lt;/p&gt;

&lt;p&gt;After that it was mainly a question of speeding it up.  So instead of processing all buffers when it ran, I made it process only the visible ones.  I measured and found Vim was taking 7ms to place each sign.  On a file with 142 signs, that meant Vim freezing for 1s every time the plugin ran – even if the diff hadn’t changed.  So instead of throwing away all the signs and adding them from scratch each time, I diffed the diff and “upserted” the signs, which made a big difference.  After that I kept re-profiling and concentrating on the worst remaining hotspot, and eventually it got to the point where it seemed more or less instant to me.&lt;/p&gt;

&lt;p&gt;The part of the code which has churned the most is the function which calls out to &lt;code class=&quot;highlighter-rouge&quot;&gt;git-diff&lt;/code&gt;.  Initially there was no realtime diffing so I could just call &lt;code class=&quot;highlighter-rouge&quot;&gt;git diff FILE&lt;/code&gt;.  Realtime diffing meant sending the contents of the buffer, without saving it, to &lt;code class=&quot;highlighter-rouge&quot;&gt;git-diff&lt;/code&gt;.  So I passed the buffer’s contents as the second argument to &lt;code class=&quot;highlighter-rouge&quot;&gt;system()&lt;/code&gt;…but it turned out that didn’t work with repos which automatically adjust line endings.  So now I pass two files to &lt;code class=&quot;highlighter-rouge&quot;&gt;git-diff&lt;/code&gt;: a temp file holding the buffer’s contents and a temp file for the file in the index (&lt;code class=&quot;highlighter-rouge&quot;&gt;git show :file &amp;gt; tmpfile&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Then it became apparent that using new temp files each time, even if they are never loaded into vim, makes the buffer numbers sky-rocket; after a day I would find my buffer numbers were in the thousands.  So I started reusing temp files…but then it turned out you have to preserve the real file’s extension or git’s line ending conversion goes awry.&lt;/p&gt;

&lt;p&gt;Also I found that writing the buffer’s contents to a temp file resets various marks, so I had to restore those afterwards.  And then Windows requires a random extra pair of parentheses around everything.  And so on.&lt;/p&gt;

&lt;p&gt;And then there were a number of unexpected problems with &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt;.  I use &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt; if it’s available to filter &lt;code class=&quot;highlighter-rouge&quot;&gt;git-diff&lt;/code&gt;’s output for the hunk information because it’s more efficient than piping lots of unnecessary data back for Vimscript to filter.  But it turns out some people have &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt; always return colourful output, which breaks things.  So then I passed the &lt;code class=&quot;highlighter-rouge&quot;&gt;--color=never&lt;/code&gt; flag to &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt;, but some &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt;s don’t support it.  So then I auto-detected whether or not &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt; supports &lt;code class=&quot;highlighter-rouge&quot;&gt;--color=never&lt;/code&gt; but that slowed down Vim’s startup.  Et cetera.&lt;/p&gt;

&lt;p&gt;Initially there were no tests.  But after I found a couple of gotchas with Vim’s signs “API”, I realised I had to write tests to avoid re-introducing bugs I’d already fixed.  I’d never written Vimscript tests and, as far as I knew, there was no de-facto standard way to test.  I looked at half a dozen testing plugins but none clicked with me.  I eventually decided to follow Christian Wellenbrock’s approach in &lt;a href=&quot;https://github.com/wellle/targets.vim&quot;&gt;targets.vim&lt;/a&gt;: just use bash.  My tests have many disadvantages, e.g. you can’t easily run a single test, but on the plus side, they work.  I don’t know if I’d do it the same way again.&lt;/p&gt;

&lt;p&gt;Overall the biggest surprise for me is how useful I find vim-gitgutter: both the diff markers and the hunk staging.  I used to &lt;code class=&quot;highlighter-rouge&quot;&gt;git add -p&lt;/code&gt; all the time and now I never do: I stage all hunks with vim-gitgutter.&lt;/p&gt;

&lt;h2 id=&quot;share-a-snippet-of-vimscript-youve-written-and-talk-about-what-it-does&quot;&gt;Share a snippet of Vimscript you’ve written and talk about what it does.&lt;/h2&gt;

&lt;p&gt;In Vim you’re constantly moving between windows.  When I have fewer than four or five open, I use tab and shift-tab to cycle between them to the one I want.&lt;/p&gt;

&lt;div class=&quot;language-viml highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; Use tab and shift-tab to cycle through windows.&lt;/span&gt;
nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;Tab&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;C&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;W&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;w&lt;/span&gt;
nnoremap &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;S&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;Tab&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;C&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;W&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;W
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;With more windows, I find it quicker to jump directly to the one I want.  My status line shows each window’s number so I can type &lt;code class=&quot;highlighter-rouge&quot;&gt;\7&lt;/code&gt; to jump straight to window 7.&lt;/p&gt;

&lt;div class=&quot;language-viml highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; Source: http://stackoverflow.com/a/6404246/151007&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;&quot; If I have more than 9 windows open I have bigger problems :)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;9&lt;/span&gt;
  execute &lt;span class=&quot;s1&quot;&gt;'nnoremap &amp;lt;Leader&amp;gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;' :'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'wincmd w&amp;lt;CR&amp;gt;'&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;endwhile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;It’s not rocket science but it saves me lots of time.  Which is the whole point of Vim.&lt;/p&gt;

&lt;h2 id=&quot;what-have-you-been-working-on-recently-in-vim&quot;&gt;What have you been working on recently in Vim?&lt;/h2&gt;

&lt;p&gt;I recently used Vim over ssh on my phone to fix a production bug while I was away from my computer.  With a low-bandwidth connection I was very glad of Vim’s succinct keystrokes – which, I believe, were originally motivated by having to edit text over 300 baud modems.  It felt like an apt use of Vim.&lt;/p&gt;

</description>
        <pubDate>Thu, 10 Mar 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/andy-stewart/</link>
        <guid isPermaLink="true">http://howivim.com/2016/andy-stewart/</guid>
        
        
      </item>
    
      <item>
        <title>Chris Oliver</title>
        <description>&lt;h2 id=&quot;who-are-you-and-what-do-you-use-vim-for&quot;&gt;Who are you and what do you use Vim for?&lt;/h2&gt;

&lt;p&gt;I’m Chris Oliver. I’m a developer and entrepreneur who spends a lot of his time bridging the business and engineering side of startups. Originally I got started programming around 7th grade when my dad gave me a book on programming Basic on the Atari he used to have. Since we didn’t have the Atari anymore, I discovered our Magnavox computer in the basement could run GW-Basic which was similar enough. Over the years I taught myself a bunch of languages and went to college for a Computer Science degree.&lt;/p&gt;

&lt;p&gt;It’s hard to say when I first used Vim, but it was probably 6 or 7 years ago that I first started using it full-time. I use it mostly for web development writing mostly Ruby, Rails, CSS, JS, CoffeeScript, Erb, etc. I’m currently using MacVim on OS X because it provides a little bit more natural interface when other people use my computer. If they’re used to clicking and highlighting things in Sublime, they can have an easier time pairing with me using Vim.&lt;/p&gt;

&lt;p&gt;There were a few reason why I chose Vim. One was that I originally did tons of work on Linux. Anytime you have to SSH into a server you usually have two options by default: Vim or Nano. Since Nano is pretty basic, I figured learning Vim would be a wise choice. It also seemed like it was the most popular when I was starting so I figured I’d be able to learn it easier because of that.&lt;/p&gt;

&lt;h2 id=&quot;introduce-us-to-your-vim-config&quot;&gt;Introduce us to your Vim config.&lt;/h2&gt;

&lt;p&gt;I’m one of the least advanced users of Vim you might find, but I know enough of the basics that my velocity of editing is quite a bit faster than most people who use Sublime or Atom that I’ve worked with. My Vim setup is a pretty stock setup, with one big addition: a thing called &lt;a href=&quot;https://github.com/carlhuda/janus&quot;&gt;Janus&lt;/a&gt;. Janus is a well maintained repository of Vim plugins and mappings that provide you a really nice environment to ease into if you’re coming from a graphical editor like Sublime or Atom and want to get into Vim.&lt;/p&gt;

&lt;p&gt;The common question I get from most web developers is why would I use Vim over Atom or Sublime? The answer to that is pretty simple. When you use Vim, you’re encouraged to be using the keyboard 100% of the time. That’s going to increase your typing efficiency a lot. When you’re in Sublime, you’ll notice you have a tendency to continuously move your hand between the keyboard and mouse and everything’s slower then. Sure, at this point graphical editors provide a lot of the same shortcuts or Vim modes, but they’ll never put you in the right mindset of typing efficiency that using Vim does.&lt;/p&gt;

&lt;p&gt;In the early days, I struggled using Vim because I wanted to see my files, quickly edit files, etc. Everything felt like sort of a chore because there were so many commands to memorize. All those comfortable things of using Sublime feel missing the moment you step into stock Vim. Janus promised to ease you in and was one of the more popular distributions at the time so I figured I’d give it a shot. I’ve been using it ever since. At some point I’ll build my own custom Vim set of plugins and configs, but for right now Janus gets the job done well for me.&lt;/p&gt;

&lt;p&gt;The plugins I use the most are CtrlP, NerdTree, and Ack which give you a pretty good chunk of the features you’d use most in an editor like Sublime. Syntastic is always great for a quick gut check to make sure you didn’t leave any syntax errors in your file while editing. It’s caught a lot of quick bugs that I wouldn’t have noticed as quickly.&lt;/p&gt;

&lt;h2 id=&quot;what-have-been-the-most-useful-resources-for-you-to-learn-vim&quot;&gt;What have been the most useful resources for you to learn Vim?&lt;/h2&gt;

&lt;p&gt;I’ve quite enjoyed watching Gary Bernhardt and Ben Orenstein talk about how they use Vim. Those guys are quite inspirational when it comes to deciding whether or not you should learn Vim. Vimcasts has also been a good inspiration for diving deeper into vim. I’m still just a beginner with vim, so it’s always awesome to see how the pros use it to pick up one or two things that make your daily typing faster.&lt;/p&gt;

&lt;h2 id=&quot;whats-the-most-recent-thing-youve-learned-about-vim&quot;&gt;What’s the most recent thing you’ve learned about Vim?&lt;/h2&gt;

&lt;p&gt;I was just reading &lt;a href=&quot;http://stackoverflow.com/questions/726894/what-are-the-dark-corners-of-vim-your-mom-never-told-you-about&quot;&gt;this thread&lt;/a&gt; on Stack Overflow recently and didn’t realize you could use “gv” to select the most recent visual select. Super cool stuff.&lt;/p&gt;

&lt;h2 id=&quot;are-you-involved-in-a-local-vim-community&quot;&gt;Are you involved in a local Vim community?&lt;/h2&gt;

&lt;p&gt;Not currently, but I would love to get more involved in the future!&lt;/p&gt;

&lt;h2 id=&quot;what-have-you-been-working-on-recently-in-vim&quot;&gt;What have you been working on recently in Vim?&lt;/h2&gt;

&lt;p&gt;Lately I’ve been mostly using Vim to work on GoRails screencasts. I do all the coding for my Rails apps in Vim, so if you’re interested to see how I use it, definitely check out the screencasts.&lt;/p&gt;

&lt;p&gt;I’m also maintaining a bunch of open source projects and doing a couple consulting projects at the moment. Pair programming on these projects is always fun because it usually results in the person I’m working with start trying out Vim for their own workflow shortly afterwards.&lt;/p&gt;

&lt;h2 id=&quot;links&quot;&gt;Links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://excid3.com&quot;&gt;Chris’s personal site&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/excid3&quot;&gt;Chris on Twitter&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://gorails.com&quot;&gt;GoRails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Mon, 07 Mar 2016 00:00:00 +0000</pubDate>
        <link>http://howivim.com/2016/chris-oliver/</link>
        <guid isPermaLink="true">http://howivim.com/2016/chris-oliver/</guid>
        
        
      </item>
    
  </channel>
</rss>
