繁体   English   中英

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

[英]vimrc settings not working on git bash running in ConsoleZ

我遵循了 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 版本出现在“为什么如果你从网上下载 Git 2.0,你总是得到一个 1.9.4 安装程序包? ”。

要启动它的 bash:

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM