Re: Emacs tip for easily adding Reviewed-by tags & friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel P. Berrangé <berrange@xxxxxxxxxx> [2018-03-15, 11:36AM +0000]:
> 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@xxxxxxxxxx>" nil 1)
>     ("8ack" "Acked-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>" nil 1)
>     ("8test" "Tested-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>" nil 1)
>     ("8sob" "Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>" 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 ?

Yes:

    iabbrev ackby Acked-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
    iabbrev repby Reported-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
    iabbrev revby Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
    iabbrev sigby Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
    iabbrev suggby Suggested-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
    iabbrev testby Tested-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>

Should work identical to the emacs version.

-- 
IBM Systems
Linux on Z & Virtualization Development
------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Schönaicher Str. 220, 71032 Böblingen
Phone: +49 7031 16 1819
------------------------------------------------------------------------
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294 

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux