Package Details: neovim-symlinks 4-1

Git Clone URL: (read-only, click to copy)
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: 34
Popularity: 2.36
First Submitted: 2015-08-10 18:51
Last Updated: 2019-11-29 02:22

Required by (414)

Sources (0)

Latest Comments

1 2 Next › Last »

timescam commented on 2020-08-25 07:18

maybe worth adding vimtutor as exec nvim +Tutor

Freso commented on 2020-02-28 12:18

@FrederickZh You could use the aliases and the symlinks both. The aliases would take precedence in interactive shells and Zsh would give you your completions, and non-interactive shells would(/should) fall gracefully back to the symlinks.

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/
# 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/
export EDITOR=nvim
export VISUAL=nvim
# /etc/sudoers
Defaults env_keep += "EDITOR"
Defaults env_keep += "VISUAL"
# /etc/bash.bashrc
source /etc/profile.d/
# /etc/zsh/zshrc
source /etc/profile.d/
# ~/.zshrc, ~/.bashrc
# UPDATE: don't use sudo='sudo ', breaks when you have other aliases e.g. alias mv='nocorrect mv'
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
    (($# == 0)) && 1=/bin/zsh
    while (($#)); do
        case "$1" in
        command|exec|-) shift; break ;;
        nocorrect) shift ;;
        noglob) glob=0; shift ;;
        *) break ;;
    if ((glob)); then
        PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH" $run $~==*
        PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH" $run $==*
# ~/.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.

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


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: