.scss file with emacs web-mode & colorization - emacs

I'm using emacs with web modes and other stuff.
I'm updating my .emacs because I'm working with new tools. One of them is Sass. So, I wanna work with my *.scss files without problem and in fact it works cool. But not perfect. Why?
My emacs has:
(setq web-mode-enable-css-colorization t)
And in my css I can see the colors. But in my scss I can't.
How can I activate css-colorization to scss files?

Maybe this could help.
There is a Major mode for editing SCSS files in Emacs:
https://www.emacswiki.org/emacs/ScssMode

I finally did it.
But it was with a work around. So,
I installed the rainbow-mode from Elpa.
Plus, in my .emacs I added:
(add-hook 'web-mode-hook 'rainbow-mode)
Thanks!

Related

Changing emacs terminal color theme

This might be dumb question but I'm a newbie and having a lot of trouble changing my emacs color scheme. I think i already changed colors for my desktop version of emacs, but whenever i open .c files from terminal, they turn up just plain black and white?
Anyways,
I really want to download the monokai color scheme but I'm really confused on the directions for installation. Would someone mind helping me through with it?
https://github.com/oneKelvinSmith/monokai-emacs
it says to
"Download monokai-theme.el to the directory ~/.emacs.d/themes/. Add this to your .emacs:"
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
How do i download something through emacs? I know it has something to do with adding stuff to the .emacs file...but do i just put it anywhere in there? I know theres already lines in there and I don't want to mess any of that up.
Thanks!
1)Open github.com/oneKelvinSmith/monokai-emacs
2)You have a green button (up right) "clone or download " to download monokai-theme.
3)After downloading, unzip monokai-emacs-master.zip
4)If necessary do : mkdir ~/.emacs.d/themes
5)cd monokai-emacs-master;cp monokai-theme.el ~/.emacs.d/themes/
6)add to your ~/.emacs : (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
7)Inside emacs :M-x load-theme RET monokai (of course RET is return)

How to make minimap run in specified modes?

I installed GNU minimap (version 1.2).
When I open certain type of files , e.g. .py, .c, the minimap comes out as expected.
However, when I open .html file, the minimap is not started.
Is there a way to add additional modes where the minimap automatically shown?
I tried to add hooks to .emacs file but it just starts minimap-mode, but no displaying any minimap.
(add-hook 'html-mode-hook 'minimap-mode)
By default, minimap-mode only works for modes that derive from prog-mode (most modern modes for programming, including python-mode and c-mode). Modify minimap-major-modes if you want to activate it for others, e.g.
(setq minimap-major-modes '(prog-mode html-mode))
or
(add-to-list 'minimap-major-modes 'html-mode)

How do I activate "lisp mode" for cljs files in emacs?

Currently emacs isn't turning on paredit and isn't using any syntax highlighting when I edit .cljs files. It does when I edit .clj files and I want it to treat .cljs similar.
What do I have to do?
If you already have everything working for clojure you can just turn clojure-mode on for the current buffer using
M-x clojure-mode
If you want it turned on automatically you need to add an entry to the Auto Mode AList. In my case, adding the following to init.el did the trick:
(add-to-list 'auto-mode-alist '("\.cljs$" . clojure-mode))
After that you need to reload your init.el (M-x load-file) and re-open the file.

LaTeX-mode hooks not loading in emacs (24.3.50) with AUCTeX (11.87.3)

Since I updated to emacs 24 I cannot get AUCTeX to load the LaTeX-mode hooks, e.g.
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
despite:
C-h m tells me that my major mode is Major mode in AUCTeX for editing LaTeX files.
the AUCTeX mode help states:
Entering LaTeX mode calls the value of `text-mode-hook',
then the value of `TeX-mode-hook', and then the value
of `LaTeX-mode-hook'.
(Indeed, the text-mode hooks are not loaded either.)
Hooks for other modes (e.g. for Markdown or Python) do work.
And, of course, I have tested that manual activation, e.g. M-x visual-line-mode, does work.
Thanks!
This is strange C-hm gives me
Entering Latex mode runs the hook text-mode-hook', then
tex-mode-hook', and finally `latex-mode-hook'.
Notice that it is latex-mode-hook and not LaTeX-mode-hook.
EDIT - I do not have auctex installed maybe that explains why the help messages are different for us, ignore the part above. You can try the below as an alternative
(add-hook 'latex-mode-hook 'visual-line-mode)
As is noted in the comments in the other answer, this issue is caused by AucTeX being unable to create XPM images. This occurs when when Emacs is not compiled with the libxpm library, which might be the case when you run Emacs primarily inside your favorite terminal emulator.
Anyways, you can still correct this issue without recompiling Emacs. In fact, the images are only used for the AucTeX toolbar. Thus, disabling it will effectively remove the problem altogether. You can do this by adding:
(unless (image-type-available-p 'xpm)
(setq LaTeX-enable-toolbar nil))
To your .emacs (or .emacs.d/init.el) file.
This snippet simply checks if XPM images are available in the Emacs installation and if not, it disables the toolbar.

emacs 24 ansi-term seems to ignore theme colors

I have upgraded to Emacs 24 from Emacs 23 on OSX using brew. Right now, I'm updating my .emacs to use the new stuff from emacs 24 esp. the new package manager and the built-in color themes. I installed the zenburn theme from marmalade (I think), deleted the old color-theme extension from my extensions directory, and removed my configuration which adds the old color-theme extension to the load path.
One thing I have noticed is that ansi-term colors does not follow the color theme. In emacs 23, my ansi-term looked like this:
But now it looks like this:
I have checked ansi-color-names-vector and ansi-color-map. Both of them reports colors from zenburn. Switching themes still do not change the ansi-term colors, so I think this is not a theme specific problem.
Any ideas how I can fix this problem?
The variable ansi-term-color-vector was not set in the new version of the zenburn-theme. I submitted a pull request to fix it.
In the mean time just use the following line:
(setq ansi-term-color-vector [unspecified "#3f3f3f" "#cc9393" "#7f9f7f" "#f0dfaf" "#8cd0d3" "#dc8cc3" "#93e0e3" "#dcdccc"])
The external color-theme requires no configuration to work well. Just save your color theme using color-theme-print, and insert its output FUNCTION in .emacs, and this one:
(and
(eq window-system 'x)
(color-theme-FUNCTION) )