I have found subword-mode to interfere negatively with my flow, specially when using drag-stuff, and I'd like to disable it, if not globally, at least for a couple of languages.

I have tried (subword-mode 0) in my custom.el file and it didn't work. I thought about editing other modes manually, and the idea doesn't seem to scale with updates etc.


I know nothing about Prelude, so maybe this won't be helpful, but subword-mode is buffer-local, so if it seems to be active everywhere Prelude is probably using global-subword-mode instead. So try

(global-subword-mode -1)

in your ~/.emacs. You can also try and turn it off selectively in some modes with lines like

(add-hook 'c-mode-hook (lambda () (subword-mode -1)))
(add-hook 'js-mode-hook (lambda () (subword-mode -1)))
| improve this answer | |
  • Interesting. It seems global-subword-mode is not mentionned in the manual, I suggest it should be. Also, global-subword-mode docstring links to subword-mode but the reverse is not true. – JeanPierre Apr 24 '17 at 19:45
  • Sadly neither of the options worked. – MLProgrammer-CiM Apr 24 '17 at 20:00
  • Note it also works for whitespace-mode, auto-fill-mode, etc. – smonff Jun 16 '17 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.