You are not logged in.

#1 2020-04-14 21:14:52

kgavionics
Member
Registered: 2020-04-02
Posts: 31

[Solved]Can't change yay editor to vim?

Hello guys
I'm using Archlinux Kde with zsh.I use yay helper to install some AUR packages.Sometimes in need to edit the PKGBUILD files and i'm stuck with the yay default editor which i don't nothing how to use!
I want to use vim instead, but i can't get it to work!
i tried this two command to make vim my default editor :

echo "export EDITOR=/usr/bin/vim" >> ~/.zshrc
echo "export VISUAL=/usr/bin/vim" >> ~/.zshrc
i logged out and logged back in, but i still have the default yay editor.
Can someone tell me how to get rid of the yay default editor and replace it by vim please?

Thank you in advance

Last edited by kgavionics (2020-04-15 23:27:50)

Offline

#2 2020-04-14 22:26:49

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,369
Website

Re: [Solved]Can't change yay editor to vim?

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2020-04-14 23:19:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved]Can't change yay editor to vim?

There is no default editor.  If EDITOR or VISUAL are not set, yay prints an error message instructing you to print them.

Generally speaking, though, one would not use a full path for EDITOR, just `export EDITOR=vim`.  This shouldn't normally matter, though yay uses a go function that seems to look for a file with the value of EDITOR in PATH, which might fail for /usr/bin/vim as that string is not the name of a file.  But I zero experience in go (edit: here are the LookPath docs, apparently a full path is fine.)

But also note this from the yay author / maintainer:

README wrote:

Support
All support related to Yay should be requested via GitHub issues. Since Yay is not officially supported by Arch Linux, support should not be sought out on the forums, AUR comments or other official channels.

Right before you try to use yay, check `echo $EDITOR`.  Does that actually return /usr/bin/vim?

Last edited by Trilby (2020-04-14 23:50:54)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2020-04-15 23:27:02

kgavionics
Member
Registered: 2020-04-02
Posts: 31

Re: [Solved]Can't change yay editor to vim?

Thank you guys for your help.Problem solved by running this command :  yay --editmenu --nodiffmenu --save

Offline

Board footer

Powered by FluxBB