From: mpg@elzevir.fr (Manuel Pégourié-Gonnard)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Developing environments used for kernel development
Date: Tue, 29 Dec 2015 10:50:28 +0100 [thread overview]
Message-ID: <56825764.2030800@elzevir.fr> (raw)
In-Reply-To: <CAF3SDA7NUwjMubj7WFdgXw_LWjJuMGVEZQP+3hi+GVr7n1iOLg@mail.gmail.com>
On 29/12/2015 06:10, Daniel. wrote:
> Well I found something that I use frequently on emacs and can't find
> an alternative for vim. While visiting an .patch (or .diff) file from
> emacs I can jump to the position of file just by pressing enter. I
> just can't find something like this on vim.
I don't know how to do this with vim either. The ftplugin/diff.vim file
from the vim runtime distribution doesn't have any such magic.
> When developing I like to
> review my changes before commit, doing little tweaks like removing
> empty new lines and trailing whitespaces. On emacs I can get an diff
> from the version control with C-x v =, then doing the fixes for
> creating a nice patch, doing C-x v = will refresh the diff window, so
> I do this until I think that is good enough.
What I use for that purpose in vim is the :Gdiff command provided by the
fugitive plugin. It splits your window between the checked out version
of your file and the version in the git index.
In addition to reviewing changes, it's also extremely useful for partial
commits when you got carried away during your editing and made an
unrelated change: you can move just the part you want to the index, then
commit that, then commit the rest. Or if you made a change you want to
revert without losing your other changes.
The usual shortcuts from vimdiff mode are available to move things
between the index and the checkout: do, dp (diff other, diff push) and
]c [c for navigating the changes.
Manuel.
prev parent reply other threads:[~2015-12-29 9:50 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 19:27 Developing environments used for kernel development Daniel.
[not found] ` <CAJX_Q+2AOXLM=XWsSYzUbpG=MKH+p2D1Xf2k7xGFrQdn=_zPTQ@mail.gmail.com>
2015-12-22 21:26 ` Daniel.
2015-12-22 21:43 ` Lucas Tanure
2015-12-22 22:41 ` Daniel.
2015-12-22 22:15 ` Clemens Gruber
2015-12-23 0:06 ` Daniel.
2015-12-24 11:59 ` Andrey Skvortsov
2015-12-24 13:57 ` Daniel.
2016-01-14 0:23 ` Ismael Luceno
2016-01-14 0:37 ` Geyslan G. Bem
2016-01-14 13:06 ` Daniel.
2016-01-14 13:53 ` Geyslan G. Bem
2016-01-14 14:26 ` Geyslan G. Bem
2016-01-14 15:23 ` Daniel.
2016-01-14 15:35 ` Geyslan G. Bem
2016-01-14 16:28 ` Daniel.
2016-01-14 16:28 ` Daniel.
2016-01-14 16:36 ` Geyslan G. Bem
2016-01-14 16:52 ` Daniel.
2016-01-14 16:58 ` Geyslan G. Bem
2015-12-24 15:41 ` Ruben Safir
2015-12-24 17:33 ` Daniel.
2015-12-24 18:43 ` Valdis.Kletnieks at vt.edu
2015-12-24 20:13 ` Manuel Pégourié-Gonnard
2015-12-25 0:29 ` Ruben Safir
2015-12-25 0:52 ` Valdis.Kletnieks at vt.edu
2015-12-25 1:42 ` Ruben Safir
[not found] ` <4E5779AD88B2F040B8A7E83ECF544D1A64AC5F@SJCPEX01CL03.citrite.net>
2015-12-23 1:18 ` Daniel.
2015-12-23 13:30 ` Daniel.
2015-12-23 14:45 ` amit mehta
2015-12-23 17:20 ` Daniel.
2016-01-14 19:19 ` Geyslan G. Bem
2016-01-14 20:08 ` Daniel.
2015-12-25 17:14 ` Raymond Jennings
2015-12-28 12:28 ` Daniel.
2015-12-28 12:57 ` Manuel Pégourié-Gonnard
2015-12-28 14:05 ` Fernando Apesteguía
2015-12-28 19:11 ` Daniel.
2015-12-29 5:10 ` Daniel.
2015-12-29 9:50 ` Manuel Pégourié-Gonnard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56825764.2030800@elzevir.fr \
--to=mpg@elzevir.fr \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).