无法在 Mutt 中使用 solarized

无法在 Mutt 中使用 solarized

我使用的是 Mavericks+iTerm+zsh+oh-my-zsh。在 iTerm 和 vim 中使用 solarized 没有任何问题。但在 Mutt 中使用 solarized 却有些困难。

根据官方网站的说法,应该是这样的。

在此处输入图片描述

我在 iTerm>Profiles > Terminal Emulation > Report Terminal Type 中有 xterm-256color。

以下是我的 .muttrc。

# A basic .muttrc for use with Gmail

# Change the following six lines to match your Gmail account details
set imap_user = "my email"
set imap_pass = "my pw"
set smtp_url = "smtp://[email protected]:587/"
set smtp_pass = "mypw"
set from = "myemail here"
set realname = "My name"

# Change the following line to a different editor you prefer.
set editor = "nano"

# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set imap_check_subscribed
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[GMail]/Drafts"
set record = "+[GMail]/Sent Mail"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set include
set sort = 'threads'
set sort_aux = 'reverse-last-date-received'
set auto_tag = yes
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc
alternative_order text/plain text/html *
auto_view text/html
bind editor <Tab> complete-query
bind editor ^T complete
bind editor <space> noop 

# Gmail-style keyboard shortcuts
macro index,pager y "<enter-command>unset trash\n <delete-message>" "Gmail archive message"
macro index,pager d "<enter-command>set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n <delete-message>" "Gmail delete message"
macro index,pager gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index,pager ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index,pager gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
macro index,pager gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"

# personal
set send_charset="utf-8"

# URL view
# macro pager \cb <pipe-entry>'w3m'<enter> 'Follow links in w3m'
macro index,pager \cB ": unset wait_key; set pipe_decode\n|w3m\n: set wait_key; unset pipe_decode\n" "call w3m to extract URLs out of a message"

# goobook for gmail contact
# mail address completion
set query_command="goobook query "'%s'"
bind editor <Tab> complete-query
macro index,pager a "<pipe-message>goobook add<return>" "add the sender address to Google contacts"

# color scheme
source ~/.mutt/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc 

# vim-ish keybindings for going to the bottom of things
bind pager "G" bottom

## split window
set pager_index_lines=10

这是我在我的 Mut 身上看到的。

在此处输入图片描述

我想知道我还需要做什么。

提前致谢。

更新

我在读并找到了这条线。

# make sure that you are using mutt linked against slang, not ncurses, or
# suffer the consequences of weird color issues. use "mutt -v" to check this.

当我这样做时mutt -v。我得到了以下内容。

ncurses: ncurses 5.7.20081102 (compiled with 5.7)

所以我想我的问题是我该如何ncurses改变slang

更新 我使用 安装了 Mutt brew install mutt

答案1

我在 iTerm2 中遇到了同样的问题,尽管 iTerm2 本身和 Vim 的 solarized 配色方案工作正常,尽管我的 Mutt 是针对 s-lang 编译的。这篇博文我修改了所有地方mutt-colors-solarized-dark-256.muttrc并将其替换color234default。现在结果似乎正确。我修改后的颜色文件可在此处获取:https://gist.github.com/dpo/b729c4dbe963b33279ab

答案2

你应该像这样安装 mutt:

brew install slang urlview lynx
brew install mutt -–with-s-lang

答案3

尝试:

mkdir ~/.mutt/colors/

然后:复制您下载的 solarized muttrc 文件,例如:

cp ~/.downloads/mutt-colors-solarized-dark-256.muttrc ~/.mutt/colors/

最后:编辑/添加源~/.muttrc,如下所示:

source ~/.mutt/colors/mutt-colors-solarized-dark-256.muttrc

相关内容