python - vimrc 设置不适用于在 ConsoleZ 中运行的 git bash

标签 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 时,它似乎不起作用。还有其他一些设置需要完成吗?在任何地方都找不到任何关于此的信息。

最佳答案

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

我解释了为什么适用于 Windows 的新 Git 64 位版本出现在“Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?”中。

启动它的 bash:

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

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

关于python - vimrc 设置不适用于在 ConsoleZ 中运行的 git bash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30950750/

相关文章:

python - django-reversion 如何获取用户标识

python - 在 Windows 7 中为 Python 安装 selenium

windows - CMake 错误 : File/cygdrive/. ../src/LLVMBuild.txt 不存在

python - 依赖管理 : subprocess32 needed for Python2. 7

python - 从表中垂直读取抓取的数据,而不是水平读取 Python

python - 使用 pandas/numpy 进行高效的 p​​ython 数据转换

c - 编译 C 程序时出错

git - 使用 Chef 执行 git clone 时如何进行身份验证?

git - 如何回到之前的master分支

git - 组织多个 Scala 相互关联的 sbt 和 git 项目 - 最佳实践建议