Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewtSN-00053h-Im for pgsql-general@arkaria.postgresql.org; Fri, 16 Mar 2018 17:47:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewtSL-0005SK-H0 for pgsql-general@arkaria.postgresql.org; Fri, 16 Mar 2018 17:47:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewtSL-0005S6-8P for pgsql-general@lists.postgresql.org; Fri, 16 Mar 2018 17:47:53 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ewtSH-0007ea-O8 for pgsql-general@lists.postgresql.org; Fri, 16 Mar 2018 17:47:52 +0000 Received: by mail-pf0-x244.google.com with SMTP id j2so4417042pff.10 for ; Fri, 16 Mar 2018 10:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:reply-to:mime-version :content-transfer-encoding; bh=qGLgnIdK2Q56R3UI5/ug9v4B5VKaYl0TUA3AtO1kWjc=; b=KU6bShTdGyOE88Xw/Hc3izHSVT8f+mUTOh4y5r4Jthg/UojnuxVm3jvCOlxb5WbSkr jkvqabWDy1slW7xlyKDMDjVzhrVa10X63LARshDbMWEXG1A2JtH+GslhB8tWGP3JzfdY MyGxEARq/6BSSL7lL1d/1AgiXyAiYVmB1kncA3fWSjhqNX4e0mJNqxX6URLAqshTnwin dD8ctZQ7X7lSMyS2z/X+nIEyvMaZ2ZrbZ4P73IiXh0q3IgsMWC33DuVMvHfWO+FCyqbE pmGLQucP8q32qrw1scsOWXe7U5eUaitQnyMjwyb+uMMXmcAQtVg41UyLc71Mg5gDGWmq 0Lpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:reply-to :mime-version:content-transfer-encoding; bh=qGLgnIdK2Q56R3UI5/ug9v4B5VKaYl0TUA3AtO1kWjc=; b=SpZVDkpabiP5Zuu/AfmFpXFV+h67gAYI1DQZ0ZZhAgtzheUQE+0eCvNL+TV/fal9O7 KeNOz/t6jKEUkbeuyVj7/4HINZnWNqEakB1iKB0p+Ltkse4QeFjowag8/3zIv+yzDzGp xS7Ki3gR2AVH9wSCXWVVO7KeaiJGaIQNxwutW3OOF+ja1tgg02SXU+X+oZxNBk0PzYu6 yKlehuZmpIZ+ssZoR+f60ozm31pypjKra/UJtmg1Xq/vkndHeNI84ASqfv9y7Q/RO0R1 IDKWtpK+FH/F6kma3coQd8o7P+qKAboyFMWsWwVRCr5O2ATwCCzYu2A6crq+APwHaj9n B+Eg== X-Gm-Message-State: AElRT7FDAppqEyWjMGm1PE5djnmXZgyUsCRHyz9hhbOQWbMGzo5kvAQ/ nkQOJyQMvHtjsAj02y+3RMWViOQ6 X-Google-Smtp-Source: AG47ELsp7cZJDbJkuUIOAtX1i/V+aBwsDvxmWo8c7yQ9h6rzOzLdimAphfnF2fPkHoXjq3PV25B9jg== X-Received: by 10.98.206.1 with SMTP id y1mr2283850pfg.196.1521222467375; Fri, 16 Mar 2018 10:47:47 -0700 (PDT) Received: from localhost.localdomain ([205.250.196.230]) by smtp.gmail.com with ESMTPSA id 189sm16614092pfu.129.2018.03.16.10.47.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 10:47:46 -0700 (PDT) From: Victoria X-Google-Original-From: Victoria Date: Fri, 16 Mar 2018 10:47:46 -0700 To: "pgsql-general@lists.postgresql.org" Cc: Victorias.Linux@gmail.com Subject: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue Message-ID: <20180316104746.1e23e682@gmail.com> Reply-To: Victorias.Linux@gmail.com X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 system editor, 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 to it) is not being loaded, so I don't have access to my Vim/NeoVim settings. I tried the nvim -u "" 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. ==============================================================================