New answers tagged

1

If your goal is to insert a tab character, you can use C-q <tab>, and let the default binding for tab key as is. With C-q you invoke quoted-insert, so the next key is not interpreted as a command, but inserted "verbatim" in the buffer. C-q is also useful in other contexts. For example, to search for tabs character you can type C-s C-q <tab&...


2

When you enter a newline in Python mode, it calls the hook electric-indent-post-self-insert-function. This function calls (eventually) pm-indent-line-dispatcher, provided by polymode to fill the role of indent-according-to-mode. In order for polymode to know what mode you're in, and what the appropriate indentation for that mode is, it needs to know the mode ...


Top 50 recent answers are included