簡體   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