Compiling VIM with breakindent patch

余生颓废 提交于 2019-12-08 05:02:36

问题


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


回答1:


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).




回答2:


Update: it worked following some more steps.

  1. 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/.
    
  2. added one new entry in debian/changelog, bumping version from vim_7.3.429-2ubuntu2.1 to vim_7.3.429-2ubuntu2.2

  3. added debian/vim-breakindent.patch at the end of debian/patches/series
  4. generate new source package:

    sudo pdebuild
    
  5. compile the new .dsc:

    sudo pbuilder build vim_7.3.429-2ubuntu2.2.dsc
    
  6. install new debs:

    sudo dpkg -i /var/cache/pbuilder/result/*.deb
    


来源:https://stackoverflow.com/questions/10998516/compiling-vim-with-breakindent-patch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!