Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emacs users.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
miqorz
Veteran
Veteran


Joined: 04 Apr 2004
Posts: 1170
Location: Pissing into the wind.

PostPosted: Fri Aug 20, 2004 3:55 am    Post subject: Emacs users. Reply with quote

I'm a long time vim user.. But I wan't to give emacs a fair chance..

But I can't figure out two things..

How can I get it to be colorful, and how can I use the File menu and stuff ? (Using emacs -nw)

You can see what I'm tallking about in this screenshot.

http://vico.kleinplanet.de/fonts/2003-02-25-224317_433x501_scrot.png

I know that's jed but it still shows what I'm talking about.

I've tried googling this but as usual it left me more confused.
Back to top
View user's profile Send private message
Athas
Guru
Guru


Joined: 04 Sep 2003
Posts: 394
Location: Brøndby, Denmark

PostPosted: Fri Aug 20, 2004 7:36 am    Post subject: Reply with quote

Colors:

Code:
M-x global-font-lock-mode


Remember that your major mode must have some sort of highlight, though.

For the menu, just press F10.
_________________
Emacs-optimized danish console keymap - My .emacs
Climacs - next generation Emacs.
Back to top
View user's profile Send private message
untiefe
Apprentice
Apprentice


Joined: 12 Jan 2004
Posts: 230
Location: the nonexisting Bielefeld, Germany

PostPosted: Fri Aug 20, 2004 7:36 am    Post subject: Reply with quote

Hi!

I don't know about the file menu (I just know all keybord-shortcuts I need) but to get everything colorful, you have to set the font-lock-mode. I just post my .emacs file, so you can see what to set. There is some part for writing ebuilds in color and for auctex as well (emerge =app-emacs/auctex) and for the html-helper (but I never wrote an ebuild for that - its still on my ToDo-list ;-) )

Code:

;; Are we running XEmacs or Emacs?
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))

;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)

;; Turn on font-lock mode for Emacs
(cond ((not running-xemacs)
       (global-font-lock-mode t)
))

;; Visual feedback on selections
(setq-default transient-mark-mode t)


;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)



;; automatischer Zeilenumbruch im Text-Modus nach 72 Zeichen
(setq default-major-mode 'text-mode)
(setq text-mode-hook
      '(lambda nil
         (setq fill-column 72)
         (auto-fill-mode 1)))

;; AUC-TeX (make sure to install the emacs/auctex package)

(load "/usr/share/emacs/site-lisp/site-gentoo")



; highlight matching parentheses next to cursor
(require 'paren)
(show-paren-mode t)

;; Always ask if file should end with a newline
(setq-default require-final-newline "ask")



;; defining stuff for ebuild-editing
(defun ebuild-mode ()
  (shell-script-mode)
  (sh-set-shell "bash")
  (make-local-variable 'tab-width)
  (setq tab-width 4))
(setq auto-mode-alist (cons '("\\.ebuild\\'" . ebuild-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.eclass\\'" . ebuild-mode) auto-mode-alist))


;; load html-helper-mode
;; -> put html-helper-mode.el in: /usr/share/emacs/site-lisp/
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
  (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
  (setq auto-mode-alist (cons '("\\.htm$" . html-helper-mode) auto-mode-alist))
  (setq auto-mode-alist (cons '("\\.wml$" . html-helper-mode) auto-mode-alist))


_________________
"I'm an angel bored like hell
And you're a devil meaning well"

:: Cardigans - You're The Storm ::

glcu - gentoo linux cron update (full featured semi-automatic updates via cron)
Back to top
View user's profile Send private message
miqorz
Veteran
Veteran


Joined: 04 Apr 2004
Posts: 1170
Location: Pissing into the wind.

PostPosted: Fri Aug 20, 2004 8:05 am    Post subject: Reply with quote

Athas wrote:

For the menu, just press F10.


Hmm.. That doesn't seem to work..
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Fri Aug 20, 2004 5:33 pm    Post subject: Reply with quote

oddly enough I am a long time emacs user starting to explore vim in more detail. :)

I don't use the menu much in emacs but when I need to I access it with M-`
Note that this is a different method of accessing the menu than what is shown in your screenshot. you have to use jed to have pull down menus.

add this to your .emacs for basic syntax highlighting:
Code:
(setq font-lock-maximum-decoration t)
(global-font-lock-mode t)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum