diff options
author | fusion809 | 2016-10-24 23:07:15 +1000 |
---|---|---|
committer | fusion809 | 2016-10-24 23:07:15 +1000 |
commit | c53626366b784a23701b935c31ccc1708fc0aaa3 (patch) | |
tree | 1f74d7744df201a1bdeec6ce1e109e0ef19c4004 | |
parent | e883da7a808a8fd3285a7e9a6c2d9e706cf7c68c (diff) | |
download | aur-c53626366b784a23701b935c31ccc1708fc0aaa3.tar.gz |
Implementing the changes requested by mnyolt
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | archlinux.vim | 25 | ||||
-rw-r--r-- | vimrc | 18 |
4 files changed, 79 insertions, 20 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Sun Oct 23 17:14:29 UTC 2016 +# Mon Oct 24 13:07:15 UTC 2016 pkgbase = gvim-gtk2 pkgdesc = Vim, the text editor. CLI version and GTK2 GUI providing majority of features. pkgver = 8.0.0046 @@ -38,9 +38,14 @@ pkgbase = gvim-gtk2 conflicts = gvim-gtk3 conflicts = gvim-python3 conflicts = gvim-git + backup = etc/vimrc source = https://github.com/vim/vim/archive/v8.0.0046.tar.gz + source = vimrc + source = archlinux.vim source = gvim.desktop sha256sums = a768d3b959c44c6084c1c745012766a537303c687f8869d3e877c5a25cc812f4 + sha256sums = b16e85e457397ab2043a7ee0a3c84307c6b4eac157fd0b721694761f25b3ed5b + sha256sums = 0cf8b42732111d0c66c3908a76d832736e8f8dc3abef81cb092ddf84cb862ea2 sha256sums = 9f1c00aa96458caa2cdfc02164e58bc08bcfcbe5aa95dc618d2fc7e1b12b9a12 pkgname = gvim-gtk2 @@ -20,8 +20,13 @@ provides=("gvim=$pkgver" "xxd" "vim-runtime=$pkgver" "vim=$pkgver") conflicts=("vim-minimal-git" "vim-git" "vim-runtime" "vim-runtime-git" "vim-minimal" "vim" "vim-python3" "gvim" "gvim-gtk3" "gvim-python3" "gvim-git") source=("https://github.com/vim/vim/archive/v$pkgver.tar.gz" + "vimrc" + "archlinux.vim" "gvim.desktop") +backup=('etc/vimrc') sha256sums=('a768d3b959c44c6084c1c745012766a537303c687f8869d3e877c5a25cc812f4' + 'b16e85e457397ab2043a7ee0a3c84307c6b4eac157fd0b721694761f25b3ed5b' + '0cf8b42732111d0c66c3908a76d832736e8f8dc3abef81cb092ddf84cb862ea2' '9f1c00aa96458caa2cdfc02164e58bc08bcfcbe5aa95dc618d2fc7e1b12b9a12') install=gvim.install @@ -30,6 +35,7 @@ prepare() { cd $SRC # set global configuration files to /etc/[g]vimrc sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h + sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h } build() { @@ -53,26 +59,31 @@ build() { } package() { - SRC="$srcdir/${_pkgname}-$pkgver" - # actual installation - cd $SRC - make DESTDIR=$pkgdir install - cd .. - pv="${_pkgname}-$pkgver" + SRC="$srcdir/${_pkgname}-$pkgver" + # actual installation + cd $SRC + make DESTDIR=$pkgdir install + cd .. + pv="${_pkgname}-$pkgver" + + # desktop entry file and corresponding icon + install -Dm644 ../gvim.desktop $pkgdir/usr/share/applications/gvim.desktop + install -Dm644 $pv/runtime/vim48x48.png $pkgdir/usr/share/icons/hicolor/48x48/apps/gvim.png - # desktop entry file and corresponding icon - install -Dm644 ../gvim.desktop $pkgdir/usr/share/applications/gvim.desktop - install -Dm644 $pv/runtime/vim48x48.png $pkgdir/usr/share/icons/hicolor/48x48/apps/gvim.png + # rc files + install -Dm644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc + install -Dm644 "${srcdir}"/archlinux.vim \ + "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim - # remove ex/view and man pages (normally provided by package 'vi' on Arch Linux) - cd $pkgdir/usr/bin ; rm ex view - find $pkgdir/usr/share/man -type d -name 'man1' 2>/dev/null | \ - while read _mandir; do - cd ${_mandir} - rm -f ex.1 view.1 - done + # remove ex/view and man pages (normally provided by package 'vi' on Arch Linux) + cd $pkgdir/usr/bin ; rm ex view + find $pkgdir/usr/share/man -type d -name 'man1' 2>/dev/null | \ + while read _mandir; do + cd ${_mandir} + rm -f ex.1 view.1 + done - # add license - install -Dm644 $SRC/runtime/doc/uganda.txt \ - $pkgdir/usr/share/licenses/$pkgname/LICENSE + # add license + install -Dm644 $SRC/runtime/doc/uganda.txt \ + $pkgdir/usr/share/licenses/$pkgname/LICENSE } diff --git a/archlinux.vim b/archlinux.vim new file mode 100644 index 000000000000..80890685196b --- /dev/null +++ b/archlinux.vim @@ -0,0 +1,25 @@ +" The ArchLinux global vimrc - setting only a few sane defaults +" +" Maintainer: Thomas Dziedzic [gostrc@gmail.com] +" +" NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION +" SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc + +" Normally we use vim-extensions. If you want true vi-compatibility +" remove change the following statements +set nocompatible " Use Vim defaults instead of 100% vi compatibility +set backspace=indent,eol,start " more powerful backspacing + +" Now we set some defaults for the editor +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time + +" Suffixes that get lower priority when doing tab completion for filenames. +" These are files we are not likely to want to edit or read. +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg + +if has('gui_running') + " Make shift-insert work like in Xterm + map <S-Insert> <MiddleMouse> + map! <S-Insert> <MiddleMouse> +endif diff --git a/vimrc b/vimrc new file mode 100644 index 000000000000..ee36a5269244 --- /dev/null +++ b/vimrc @@ -0,0 +1,18 @@ +" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just +" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime +" you can find below. If you wish to change any of those settings, you should +" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten +" everytime an upgrade of the vim packages is performed. It is recommended to +" make changes after sourcing archlinux.vim since it alters the value of the +" 'compatible' option. + +" This line should not be removed as it ensures that various options are +" properly set to work with the Vim-related packages. +runtime! archlinux.vim + +" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' +" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual +" and configure vim to your own liking! + +" do not load defaults if ~/.vimrc is missing +"let skip_defaults_vim=1 |