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: 45
Popularity: 2.29
First Submitted: 2015-08-10 18:51
Last Updated: 2019-11-29 02:22

Required by (422)

Sources (0)

Latest Comments

1 2 3 Next › Last »

naruto522ru commented on 2021-06-14 00:24

harry,Thanks for your answer will help not only me, but other people. My problem solution was not practical in contrast to yours.

harry commented on 2021-06-10 19:38

naruto522ru, could just use: echo -e '#!/bin/sh\nexec nvim -c Tutor' > vimtutor

naruto522ru commented on 2021-03-07 09:23

I made such a change on PKGBUILD (I took it from archlinuxcn), and I propose a patch:Sprunge The vimtutor script itself:

if [[ "$LANG" == "ru_RU.UTF-8" ]]; then
 cp /usr/share/nvim/runtime/tutor/ru/vim-01-beginner.tutor /tmp/vim-01-beginner.tutor
 vim /tmp/vim-01-beginner.tutor

if [[ "$LANG" == "en_US.UTF-8" ]]; then
 cp /usr/share/nvim/runtime/tutor/en/vim-01-beginner.tutor /tmp/vim-01-beginner.tutor
 vim /tmp/vim-01-beginner.tutor

exit 0

The itself was taken from the original vim, and the English-language tutor comes with neovim. For other languages, you need to add PKGBUILD and the vimtutor script P.S If someone comes up with a better way I will use it. My way is not perfect.

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.