Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Programming editors

Name: Anonymous 2012-12-05 11:11

I have used barebones nano since forever.

I've had a look at emacs and it seems good, specially for C and Common Lisp (the only languages I know).

But it seems hard to get everything working well. I wanted pretty colors, tracking of parenthesis/brackets, auto indentation, etc.). Could someone point out how to do it?

Thank you, /prog/

Name: Anonymous 2012-12-05 13:03

>>1
Start by putting stuff in your ~/.emacs file. It's just a Lisp script that gets executed on startup. Some moderately useful options:

(global-set-key "\C-m" 'newline-and-indent)
(global-set-key "\C-j" 'newline)

This swaps the default behavior of enter and Ctrl+J, since the latter auto indents in every language but the former never indents. There are Emacs purists who scoff at me for this but it's one less thing to think about when getting the hang of it, so fuck them. (I also rebind Ctrl+W and Ctrl+U to their Unix/readline counterparts, but that's probably weird.)

There are zillions of Emacs modes for doing things with parentheses. The good ones are on the wiki (http://www.emacswiki.org/emacs/CategoryParentheses) so just go there and read about them. ParEdit is the most useful but also the most Lisp-centric. Show-paren-mode is built in and you can turn it on with a line in your ~/.emacs file:

(show-paren-mode 1)

Getting colors to work right depends on your Emacs version and the terminal you use (if you use one). Personally I find urxvt superior to the awful Gnome terminal, but you might be a masochist, or you might want proportional fonts in Emacs for some incredibly stupid reason. Poke around on the wiki.

Once you do get colors set up, remember that nobody can tell you what color theme to use. Pick up Solarized (google it) or just ask around for load-theme packages if you have Emacs 24.

Name: Anonymous 2012-12-05 17:35

I use geany...

Name: Anonymous 2012-12-05 19:17

Thank you, >>4-san!
Thank you, >>5-san!

I am delighted.

Name: Anonymous 2012-12-05 19:49

op, grow up a little, and learn vi/ex. The macros are delicious.

Name: Anonymous 2012-12-05 20:01

just use vim

Name: Anonymous 2012-12-05 20:06

>>9
shareware is not liked here. m4 is just enough for macros. But if OP can risk shareware, it is a good stepping stone.

Name: 10 2012-12-05 20:07

:s/shareware/charityware/

Name: Anonymous 2012-12-05 20:10

>>10,11

BUGS
     The m4 utility does not recognize multibyte characters.

Name: Anonymous 2012-12-05 20:25

>>8
If you think traditional vi and ex are at all useful compared to vim.... THINK EGIN.

Name: Anonymous 2012-12-05 20:53

>>13
http://ex-vi.sf.net/ has all the features any sane person could possibly want.

Name: Anonymous 2012-12-05 21:00

>>1
Do what everyone else does, and google for examples that do what you want and copy that into your own config.

No-one actually knows how to configure Emacs. It's all just cargo-cult copying bits of other people's configs, hoping for the best and suffering when shit don't work like you want it to.

Then you switch to a better editor.

Name: Anonymous 2012-12-05 21:09

[code]ed

Name: Anonymous 2012-12-05 21:50

at least emacs is not niggerware.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List