nvim 是否可以针对不同的用例使用两个不同的主题?

问题描述 投票:0回答:1

我是

nvim
(neovim) 的新手。

我使用

mutt
来满足我的邮寄需求。对于编辑器,我使用
nvim
,我正在使用主题
bluz71/vim-nightfly-colors
,但是,我觉得对
/usr/bin/nvim
进行 mutt 调用来编辑图像会有所帮助(例如,
overcache/NeoSolarized
light)主题)。所以,基本上,我希望
mutt
调用具有不同主题的
nvim
编辑器,而不是在其他编辑情况下调用
nvim
时。这可以吗?我们还有其他方法可以做到这一点吗?

更新:按照@lcheylus给出的建议,我制作了一个

.vim/ftplugin/mail.vim
文件并将
colorscheme NeoSolarized
放入其中。 我还在我的
filetype plugin on
中添加了
.config/nvim/init.vim
,然后我确实得到了 Solarized 的黑暗主题。如何获得浅色主题?

我尝试将以下内容添加到我的

.vim/filetype/mail.vim

set termguicolors

colorscheme NeoSolarized


" Default value is "normal", Setting this option to "high" or "low" does use the
" same Solarized palette but simply shifts some values up or down in order to
" expand or compress the tonal range displayed.
let g:neosolarized_contrast = "normal"

" Special characters such as trailing whitespace, tabs, newlines, when displayed
" using ":set list" can be set to one of three levels depending on your needs.
" Default value is "normal". Provide "high" and "low" options.
let g:neosolarized_visibility = "normal"

" I make vertSplitBar a transparent background color. If you like the origin
" solarized vertSplitBar style more, set this value to 0.
let g:neosolarized_vertSplitBgTrans = 1

" If you wish to enable/disable NeoSolarized from displaying bold, underlined
" or italicized" typefaces, simply assign 1 or 0 to the appropriate variable.
" Default values:
let g:neosolarized_bold = 1
let g:neosolarized_underline = 1
let g:neosolarized_italic = 0

" Used to enable/disable "bold as bright" in Neovim terminal. If colors of bold
" text output by commands like `ls` aren't what you expect, you might want to
" try disabling this option. Default value:
let g:neosolarized_termBoldAsBright = 1

这似乎对我有用(在普通 vim 中),可以让我的 NeoSolarized 主题变得明亮,但在我的 mutt 电子邮件编辑器中的 .nvim 中却不起作用。

neovim
1个回答
0
投票

您可以通过

ftplugin/mail.vim
配置文件设置邮件的特定命令(在您的情况下是Mutt)。

通过

ftplugin/mail.vim
,

设置您的配色方案
colorscheme NeoSolarized
© www.soinside.com 2019 - 2024. All rights reserved.