summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6db09f9977e3e727a99a705cf79fa61b99a7071d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Maintainer: Doug Newgard <scimmia at archlinux dot info>
# Contributor: Tomas Storck <storcktomas@gmail.com>
# Contributor: Tom Richards <tom@tomrichards.net>

pkgname=neovim-symlinks
pkgver=5
pkgrel=1
pkgdesc='Runs neovim if vi or vim is called'
arch=('any')
depends=('neovim' 'sh')
provides=('vim' 'vi')
conflicts=('vim' 'vi' 'vi-vim-symlink')

package() {
  install -dm755 "$pkgdir/usr/bin/"
  cd "$pkgdir/usr/bin/"

  echo -e '#!/bin/sh\nexec nvim -e "$@"'  > ex
  echo -e '#!/bin/sh\nexec nvim -R "$@"'  > view
  echo -e '#!/bin/sh\nexec nvim -d "$@"'  > vimdiff
  chmod 755 *

  for _link in edit vedit vi vim; do
    ln -s nvim $_link
  done
}