1

I've just learnt how to run perl commands within vi, but I had to install vim.gtk in order to have perl support. But I want to incorporate these perl commands into bash scripts that call ex. Is there a version of ex that has perl support?

Thanks!

Leo Simon
  • 715
  • 1
  • 5
  • 11
  • 1
    What distribution are you using? Debian/Ubuntu? – Christian Brabandt Oct 02 '15 at 07:46
  • 2
    If your ex is provided by Vim, it should have Perl support. On Arch Linux, ex is provided by vi (that's the BSD vi), so it has no support for anything. Worst case, you can always do vim -Nes to use vim as ex. – muru Oct 02 '15 at 08:09
  • Using debian 14.04. – Leo Simon Oct 02 '15 at 14:26
  • I have two vims, the regular one, which has no perl support and vim.gtk which does. vim.gtk -Nes filename << EOF etc works just like ex filename << EOF. However, when I type a perl command at the question mark prompt, I don't get the same response as when I'm inside of vim.gtk. For example the first perl command I want to write is :perl $a{'{'}=1. When I type this at the question mark prompt, with or without the :, I crash out with the error a: undefined variable. When I type it from within vim.gtk, the command works fine. Could you please advise? Thanks – Leo Simon Oct 02 '15 at 14:31

0 Answers0