excalibur1234 / pacui

Bash script providing advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Pacaur/Pamac-cli functionality in a simple UI
GNU General Public License v3.0
168 stars 13 forks source link

defaul editor of pacui #36

Closed jemadux closed 6 years ago

jemadux commented 6 years ago

i am vim guy , how can change the defaul editor of pacUi ?

excalibur1234 commented 6 years ago

pacui's "edit config files" option has used by default the $EDITOR environment variable for a long time. if this was not set, it used nano instead.

but i have just checked the code again and found that "visudo" (which is used to edit the "sudoers" file) always uses nano as editor. i have changed it to use $SUDO_EDITOR by default (but if this is not set, nano gets used). visudo uses $SUDO_EDITOR by default. the help page explains this as well, now.

please install pacui-git and set the environment variables mentioned above to your liking. my preliminary testing of $SUDO_EDITOR variable was not successful, but the code should work as i explained it above. i have not properly set my environment variables, though. please report back, whether it works for you or not.

excalibur1234 commented 6 years ago

have you done any testing? does pacui work with vim when you set $EDITOR and $SUDO_EDITOR environment variables?

p.s.: you can set your environment variables in multiple ways:

excalibur1234 commented 6 years ago

i have done tests with these environment variables and everything works as expected.

i consider this issue solved. if this is not the case, please reopen it.