1

I am used working on Vim on Linux, where I use tmux + vim to switch between terminal and vim edit quickly. Now I am trying to setup the same on windows 10.

I try to use gVim on Windows 10, but I like to work in Bash terminal. Windows 10 allows you to download and used it Microsoft Bash terminal. Problem that I have now, is to change in gVim default cmd terminal to Bash terminal, by typing in gVim command :terminal

1

Well, you could change the option shell, see :help :terminal and :help 'shell'. But this means, that you also use shell for all :! commands. I don't know if you want that.

On the other hand, you could just define a new command:

command Bash  terminal ++close bash

The ++close is needed, so Vim closes the terminal window when you exit bash.

  • I tryed your command command Bash terminal ++close bash but I get error CreateProcess fail. Right now I am using gVim on Win10, and I thought that I must change or add a path where I got my bash terminal installed. (As I look up it is in WindowsApps). Right now when I type :terminal gVim split windows and opens cmd. I just want to somehow open bash. – user45189 Feb 5 at 9:55
  • You should replace bash with the full path of your bash executable, like C:/.../bash.exe. – Ralf Feb 5 at 9:58
  • Sorry, was a bad idea to answer a Windows10 question as a Linux guy. You could also check for wsl.exe or ubuntu.exe. If this doesn't work, I'll delete the answer. – Ralf Feb 5 at 10:25
  • could that be a 32bit vs. 64bit issue? – Christian Brabandt Feb 5 at 10:44
  • 1
    Just realized that it might be a duplicate: vi.stackexchange.com/questions/16386/… – Ralf Feb 5 at 12:30

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