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

Weird autocomplete in Django templates/web-mode #1333

Closed
kennethlove opened this issue Apr 22, 2015 · 11 comments
Closed

Weird autocomplete in Django templates/web-mode #1333

kennethlove opened this issue Apr 22, 2015 · 11 comments

Comments

@kennethlove
Copy link
Contributor

In a Django template, typing {% produces {%|} as expected (with | as the cursor). Once you press space, though, to add the rest of the tag, something is changing the existing tag to {% | %}}. The same happens for {{ tags: {{ <space> produces {{ | }}}}.

@kennethlove
Copy link
Contributor Author

I'm guessing it's a conflict between the standard auto-pairing/closing of things like parentheses and braces and web-mode's auto-pairing/closing of them.

Extra layers enabled:

 dotspacemacs-configuration-layers '(
                                     auto-completion
                                     syntax-checking
                                     python
                                     osx
                                     dash
                                     markdown
                                     git
                                     html
                                     (colors :variables
                                               colors-enable-rainbow-identifiers t
                                               colors-enable-nyan-cat-progress-bar t
                                               )
)

@CestDiego
Copy link
Contributor

I don't see this issue. Is your html file called .html or .djhtml?

@kennethlove
Copy link
Contributor Author

.html. I can record my screen if you'd like.

@CestDiego
Copy link
Contributor

you can use asciinema in terminal emacs. Also you have the asciinema to gif https://github.com/tav/asciinema2gif

@kennethlove
Copy link
Contributor Author

video

@CestDiego
Copy link
Contributor

Just to confirm, you are on branch master right? I think this behaviour changes in

@kennethlove
Copy link
Contributor Author

I am indeed on master. I was using a symlinked version of the python layer (to have my YAPF plugin) but it was up-to-date with master. Just to be sure, I deleted the symlink and re-checked-out the python layer. Same behavior.

@nookiepl
Copy link

+1, same behaviour here.

@nookiepl
Copy link

I've found workaround in smartparens issue tracker.

You need to add

(sp-local-pair 'web-mode "<" nil :actions '(:rem insert))
(sp-local-pair 'web-mode "{" nil :actions '(:rem insert))

to configuration (I've added it to my web-mode-init functon, but don't know if it's correct, excuse me if not, this is my first day with emacs + spacemacs). :P

@StreakyCobra
Copy link
Contributor

Does anybody still has this behaviour?

@StreakyCobra
Copy link
Contributor

This old issue has been waiting for a response for more than one month. As no answer has been provided, we can not help further or know if the issue is still relevant. We are then closing it. Feel free to open a new issue if there is any news on this side, be sure to read this guide first and link this issue in the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants