2009-01-06 11 views
5

Próbuję teraz http://emacspeak.sourceforge.net teraz, gdy mam go uruchomionego w systemie Windows. Chciałbym używać emacs jako czegoś więcej niż zwykłego edytora tekstów i zastanawiałem się, jakich rozszerzeń/pakietów nie można bez żyć? Języki, których najbardziej używam to Perl, Java i niektóre C/C++.Czy masz rozszerzenia Emacs?

Odpowiedz

2

Podoba mi się color theme i oczywiście tryby dla języków, których używam.

+0

Przez jakiś czas też używałam motywu kolorystycznego, ale znalazłam dziwaczne spowolnienia w trybie cperl. Wyłączenie kolorowego motywu się go pozbyło (mogło to być trochę skomplikowane interakcje osób trzecich, kto wie!). –

2

Lubię być w stanie sprawić, by mój redaktor zachowywał się dokładnie tak, jak chcę. W związku z tym napisałem paczkę pakietów do robienia rzeczy w cale swojego życia. Będę wymienić kilka na dole postu. Standardowe pakiety będę mieć problemy życia bez obejmowałyby:

  • gnus
  • TNT - AOL IM klienta (które pomagają utrzymać)
  • jabber
  • git-emacs
  • wielbłądziej przypadek
  • swbuff (i moje rozszerzenie swbuff-doradcze)
  • dired

I tu są pewne, że napisałem, że mogę nigdy, nigdy żyć bez (dlatego napisałem je):

  • całego line-lub region - wyciąć i wkleić całą linię, gdy region nie jest zdefiniowane
  • CUA-Lite - lite masy opakowania CUA
  • dired-single - ograniczają dired do pojedynczego wielokrotnego użytku buforze
  • Hobo - wymiana tramp, nie w pełni gotowy do głównego czasie

ZA lso, jak wspomina Charlie, po prostu przeglądaj EmacsWiki za każdym razem, kiedy się nudzisz. Zawsze znajdziesz coś nowego do wypróbowania. I czytam gnu.emacs.sources, aby zobaczyć najnowsze i najlepsze, jakie ludzie mają do zaoferowania.

1

jakieś kawałki z mojej nadmiernie dużego pliku .emacs:

(setq inhibit-startup-message t) 

;; window maximized 
(when (fboundp 'w32-send-sys-command) 
(w32-send-sys-command #xf030)) 

;; http://www.emacswiki.org/cgi-bin/wiki/DiredPlus 
(load "dired+") 
(load "w32-browser") ;; open file on current line (etc.) 

;; dired stuff to open files a la Windows from Howard Melman 
(defun dired-execute-file (&optional arg) 
    (interactive "P") 
    (mapcar #'(lambda (file) 
     (w32-shell-execute "open" (convert-standard-filename file))) 
      (dired-get-marked-files nil arg))) 

(defun dired-mouse-execute-file (event) 
    "In dired, execute the file or goto directory name you click on." 
    (interactive "e") 
    (set-buffer (window-buffer (posn-window (event-end event)))) 
    (goto-char (posn-point (event-end event))) 
    (if (file-directory-p (dired-get-filename)) 
     (dired-find-file) 
    (dired-execute-file))) 
(global-set-key [?\C-x mouse-2] 'dired-mouse-execute-file) 


;; push current-line onto kill-ring 
;; http://www.dotemacs.de/dotfiles/SteveMolitor.emacs.html 
(defun push-line() 
    "Select current line, push onto kill ring." 
    (interactive) 
    (save-excursion 
    (copy-region-as-kill (re-search-backward "^") (re-search-forward "$")))) 
(global-set-key "\C-cp" 'push-line) 


;; default groups for ibuffer 
;; http://www.shellarchive.co.uk/content/emacs_tips.html#sec17 
(setq ibuffer-saved-filter-groups 
     (quote (("default" 
       ("dired" (mode . dired-mode)) 
       ("perl" (mode . cperl-mode)) 
       ("java" (mode . java-mode)) 
       ("planner" (or 
          (name . "^\\*Calendar\\*$") 
          (name . "diary"))) 
       ("emacs" (or 
      (mode . help-mode) 
      (mode . occur-mode) 
      (mode . Info-mode) 
      (mode . bookmark-bmenu-mode) 
      (name . "^\\*Apropos\\*$") 
      (name . "^.emacs$") 
      (name . "el$") 
         (name . "^\\*scratch\\*$") 
         (name . "^\\*Messages\\*$") 
      (name . "^\\*Completions\\*$"))) 
      ("vb" (or 
       (mode . visual-basic-mode) 
       (mode . vb-project))) 
      ("BugTracker" (name . ".*btnet.*")) 
       ("gnus" (or 
         (mode . message-mode) 
         (mode . bbdb-mode) 
         (mode . mail-mode) 
         (mode . gnus-group-mode) 
         (mode . gnus-summary-mode) 
         (mode . gnus-article-mode) 
         (name . "^\\.bbdb$") 
         (name . "^\\.newsrc-dribble"))))))) 

;; ibuffer, I like my buffers to be grouped 
(add-hook 'ibuffer-mode-hook 
      (lambda() 
      (ibuffer-switch-to-saved-filter-groups 
      "default"))) 


;; http://www.emacswiki.org/cgi-bin/wiki/CPerlMode 
;; http://www.khngai.com/emacs/perl.php 
;; Use cperl-mode instead of the default perl-mode 
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode)) 
(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode)) 
(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode)) 
(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode)) 

;; daily-tip (or whenever Emacs is launched) 
;; http://emacs.wordpress.com/2007/06/21/tip-of-the-day/ 
(defun totd() 
    (interactive) 
    (random t) ;; seed with time-of-day 
    (with-output-to-temp-buffer "*Tip of the day*" 
    (let* ((commands (loop for s being the symbols 
          when (commandp s) collect s)) 
      (command (nth (random (length commands)) commands))) 
     (princ 
     (concat "Your tip for the day is:\n" 
       "========================\n\n" 
       (describe-function command) 
       "\n\nInvoke with:\n\n" 
       (with-temp-buffer 
       (where-is command t) 
       (buffer-string))))))) 

;; swap slashes and backslashes in current line -- useful for converting paths to be Windows-readable 
;;http://www.xsteve.at/prg/emacs/.emacs.txt 
(defun xsteve-exchange-slash-and-backslash() 
    "Exchanges/with \ and in the current line or in the region when a region-mark is active." 
    (interactive) 
    (save-match-data 
    (save-excursion 
     (let ((replace-count 0) 
      (eol-pos (if mark-active (region-end) (progn (end-of-line) (point)))) 
      (bol-pos (if mark-active (region-beginning) (progn (beginning-of-line) (point))))) 
     (goto-char bol-pos) 
     (while (re-search-forward "/\\|\\\\" eol-pos t) 
      (setq replace-count (+ replace-count 1)) 
      (cond ((string-equal (match-string 0) "/") (replace-match "\\\\" nil nil)) 
       ((string-equal (match-string 0) "\\") (replace-match "/" nil nil))) 
      (message (format "%d changes made." replace-count))))))) 

(global-set-key (kbd "M-\\") 'xsteve-exchange-slash-and-backslash) 

odjazdu: dotfiles.org/.emacs

EmacsWiki: Category DotEmacs

SO: What's in YOUR .emacs?

inne pakiety nie przywoływane powyżej: Elscreen - W3m (przeglądarka tekstowa oparta na emacs)

Powiązane problemy