In Ubuntu 12.04 Precise the only way to get breakindent patch working in VIM seems to be compiling VIM itself after patching it. Here's what I've done:
Install pbuilder and create local environment
sudo apt-get install pbuilder debootstrap
sudo pbuilder create --debootstrapopts --variant=buildd
Get the sources
sudo apt-get source vim
Patch them with breakindent patch retrieved from the official repo
cd vim-7.3.429
patch -p1 < vim-breakindent.patch
sudo pbuilder build vim_7.3.429-2ubuntu2.1.dsc
Pbuilder correctly generates deb packages but, after installing them, no breakindent option is available:
:set bri
E518: Unknown option: bri
Where's the mistake? Thank you
pbuilder
is still using the unmodified .dsc
, .orig.tar.gz
, and .debian.tar.gz
to build the package. Applying the patch to your local copy doesn't help.
You should probably add the patch to debian/patches/
and debian/patches/series
, bump the local version number in debian/changelog
(debchange
can help), and re-make the source archive (something like dpkg-buildpackage -S
).
Update: it worked following some more steps.
After
apt-get source
:cd vim-7.3.429 sudo chmod u=rw,g=r,o=r ../vim-breakindent.patch sudo cp ../vim-breakindent.patch debian/patches/debian/.
added one new entry in
debian/changelog
, bumping version fromvim_7.3.429-2ubuntu2.1
tovim_7.3.429-2ubuntu2.2
- added
debian/vim-breakindent.patch
at the end ofdebian/patches/series
generate new source package:
sudo pdebuild
compile the new
.dsc
:sudo pbuilder build vim_7.3.429-2ubuntu2.2.dsc
install new debs:
sudo dpkg -i /var/cache/pbuilder/result/*.deb
来源:https://stackoverflow.com/questions/10998516/compiling-vim-with-breakindent-patch