vimrc设置无法在ConsoleZ中运行的git bash上运行

时间:2015-06-20 05:48:29

标签: python windows git vim git-bash

我已经关注了Python环境的vimrc设置,如果我直接打开GitBash,它可以正常工作:

" 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

但是,当我从ConsoleZ窗口内部运行Git bash时,它似乎无法正常工作。是否还需要进行其他设置? Haven在任何地方都找不到任何相关内容。

1 个答案:

答案 0 :(得分:1)

第一步是确保Git bash是最新的:Git for Windows 2.4.4(PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe,今天提前4小时发布)

我解释为什么64版本的新Git for Windows出现在&#34; Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?&#34;。

启动其bash:

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

然后确保vimrc具有Unix eol(行尾)字符,而不是Windows eol。