Questions tagged [web-mode]

web-mode.el is a major mode for editing HTML templates containing parts (CSS, JavaScript) and blocks (server/client side engines)

Filter by
Sorted by
Tagged with
9
votes
1answer
3k views

How do I set up key bindings for modes in a specific Evil state?

I have a set of key bindings that I use for both web-mode and php-mode in insert mode (of Evil). So I cannot use set-local-map or something. Because in normal mode, the same keys will then call other ...
7
votes
1answer
663 views

Change comment style in web-mode

I am using web-mode 20161003.1327 At the moment when I comment a region in web-mode, it comments like this; /* import chai from 'chai'; * import 'babel-polyfill'; * import configureMockStore from ...
13
votes
2answers
5k views

How do I set up indentation to 2 spaces in web-mode

I just installed web-mode. It works, but the indentation seems to be set to 4 spaces by default. How does one properly set it to 2 spaces?
10
votes
2answers
4k views

Make web-mode always indent with spaces

I am using emacs web-mode, and the tabbing in JS files seems to be acting strangely. I have tab set to indent 2 spaces, but when the indent reaches 8 spaces, web-mode turns them into a tab, and then ...
4
votes
0answers
360 views

Web mode -indentation is misaligned on skipping semicolons

When i indent javascript code (inside html - web mode) that has no semicolons in it, the next statements are indented right with two extra spaces, <script> function processTemplates(){ ...
1
vote
1answer
994 views

How tell web-mode to use tidy syntaxchecker in flycheck?

I have tidy in my setup. When I run HTML-mode as major mode in html file, I do flycheck-verify-setup and I get tidy as syntax checker. the executable is also found. When running web-mode as major ...
1
vote
2answers
876 views

In web-mode PHP block in HTML file doesn't syntax highlight

I'm a emacs beginner, hope this not a stupid question. Here is the issue: when I open a html file that contains php block, every html thing got correct syntax highlight, but the php block. The web-...
1
vote
1answer
212 views

How do I enable/disable flycheck when changing buffer content-type of web-mode

I am using emacs daemon, and with the default config for js, jsx: (flycheck-add-mode 'javascript-eslint 'web-mode) When I edit *.html.erb files, I have an error: Parsing error: Unexpected token at &...