[pacman-dev] [PATCH 1/2] Change Vim modeline in prototypes from "ts=2 sw=2 et" to "noet"
From: "Jason St. John" <jstjohn@purdue.edu> It makes little sense to "force" users to replace tabs with spaces, with a width of 2. These settings should be configured by the user in their own ~/.vimrc. Bluewind stated on IRC that removing "et" is a bad idea and that it would be better to just turn that setting off with "noet". By "forcing" the use of tabs, this supports better compatibility between various user preferences because the width of tabs/indents is, and should be, an editor setting. Signed-off-by: Jason St. John <jstjohn@purdue.edu> --- proto/PKGBUILD-split.proto | 2 ++ proto/PKGBUILD.proto | 2 +- proto/proto.install | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/proto/PKGBUILD-split.proto b/proto/PKGBUILD-split.proto index f873db6..41ee26e 100644 --- a/proto/PKGBUILD-split.proto +++ b/proto/PKGBUILD-split.proto @@ -70,3 +70,5 @@ package_pkg2() { cd "$srcdir/$pkgbase-$pkgver" make DESTDIR="$pkgdir/" install-pkg2 } + +# vim:set noet: diff --git a/proto/PKGBUILD.proto b/proto/PKGBUILD.proto index 98172d8..d0d0412 100644 --- a/proto/PKGBUILD.proto +++ b/proto/PKGBUILD.proto @@ -44,4 +44,4 @@ package() { make DESTDIR="$pkgdir/" install } -# vim:set ts=2 sw=2 et: +# vim:set noet: diff --git a/proto/proto.install b/proto/proto.install index 2a8993d..3234bea 100644 --- a/proto/proto.install +++ b/proto/proto.install @@ -34,4 +34,4 @@ # do something here #} -# vim:set ts=2 sw=2 et: +# vim:set noet: -- 1.8.0
From: "Jason St. John" <jstjohn@purdue.edu> The previous commit changed the Vim modeline to not replace tabs with spaces. This commit replaces the space-based indents with tabs so that the prototype files' indents are consistent with their modelines. Signed-off-by: Jason St. John <jstjohn@purdue.edu> --- proto/PKGBUILD-split.proto | 58 +++++++++++++++++++++++----------------------- proto/PKGBUILD.proto | 14 +++++------ proto/proto.install | 12 +++++----- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/proto/PKGBUILD-split.proto b/proto/PKGBUILD-split.proto index 41ee26e..26dc9b1 100644 --- a/proto/PKGBUILD-split.proto +++ b/proto/PKGBUILD-split.proto @@ -29,46 +29,46 @@ noextract=() md5sums=() #generate with 'makepkg -g' build() { - cd "$srcdir/$pkgbase-$pkgver" - ./configure --prefix=/usr - make + cd "$srcdir/$pkgbase-$pkgver" + ./configure --prefix=/usr + make } check() { - cd "$srcdir/$pkgname-$pkgver" - make -k check + cd "$srcdir/$pkgname-$pkgver" + make -k check } package_pkg1() { - # options and directives that can be overridden - pkgver= - pkgrel= - epoch= - pkgdesc="" - arch=() - url="" - license=() - groups=() - depends=() - optdepends=() - provides=() - conflicts=() - replaces=() - backup=() - options=() - install= - changelog= + # options and directives that can be overridden + pkgver= + pkgrel= + epoch= + pkgdesc="" + arch=() + url="" + license=() + groups=() + depends=() + optdepends=() + provides=() + conflicts=() + replaces=() + backup=() + options=() + install= + changelog= - cd "$srcdir/$pkgbase-$pkgver" - make DESTDIR="$pkgdir/" install-pkg1 + cd "$srcdir/$pkgbase-$pkgver" + make DESTDIR="$pkgdir/" install-pkg1 } package_pkg2() { - # options and directives overrides - pkgdesc="" + # options and directives overrides + pkgdesc="" - cd "$srcdir/$pkgbase-$pkgver" - make DESTDIR="$pkgdir/" install-pkg2 + cd "$srcdir/$pkgbase-$pkgver" + make DESTDIR="$pkgdir/" install-pkg2 } # vim:set noet: diff --git a/proto/PKGBUILD.proto b/proto/PKGBUILD.proto index d0d0412..cbb92a9 100644 --- a/proto/PKGBUILD.proto +++ b/proto/PKGBUILD.proto @@ -29,19 +29,19 @@ noextract=() md5sums=() #generate with 'makepkg -g' build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr - make + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make } check() { - cd "$srcdir/$pkgname-$pkgver" - make -k check + cd "$srcdir/$pkgname-$pkgver" + make -k check } package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir/" install + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install } # vim:set noet: diff --git a/proto/proto.install b/proto/proto.install index 3234bea..3a6fc5d 100644 --- a/proto/proto.install +++ b/proto/proto.install @@ -4,34 +4,34 @@ ## arg 1: the new package version #pre_install() { - # do something here + # do something here #} ## arg 1: the new package version #post_install() { - # do something here + # do something here #} ## arg 1: the new package version ## arg 2: the old package version #pre_upgrade() { - # do something here + # do something here #} ## arg 1: the new package version ## arg 2: the old package version #post_upgrade() { - # do something here + # do something here #} ## arg 1: the old package version #pre_remove() { - # do something here + # do something here #} ## arg 1: the old package version #post_remove() { - # do something here + # do something here #} # vim:set noet: -- 1.8.0
On 17/11/12 09:06, Jason St. John wrote:
From: "Jason St. John" <jstjohn@purdue.edu>
It makes little sense to "force" users to replace tabs with spaces, with a width of 2. These settings should be configured by the user in their own ~/.vimrc.
Bluewind stated on IRC that removing "et" is a bad idea and that it would be better to just turn that setting off with "noet". By "forcing" the use of tabs, this supports better compatibility between various user preferences because the width of tabs/indents is, and should be, an editor setting.
It makes even less sense to "force" users to have vim modelines at all. My vote is to remove them completely from the prototypes. Allan
On Fri, Nov 16, 2012 at 6:11 PM, Allan McRae <allan@archlinux.org> wrote:
On 17/11/12 09:06, Jason St. John wrote:
From: "Jason St. John" <jstjohn@purdue.edu>
It makes little sense to "force" users to replace tabs with spaces, with a width of 2. These settings should be configured by the user in their own ~/.vimrc.
Bluewind stated on IRC that removing "et" is a bad idea and that it would be better to just turn that setting off with "noet". By "forcing" the use of tabs, this supports better compatibility between various user preferences because the width of tabs/indents is, and should be, an editor setting.
It makes even less sense to "force" users to have vim modelines at all. My vote is to remove them completely from the prototypes.
Allan
I actually prefer removing the modeline too. There was apparently some confusion in #archlinux-projects between Bluewind and myself. I'm working on another patch to remove the modeline completely. Jason
On Fri, Nov 16, 2012 at 5:11 PM, Allan McRae <allan@archlinux.org> wrote:
On 17/11/12 09:06, Jason St. John wrote:
From: "Jason St. John" <jstjohn@purdue.edu>
It makes little sense to "force" users to replace tabs with spaces, with a width of 2. These settings should be configured by the user in their own ~/.vimrc.
Bluewind stated on IRC that removing "et" is a bad idea and that it would be better to just turn that setting off with "noet". By "forcing" the use of tabs, this supports better compatibility between various user preferences because the width of tabs/indents is, and should be, an editor setting.
It makes even less sense to "force" users to have vim modelines at all. My vote is to remove them completely from the prototypes.
I disagree on this; it is all too easy to start intermingling tabs and spaces in these otherwise. The original patch idea seems fine to me. -Dan
On Sun, Nov 18, 2012 at 8:08 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Fri, Nov 16, 2012 at 5:11 PM, Allan McRae <allan@archlinux.org> wrote:
On 17/11/12 09:06, Jason St. John wrote:
From: "Jason St. John" <jstjohn@purdue.edu>
It makes little sense to "force" users to replace tabs with spaces, with a width of 2. These settings should be configured by the user in their own ~/.vimrc.
Bluewind stated on IRC that removing "et" is a bad idea and that it would be better to just turn that setting off with "noet". By "forcing" the use of tabs, this supports better compatibility between various user preferences because the width of tabs/indents is, and should be, an editor setting.
It makes even less sense to "force" users to have vim modelines at all. My vote is to remove them completely from the prototypes.
I disagree on this; it is all too easy to start intermingling tabs and spaces in these otherwise. The original patch idea seems fine to me.
Err; keep et/noet in docs; drop them in prototypes seems fine. Got my emails crossed there. -Dan
participants (3)
-
Allan McRae
-
Dan McGee
-
Jason St. John