2

I've following vimrc settings for Python environment, that works fine if I open GitBash directly:

" enable syntax highlighting
syntax enable

" show line numbers
set number

" set tabs to have 4 spaces
set ts=4

" indent when moving to the next line while writing code
set autoindent

" expand tabs into spaces
set expandtab

" when using the >> or << commands, shift lines by 4 spaces
set shiftwidth=4

" show the matching part of the pair for [] {} and ()
set showmatch

" enable all Python syntax highlighting features
let python_highlight_all = 1

But, when I'm running Git bash from inside ConsoleZ window, it doesn't seem to work. Is there some other settings that needs to be done? Haven't found anything about this anywhere.

Rohit Jain
  • 209,639
  • 45
  • 409
  • 525
  • Would http://stackoverflow.com/a/13238055/6309 help (replacing console2 with consoleZ, which is a fork of console2: https://github.com/cbucher/console) – VonC Jun 20 '15 at 05:55
  • @VonC Doesn't seem to work. Or maybe I didn't understand what $EMULATOR conditional is supposed to do there.. I tried putting all the above settings inside the if condition. I set EMULATOR environment variable in ConsoleZ - gitbash tab as "consoleZ; exec /bin/bash -i" – Rohit Jain Jun 20 '15 at 06:08
  • What version of Git are you using? – VonC Jun 20 '15 at 06:36
  • @VonC version 1.8.4. – Rohit Jain Jun 20 '15 at 06:37
  • That seems ancient. Could you try the 2.4.3 I mentioned in http://stackoverflow.com/a/30864620/6309? The `PortableGit-2.4.3.1-2nd-release-candidate-64-bit\git-bash.exe` one. – VonC Jun 20 '15 at 06:39
  • @VonC That is awesome.. Thank you. BTW, now when I start vim, it shows some error, but it does open up. Error are like: "Not an editor command: ^M E488: Trailing characters: number^M...." so on for the above settings. – Rohit Jain Jun 20 '15 at 06:53
  • @VonC It seems there are already some in-built settings for vim in this version, right? Colors and all? – Rohit Jain Jun 20 '15 at 06:55
  • 1
    Yes, there is already a vim. Regarding your settings, make sure its eol (end of line) format is Unix, not Windows. – VonC Jun 20 '15 at 08:26
  • Thanks @VonC for the help.. Everything fixed now :) Can you club those comments into an answer, so I can accept it. – Rohit Jain Jun 20 '15 at 08:48
  • I tried to Post an answer, but I am on my phone. I will improve it once I am home in a few hours. – VonC Jun 20 '15 at 09:08
  • I have edited the answer. – VonC Jun 20 '15 at 14:35

1 Answers1

1

The first step is to make sure that Git bash is the latest one: Git for Windows 2.4.4 (PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe, released 4 hours earlier today)

I explain why that 64 version of the new Git for Windows came to be in "Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?".

To launch its bash:

c:\path\to\PortableGit-2.4.4.2-3rd-release-candidate-64-bit\git-bash.exe

Then make sure the vimrc has Unix eol (end of line) character, and not Windows eol.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250