Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been using emacs for c programming and now that I want to write some Assmebly code, when I press tab, emacs just inserts the spaces. How can I force it to ident the current line with the Tab key?

share|improve this question

migrated from Oct 1 '12 at 4:02

This question came from our site for professional and enthusiast programmers.

A thousand internets to the person that names an editor that does what I think OP is after in Linux. A "soft whitespace" editor. – Jens Björnhager Sep 30 '12 at 22:07

Try gas-mode instead of the built in asm-mode.

share|improve this answer

Leave it this way. Most editors have an option to convert a tab to spaces. Why would you want the editor to convert tabs to spaces? You can take your code (either in saved file form or copied to clipboard) and use it in any editor and it will look the same. If you force it to use tabs, and you paste it here, or (we) open it in our editor it will most likely look like crap because we might have a tab set up to be a certain size.

If you really must use tabs instead of spaces, just do us a favor and convert the tabs to spaces before you post here or give it to someone else.

share|improve this answer
Sorry, I was probably misunderstood. When pressing the tab key, emacs moves the entire line enough spaces so it could be apropriately idented. – George Stamatiou Sep 30 '12 at 18:16
bugger off, if everyone used tabs we wouldn't have "8 vs. 4. vs. 2" wars. – Miles Rout Jan 16 '14 at 9:06

You must log in to answer this question.