1

After the installation of my ArchLinux OS, the default text editor was set to vi. I wanted to change it to vim and edited all possible configurations, such as .bashrc, .zshrc, .zshenv and /etc/environment. I also tried to use the export-command to set the environment variables. It works now in most cases, but I've experienced one case where the computer still prefers vi. If I process a .tex-file with the console and the tex-command and type E when experiencing an error (should open the file in the editor), it still wants to open vi. I don't think this is a problem of the configuration of tex, but I don't have any more ideas which config I may have overseen.

  • What does the output of echo ${EDITOR} produce? – eyoung100 Jun 23 '17 at 19:18
  • Further to that, you should be specific in the question about what environment variables you set. It is unfortunately not as well known as it should be that there are at least two environment variables of interest. – JdeBP Jun 23 '17 at 20:49
  • @eyoung100: The output (as expected) is vim. – ixolius Jun 23 '17 at 21:19
  • @JdeBP: I always set both EDITOR and VISUAL, is that what you want to know? – ixolius Jun 23 '17 at 21:21
  • 1
    @cylgalad I would suggest to actually uninstall vi instead of just removing the binary. Otherwise a package update might either fail or just replace the link with a binary again. – Adaephon Jun 25 '17 at 19:18
1

The e response to TeX's error prompt causes the system default editor to start up at the current line of the current file. The environment variable TEXEDIT can be used to change the editor used.

Debian changes the default to sensible-editor, which looks up VISUAL and EDITOR. But by default TEXEDIT is vi.

  • Thank you, I already found this information in the TeX Q&A. Can you tell me in what config file I have to set the TEXEDIT variable to make this setting permanent? – ixolius Jun 26 '17 at 20:03
  • @ixolius export TEXEDIT="$EDITOR" in ~/.profile, just after export EDITOR=vim. – Gilles Jun 26 '17 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.