Nvim as external editor in psql as Postgres root user - .vimrc(environment?) issue

Поиск
Список
Период
Сортировка
От Victoria
Тема Nvim as external editor in psql as Postgres root user - .vimrc(environment?) issue
Дата
Msg-id 20180316104746.1e23e682@gmail.com
обсуждение исходный текст
Ответы Re: Nvim as external editor in psql as Postgres root user - .vimrc(environment?) issue
Список pgsql-general
Hello; I am using PostgreSQL v.10.2 as a root user (sudo -u postgres -i) on my local Arch Linux installation.

I want to use Neovim (nvim v.0.2.2) as my external editor (\e) in psql; the current default is the Arch Linux default
systemeditor, vi.
 

If I add this to my ~/.psqlrc (/home/victoria/.psqlrc)

  \setenv EDITOR "/usr/bin/nano"

then I can use nano, no problem.

However, if I replace that with

  \setenv EDITOR "/usr/bin/nvim"

and chown this postgres directory (to get around a .local/ permissions error that arises)

  sudo chown -R postgres:victoria /var/lib/postgres

when I type \e in psql I can edit in nvim.

The issue I have is that as I am in a postgres environment, my user (victoria) ~/.vimrc file (I link my nvim.init file
toit) is not being loaded, so I don't have access to my Vim/NeoVim settings.
 

I tried the nvim -u "<path-to-vimrc>" type statements in my ~/.psqlrc, but that throws an error about not a valid path
(again,likely due to the Pg root environment?).
 

Suggestions?  Thank you.
  
==============================================================================


В списке pgsql-general по дате отправления:

Предыдущее
От: Charlin Barak
Дата:
Сообщение: ora2pg and invalid command \N
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Nvim as external editor in psql as Postgres root user - .vimrc(environment?) issue