Emacs

From StrelaWiki
Jump to navigation Jump to search

Emacs

$ git clone --depth 1 git://git.savannah.gnu.org/emacs.git
$ bzr branch bzr://bzr.savannah.gnu.org/emacs/trunk
emacs %F --geometry=80x67-0+0

~/.emacs

(set-default-font "DejaVu Sans Mono-10")

alebo ten isty efekt (vratane velkosti fontu) so suborom /usr/share/X11/app-defaults/Emacs

Emacs*Font: -unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso8859-1

aky konkretny font prave pouzivam zistim C-u C-x =

Emacs-ovaie

M-x => function
C-h v var RET => variable value
C-h f fun RET => function value
M-x set-variable RET var RET value RET => set variable value
M-x load-file RET ~/.emacs RET => reload .emacs file without restarting

nastavenie premenej (LISP):

(setq-default fill-column 75)
(setq line-number-mode nil)
(setq column-number-mode t)
(setq default-input-method "cyrillic-yawerty")
(setq flyspell-default-dictionary "ru-lebedev-io")

nastavenie premenej (v konkretnom subore):

-*- mode: name; var: value; ... -*-

-*- mode: C; coding: latin-1; -*-
-*- mode: Lisp; fill-column: 75; comment-column: 50; -*-
-*- coding: utf-8 -*-
-*- mode: LaTeX; coding: utf-8; -*-

M-x prefer-coding-system RET SPC

(prefer-coding-system 'utf-8)

M-x set-input-method RET SPC <=> C-\

(set-input-method 'cyrillic-yawerty)

M-x set-language-environment RET SPC

(set-language-environment 'Latin-1) 			 ;; Latin-1 nazov variable
(set-language-environment "Latin-1") 			 ;; konkretna hodnota
(set-language-environment 'UTF-8)

M-x set-default-font RET

(set-default-font "Bitstream Vera Sans Mono-8")
(set-default-font 'Bitstream Vera Sans Mono-8) 	 ;; nefunguje, neexistujuca variable

M-x flyspell-mode RET

(flyspell-mode t)


(load "/free2/mucha/other/root-help.el.new")
(add-to-list 'load-path (expand-file-name "/free2/mucha/other"))
(load "root-help.el.new") 		 ;; priamy load
(require 'root-help) 			 ;; alebo pomocou require

C-x b Select or create a buffer named buffer (switch-to-buffer)
M-x c-set-style Customizing C Indentation

M-x linum-mode LineNumbers
M-/ pripadne C-M-/ Dynamic Abbrev Expansion

Spelling

Pouzivanie spell checker(s) v Emacs-e

AUCTeX

$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex co auctex
$ cd auctex
$ ./autogen.sh
$ ./configure
$ make
$ make install

BibTeX

.emacs

wget https://raw.github.com/gist/413006/.emacs -O ~/.emacs