b4hand
  • Member for 7 years, 3 months
  • Last seen more than a month ago
How do I automatically load a mode for a specific set of file extensions?
Accepted answer
23 votes

Add these lines to your .emacs file: (require 'yaml-mode) (add-to-list 'auto-mode-alist '("\\.ya?ml\\'" . yaml-mode)) The auto-mode-alist is a variable which emacs consults whenever a new file is ...

View answer
How to add a prefix to every line?
9 votes

This is very similar to artagnon's answer, but replace-regexp is not bound to any key. So, I actually use query-replace-regexp which is bound by default to C-M-% and then replace ^ with the given ...

View answer
Using Emacs as a full-featured C/C++ IDE
5 votes

For #4, I highly recommend exuberant-ctags and the built-in tags support, which I have used for years. Alternatively, I just recently have switched to using GNU Global and the ggtags package and have ...

View answer
How can I download a web page's source from Emacs?
5 votes

The w3 mode can do this with the w3-source-document-at-point command which by default is bound to s. You could also use M-! and invoke curl.

View answer
How can I convert hexidecimal values to base 10 in hexl-mode?
3 votes

This answer doesn't really involve emacs per se, but you can use the Unix or GNU od command to solve your problem. In particular, od -f is probably what you are looking for regarding floats and od -t ...

View answer
How do I get my initial frame to be the desired size?
3 votes

This is essentially an addendum to Vamsi's answer which I have discovered after the fact. From the documentation on initial-frame-alist, it says the following: You can specify geometry-related ...

View answer
How to blockquote text in one go
1 votes

You can mark the region to be quoted using C-SPC if in Text mode and use M-; which is bound to comment-dwim and that will prompt you for a "Comment syntax" which you can then enter > in the prompt. ...

View answer
Preserve window arrangement for secondary windows
0 votes

It's possible the answer from this question may be applicable: https://emacs.stackexchange.com/a/338/317 I haven't yet tried it, and am unfamiliar with display-buffer-alist, but maybe this will lead ...

View answer
How can I look up help for a key sequence that I can't type
0 votes

I wasn't aware of any of these more specific solutions, and they probably work better if you want the exact command that is executed by a key. However, for a more general tip on finding help, if you ...

View answer