On Thu, Mar 15, 2018 at 12:38:26PM +0000, Daniel P. Berrangé wrote:
On Thu, Mar 15, 2018 at 01:34:31PM +0100, Erik Skultety wrote:
> On Thu, Mar 15, 2018 at 11:36:28AM +0000, Daniel P. Berrangé wrote:
> > It is nice that git has the short-hand for adding Signed-off-by, but
> > adding other tags during reviews is kind of tedious and long winded.
> > eg "ACK" is much shorter than typing "Reviewed-by: ...blah blah
blah.."
> >
> > Good editors have a way to setup macros though, and so I thought I'd
> > share the emacs approach to making life easy again...
> >
> > In my $HOME/.emacs.d/abbrev_defs file I have this:
> >
> > (define-abbrev-table 'global-abbrev-table
> > '(
> > ("8rev" "Reviewed-by: Daniel P. Berrangé
<berrange(a)redhat.com>" nil 1)
> > ("8ack" "Acked-by: Daniel P. Berrangé
<berrange(a)redhat.com>" nil 1)
> > ("8test" "Tested-by: Daniel P. Berrangé
<berrange(a)redhat.com>" nil 1)
> > ("8sob" "Signed-off-by: Daniel P. Berrangé
<berrange(a)redhat.com>" nil 1)
> > ))
> >
> > Now, if I type the "8rev" [1] and then hit space-bar or enter, emacs
expands
> > it to the full "Reviewed-by: ....blah blah blah..." line. This makes
adding
> > the full tags just as quick & easy as it was to type a traditional
"ACK".
> >
> > Anyone have an equivalent tip for Vim ?
>
> I'm using the following plugin for Vim which I tuned just a tiny bit so that I
> could write even less :P.
>
>
https://github.com/vim-scripts/git_patch_tags.vim
What does it mean when it says "<Leader>" in that README. Is that a
name referring to a magic key sequence, or literal text to type ?
<Leader> is a mod key basically, something like Win key in tiling WMs, I'm not
sure whether in Vim's case it can be a key sequence, but you can configure it
by having this in your .vimrc:
let mapleader=","
PS: jdenemar says the default <Leader> maps to '\'
Erik