Vim

Vim Fugitive. :Glog - show a commit author

TL;DR

let g:fugitive_summary_format = "%<(16,trunc)%an || %s"

The path of figuring that line out

Vim-Fugitive is a great package. Recently I started to use :Glog command a lot to look at range of changes added to a branch after git pull.

:Glog <hash>..<another hash>

By default the command only shows a commit hash and its subject.

vm screenshot

I really wanted to see how can I show a commit author name as well.

Vim save file without AutoCmd

Vim’s autocmd is very powerful feature.

In my workflow I have many of them including autocmd for BufWrite.

There are rare cases when I want to save file and ignore any autocmd.

To do this you can just save it by:

:noa w

Of course there can be any command after :noa.

Check :h noa for more details.

Vim folding

Hi, I didn’t use folding functionality previously at all in any other editors, but after I watched this awesome video by Greg Hurrell I found this Vim feature super useful.

So to start getting all benefits from Vim folding just add this to your .vimrc:

set foldmethod=indent
set foldlevelstart=1

What these lines do is: