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 window 内部 运行 Git bash 时,它似乎不起作用。还有其他一些设置需要完成吗?在任何地方都找不到任何关于此的信息。
第一步是确保Git bash是最新的:Git for Windows 2.4.4 (PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe
, released今天提前 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 设置,如果我直接打开 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 window 内部 运行 Git bash 时,它似乎不起作用。还有其他一些设置需要完成吗?在任何地方都找不到任何关于此的信息。
第一步是确保Git bash是最新的:Git for Windows 2.4.4 (PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe
, released今天提前 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。