Jon*_*fer 6 emacs zsh ansi oh-my-zsh spacemacs
我在iTerm2(我使用的是Mac)上有一个漂亮而漂亮的设置,默认的外壳是ZSH,可以使用Oh-my-zsh和Agnoster-fcamblor主题进行正确定制.
作为Spacemacs用户,我想在不离开Emacs的情况下尽可能多地做.所以我决定从里面调用一个终端窗口,因为我习惯使用Vim/tmux.
这是我得到的外观(在同一目录中):
显然主题没有被应用.
这是我的相关部分~/.spacemacs:
(shell :variables
shell-default-shell 'ansi-term
shell-default-height 30
shell-default-term-shell "/bin/zsh"
shell-default-position 'bottom)
Run Code Online (Sandbox Code Playgroud)
一些重要的事情:
$> echo $0向我展示ZSH是在Spacemacs中使用的shell.$> echo $PS1告诉我它设置正确,它与iTerm2相匹配.如何在Spacemacs Shell窗口中应用Oh-my-zsh主题?
我没有尝试让Spacemacs选项覆盖终端选项(无法做到),而是决定将 Spacemacs 主题与我一直在使用的Agnoster-Fcamblor主题相匹配,这样两者都具有相同的颜色和背景(又名皮肤/主题)。
1. dotspacemacs-additional-packages内部:
color-theme-solarized
Run Code Online (Sandbox Code Playgroud)
2. 在dotspacemacs/user-config中:
(defun dotspacemacs/用户配置()
;; Fix separators
(setq ns-use-srgb-colorspace nil)
;; (setq powerline-default-separator 'utf-8)
;; Theme Customizations
(setq theming-modifications
'((solarized
;; Provide a sort of "on-off" modeline whereby the current buffer has a nice
;; bright blue background, and all the others are in cream.
;; TODO: Change to use variables here. However, got error:
;; (Spacemacs) Error in dotspacemacs/user-config: Wrong type argument: stringp, pd-blue
(mode-line :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(powerline-active1 :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(powerline-active2 :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(mode-line-inactive :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
(powerline-inactive1 :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
(powerline-inactive2 :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
;; Make a really prominent helm selection line.
(helm-selection :foreground "white" :background "#2075c7" :inverse-video nil)
;; See comment above about dotspacemacs-colorize-cursor-according-to-state.
(cursor :background "#b58900")
)))
Run Code Online (Sandbox Code Playgroud)