<h2 id="my-.vimrc-config.">My <code>.vimrc</code> config.</h2>
<pre><code>&quot; General
set confirm                                                      &quot; Display confirmation dialog when closing unsaved files
set number                                                       &quot; Show line numbers
set number relativenumber                                        &quot; Show line numbers relative to curser
set cursorline                                                   &quot; Highlight the current line
set guicursor=
set scrolloff=23                                                 &quot; Number of screen lines above and below the cursor
set colorcolumn=80                                               &quot; Line 76 and 80 are colored
:hi ColorColumn ctermbg=Magenta                                  &quot; Column colors
set nowrap                                                       &quot; Do not wrap lines
set list
set listchars=eol:
,tab:&#x2B7E;&#x2B7E;,trail:~,extends:&gt;,precedes:&lt;,space:&#x23B5;
set showmatch                                                    &quot; Highlight matching brace
set visualbell                                                   &quot; Use visual bell (no beeping)
set showcmd                                                      &quot; Show partial commands in the last line

set hlsearch                                                     &quot; Highlight all search results
set smartcase                                                    &quot; Enable smart-case search
set ignorecase                                                   &quot; Always case-insensitive
set incsearch                                                    &quot; Searches for strings incrementally
set wildmenu                                                     &quot; Display tab complete options menu
set encoding=utf-8                                               &quot; Use an encoding that supports unicode

&quot;set autoindent                                                  &quot; Auto-indent new lines
&quot;set smartindent                                                 &quot; Enable smart-indent
&quot;set smarttab                                                    &quot; Enable smart-tabs
set shiftwidth=4                                                 &quot; Number of auto-indent spaces
set softtabstop=4                                                &quot; Number of spaces per Tab
set tabstop=4                                                    &quot; Indent using four spaces
set expandtab                                                    &quot; Convert tabs to spaces.

&quot; Advanced
set ruler                                                        &quot; Show row and column ruler information
&quot;set showtabline=2                                               &quot; Show tab bar
set cmdheight=2                                                  &quot; Command line height

set undolevels=1000                                              &quot; Number of undo levels
set backspace=indent,eol,start                                   &quot; Backspacing over indention, line breaks and insertion start
set dir=~/.cache/vim                                             &quot; Directory to store swap files
set backupdir=~/.cache/vim                                       &quot; Directory to store backup files
set undodir=~/.cache/vim/undo                                    &quot; Directory to store undo cache

nnoremap &lt;silent&gt; &lt;C-l&gt; :nohl&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;C-s&gt; :term&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;leader&gt;[ :bp&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;leader&gt;] :bn&lt;CR&gt;
nnoremap &lt;leader&gt;so :so ~/.config/vim/sessions/
nnoremap &lt;silent&gt; &lt;F3&gt; :set list!&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;leader&gt;cc :set cc-=5&lt;CR&gt;:set cc-=76&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;leader&gt;cc1 :set cc+=5&lt;CR&gt;:set cc-=76&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;leader&gt;cc2 :set cc+=76&lt;CR&gt;:set cc-=5&lt;CR&gt;
vnoremap &lt;silent&gt; &lt;F6&gt; :w !xsel -ib&lt;CR&gt;&lt;CR&gt;
nnoremap &lt;silent&gt; &lt;F7&gt; :-r !xsel -ob&lt;CR&gt;

nnoremap &lt;leader&gt;7 :setlocal spell spelllang=en_us&lt;CR&gt;
nnoremap &lt;leader&gt;8 :setlocal nospell&lt;CR&gt;</code></pre>
<h3 id="my-markdown.vim-custom-session.">My <code>markdown.vim</code>
custom session.</h3>
<pre><code>iabbr 3* * * *

nnoremap &lt;leader&gt;1 I- &lt;Esc&gt;
nnoremap &lt;leader&gt;2 I    - &lt;Esc&gt;
nnoremap &lt;leader&gt;3 I        - &lt;Esc&gt;
nnoremap &lt;leader&gt;f3 :%s/&#x2013;/-/ge &lt;bar&gt; s/[d*]//ge &lt;bar&gt; %s/&#x2014;/-/ge &lt;bar&gt; w &lt;CR&gt;
nnoremap &lt;leader&gt;h1 I# &lt;Esc&gt;A #&lt;Esc&gt;02o&lt;Esc&gt;
nnoremap &lt;leader&gt;h2 I## &lt;Esc&gt;A ##&lt;Esc&gt;02o&lt;Esc&gt;
nnoremap &lt;leader&gt;h3 I### &lt;Esc&gt;A ###&lt;Esc&gt;02o&lt;Esc&gt;
nnoremap &lt;leader&gt;l1 1k0v$hdI- **Source:** [&lt;Esc&gt;pA](&lt;Esc&gt;gJA) &lt;Esc&gt;0:w&lt;CR&gt;
nnoremap &lt;leader&gt;l2 1k0v$hdI- **Supporting Source:** [&lt;Esc&gt;pA](&lt;Esc&gt;gJA) &lt;Esc&gt;0:w&lt;CR&gt;
nnoremap &lt;leader&gt;l3 i[]()  &lt;Esc&gt;b
vnoremap &lt;leader&gt;n1 :s/  *$/ \/e &lt;bar&gt; .v/ \$/norm A &lt;CR&gt;:nohl&lt;CR&gt;
vnoremap &lt;leader&gt;n2 :s/ \$/  /e &lt;bar&gt; .v/  $/norm A  &lt;CR&gt;:nohl&lt;CR&gt;

vnoremap &lt;leader&gt;c1 di``&lt;Esc&gt;1hp
vnoremap &lt;leader&gt;c2 di```&lt;CR&gt;```&lt;Esc&gt;1kp
vnoremap &lt;leader&gt;f1 :s/  */ /g &lt;bar&gt; w &lt;bar&gt; :nohl &lt;bar&gt;, !fmt -w 76 &lt;CR&gt;:w&lt;CR&gt;
vnoremap &lt;leader&gt;f2 :s/  */ /g &lt;bar&gt; w &lt;bar&gt; :nohl &lt;bar&gt;, !fmt -w 76 &lt;CR&gt;VG:s/$/ \/ &lt;bar&gt; w &lt;bar&gt; :nohl&lt;CR&gt;2o&lt;Esc&gt;:w&lt;CR&gt;

vnoremap &lt;C-b&gt; di****&lt;Esc&gt;2hp
vnoremap &lt;C-i&gt; di**&lt;Esc&gt;1hp</code></pre>
<p>Just source this file.<br />
<code>:so ~/path/to/file.vim</code></p>
<p>Just because I don't want to be a tease; here is the Thunderbird
one-liner. Don't die on that hill!<br />
<code>nnoremap &lt;leader&gt;1 2dw$x0:s/ OR /rOR /g&lt;CR&gt;gg02f,&lt;C-v&gt;G$ugg02f,&lt;C-v&gt;G$:sort u&lt;CR&gt;gg0VG:s/$/ /&lt;CR&gt;gg0VG:s/  *$/ /&lt;CR&gt;ggVGJIcondition="&lt;Esc&gt;A"&lt;Esc&gt;0:s/ "$/"/&lt;CR&gt;:w&lt;CR&gt;</code></p>
