Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch font and theme based on major mode #4718

Closed
yarray opened this issue Jan 21, 2016 · 1 comment
Closed

Switch font and theme based on major mode #4718

yarray opened this issue Jan 21, 2016 · 1 comment
Labels
Question stale marked as a stale issue/pr (usually by a bot) Themes

Comments

@yarray
Copy link

yarray commented Jan 21, 2016

Hi,

First thanks for the fantastic effort of the project. As a vimer it is really thrilling to enjoy the extensibility of Emacs without giving up most benefits of vim.

Currently I use Spacemacs in two scenarios: writing (markdown, LaTeX, etc.) and coding (js, python, R, etc.). I'd like to have different look & feel in the scenarios since the mindsets are also different.

Here is what I am currently trying:

(defun writing-theme()
  (when (window-system)
    (load-theme 'tao-yang t)
    (set-frame-font "Palatino-16" t)))

(add-hook 'markdown-mode-hook 'writing-theme)

The theme can be switched but it has following problems:

  1. The font will not be switched
  2. If I do ec <filename>.md the hook function will not be invoked, where ec is the GUI version of Emacs in OSX.
  3. When fullscreen, the frame cannot fit the screen well with a blank area at the bottom.

If the load-theme is removed, the font switching work as expected, but issue 2 remains.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question stale marked as a stale issue/pr (usually by a bot) Themes
Projects
None yet
Development

No branches or pull requests

2 participants