0

I'm having extreme issues at the moment with evil mode where I am working on Jade/Pug and Stylus files for Node.JS where it is white space sensitive. I installed pug-mode but when you indent via >> the indentation goes 4 spaces and on the 2nd >> the spaces get converted into one tab I think. Backspace isn't even removing the tabwidth of spaces, only the tabs. Also, how do I setup proper indentation with evil-mode for files that are not known to emacs like .styl (stylus) files? I am still new to emacs where I am experiencing hell with this mixed white-space of tabs and spaces along with the non-intuitive indentation.

What I want:

  • tab and >> does the same indentation
  • backspace removes a tabwidth of indentation
  • autoindent when in insert state and carriage returned as well with 'o'
  • no mixed tabs or spaces
  • stylus files having proper indentation with CSS coloring

what it looks like in white-space mode

  • 1
    Honestly, the best way of going at it is creating a proper major mode that sets up the right indentation for you. That's how Evil delegates most of the indentation business, with the notable exception of >. – wasamasa Apr 18 at 7:23
  • How do I go about that? Don't I have to do something for both emacs and evil as well? – user1766555 Apr 18 at 7:26
  • What I mean is, don't I have to create my own mode and modify many variables or functions for both emacs and evil? Do I not use other premade modes? How do I even go about finding what needs to be created or changed? Apropos search for the "indentation" keyword? Read the source code of .el files? What documentation should I use? – user1766555 Apr 18 at 16:43
  • 1
    This is at least two separate questions: 1. How to make pug-mode and >> play together, 2. What to do about files without major modes for them, 3. Your other questions about how to learn how to make major modes – wasamasa Apr 19 at 8:59

Your Answer

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

Browse other questions tagged or ask your own question.