Package Details: neovim-symlinks 3-1

Git Clone URL: https://aur.archlinux.org/neovim-symlinks.git (read-only)
Package Base: neovim-symlinks
Description: Runs neovim if vi or vim is called
Upstream URL: None
Conflicts: vi, vi-vim-symlink, vim
Provides: vi, vim
Submitter: ooijevaer
Maintainer: Scimmia
Last Packager: Scimmia
Votes: 26
Popularity: 0.943611
First Submitted: 2015-08-10 18:51
Last Updated: 2018-02-21 17:35

Required by (359)

Sources (0)

Latest Comments

1 2 Next › Last »

FrederickZh commented on 2019-09-21 01:41

Hmmm... I tried to use aliases but it's somewhat troublesome to make it work in different shells. Here are what I've got currently:

# /etc/profile.d/neovim.sh
# does not work out of the box unless you're using a login shell
alias ex='nvim -e'
alias exim='nvim -E'
alias rview='nvim -RZ'
alias rvim='nvim -Z'
alias view='nvim -R'
alias vimdiff='nvim -d'

alias edit='nvim'
alias vedit='nvim'
alias vi='nvim'
alias vim='nvim'
# /etc/profile.d/editor.sh
export EDITOR=nvim
export VISUAL=nvim
# /etc/sudoers
Defaults env_keep += "EDITOR"
Defaults env_keep += "VISUAL"
# /etc/bash.bashrc
source /etc/profile.d/neovim.sh
# /etc/zsh/zshrc
source /etc/profile.d/neovim.sh
# ~/.zshrc, ~/.bashrc
# UPDATE: don't use sudo='sudo ', breaks when you have other aliases e.g. alias mv='nocorrect mv'
# https://www.zsh.org/mla/users/2008/msg01229.html
alias sudo='noglob do_sudo '
function do_sudo
{
    integer glob=1
    local -a run
    run=( command sudo )
    if [[ $# -gt 1 && $1 = -u ]]; then
        run+=($1 $2)
        shift ; shift
    fi
    (($# == 0)) && 1=/bin/zsh
    while (($#)); do
        case "$1" in
        command|exec|-) shift; break ;;
        nocorrect) shift ;;
        noglob) glob=0; shift ;;
        *) break ;;
        esac
    done
    if ((glob)); then
        PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH" $run $~==*
    else
        PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH" $run $==*
    fi
}
# ~/.zshenv, ~/.bashrc
# without this 'sh' doesn't not work
export ENV=/etc/bash.bashrc

Even with such a number of tweaks, some cases, e.g. bash -c 'vim' (must be interactive i.e. bash -ic 'vim'), still don't work, and I've got a strong feel that I'm doing this wrong... I prefer aliases since Zsh can detect them and actually generate completions for nvim. Can anyone shed some light on me to improve this?

fav4 commented on 2019-08-20 11:49

can someone please fix the symlink with exim?

christianbundy commented on 2018-05-31 18:10

This package breaks exim, please add it as a conflict or remove the symlink.

https://www.archlinux.org/packages/community/x86_64/exim/

ache commented on 2018-04-20 00:10

Humm ... Why did exim is listed as a vim symlinks ?

exim is a SMTP server, nothing to do with text editor.

I strongly suggest to drop it from the list of symlinks.

danielgreve commented on 2016-11-02 13:40

I came up with an idea for two packages, one for xxd only, and one with scripts providing executables like ex, view, vimdiff, etc.
https://aur.archlinux.org/packages/neovim-drop-in/
https://aur.archlinux.org/packages/xxd-standalone/
Aliases would be more elegant as long as no one relied on scripting with those tools.

Scimmia commented on 2016-07-22 13:46

The symlinks really don't work as they should anymore. Upstream removed support for using them as a way to access specific functions (ie, "ex" should be the same as nvim -e). The best options, as I see them, are to make most of these scripts similar to what vimdiff already is, or to drop a file in /etc/profile.d/ that defines all of these as aliases.

Opinions?

Scimmia commented on 2016-07-06 23:14

That's not happening. The point of this package is to point things to neovim, not to build other utils.

yan12125 commented on 2016-07-06 18:05

An working PKGBUILD with xxd: https://gist.github.com/yan12125/15eee330987fc0642ab2eafebcf30e6d

yan12125 commented on 2016-07-06 17:56

Hi, could you add xxd? It's the last command in vim but not in neovim: https://github.com/vim/vim/blob/master/src/xxd/xxd.c. Building fb-adb-git requires xxd.

Compiling it is as simple as a line: https://github.com/vim/vim/blob/master/src/xxd/Makefile

ooijevaer commented on 2016-06-11 20:49

I've switched distro and won't be able to maintain and test this package any longer.