1 ;; -*- mode: lisp; coding: cp1251 -*- |
1 ;; -*- mode: lisp; coding: cp1251 -*- |
2 ;; |
2 ;; |
3 ;; Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com> |
3 ;; Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com> |
4 ;; |
4 ;; |
5 ;; This file formed from parts from many places and |
5 ;; This file formed from parts and ideas from many sites/docs and |
6 ;; placed in public domain. |
6 ;; placed in public domain. |
7 ;; |
7 ;; |
8 ;; .emacs file for GNU Emacs. |
8 ;; .emacs file for GNU Emacs. |
9 ;; |
9 ;; |
10 ;; ~/.emacs load this file after ~/.emacs-pre, but before ~/.emacs-post. |
10 ;; ~/.emacs load this file after ~/.emacs-pre, but before ~/.emacs-post. |
86 (setq column-number-mode t) |
86 (setq column-number-mode t) |
87 (setq line-number-mode t) |
87 (setq line-number-mode t) |
88 |
88 |
89 (setq view-read-only t) |
89 (setq view-read-only t) |
90 |
90 |
|
91 (setq frame-title-format "Emacs - %b") |
|
92 |
91 ;; ---------------------------------------------------------------------- |
93 ;; ---------------------------------------------------------------------- |
92 ;; Switching, creating, selecting buffers. |
94 ;; Switching, creating, selecting buffers. |
93 (iswitchb-mode 1) |
95 (iswitchb-mode 1) |
94 (setq iswitchb-buffer-ignore '("^ ")) |
96 (setq iswitchb-buffer-ignore nil) |
95 (add-to-list 'iswitchb-buffer-ignore "^\*Buffer") |
97 (mapc (lambda (arg) (add-to-list 'iswitchb-buffer-ignore arg)) |
96 (add-to-list 'iswitchb-buffer-ignore "^\*Completions\*") |
98 '("^ " |
97 (add-to-list 'iswitchb-buffer-ignore "^\*Quail Completions\*") |
99 "^\*Buffer" |
|
100 "^\*Completions\*" |
|
101 "^\*tramp" |
|
102 "^\*Dired log\*" |
|
103 "^\*Help\*" |
|
104 "^\*Quail Completions\*" |
|
105 "^\*Disabled Command\*" |
|
106 "^\*vc\*" |
|
107 )) |
98 |
108 |
99 (require 'uniquify) |
109 (require 'uniquify) |
100 (setq uniquify-buffer-name-style 'post-forward) |
110 (setq uniquify-buffer-name-style 'post-forward) |
101 |
111 |
102 (global-set-key "\C-x\C-b" 'buffer-menu) |
112 (global-set-key "\C-x\C-b" 'buffer-menu) |
103 |
113 |
104 ;; ---------------------------------------------------------------------- |
114 ;; ---------------------------------------------------------------------- |
105 ;; Scrolling |
115 ;; Scrolling |
106 |
116 |
107 ;; гладкий скроллинг с полями |
117 (setq-default |
108 ;; (setq-default scroll-conservatively 70) |
118 ;; 2 - default value |
109 ;; (setq-default scroll-preserve-screen-position 't) |
119 next-screen-context-lines 2 |
110 ;; при перемещении точка останавливается на расстоянии i строк к границе фрейма, |
120 ;; The number of lines to try scrolling a window by when point moves out. |
111 ;; далее скроллиться текст |
121 scroll-step 1 |
112 ;; (setq scroll-margin 2) |
122 scroll-conservatively 100 |
|
123 ;; при перемещении точка останавливается на расстоянии i строк к границе фрейма, |
|
124 scroll-margin 2 |
|
125 scroll-preserve-screen-position t |
|
126 ) |
|
127 |
|
128 ;; ---------------------------------------------------------------------- |
|
129 ;; fringe-mode |
113 |
130 |
114 ;; ---------------------------------------------------------------------- |
131 ;; ---------------------------------------------------------------------- |
115 ;; *Text* |
132 ;; *Text* |
116 (setq default-major-mode 'text-mode) |
133 (setq default-major-mode 'text-mode) |
117 |
134 |
190 |
207 |
191 ;; *Occur* |
208 ;; *Occur* |
192 (global-set-key [f7] 'occur) ; Key binding as in mc |
209 (global-set-key [f7] 'occur) ; Key binding as in mc |
193 |
210 |
194 ;; frames, windows manipulation, switch buffers |
211 ;; frames, windows manipulation, switch buffers |
195 (global-set-key [C-tab] 'other-window) |
|
196 (global-set-key [?\C-x right] 'next-buffer) |
212 (global-set-key [?\C-x right] 'next-buffer) |
197 (global-set-key [?\C-x left] 'previous-buffer) |
213 (global-set-key [?\C-x left] 'previous-buffer) |
198 |
214 |
199 (global-set-key (kbd "C-x C-d") 'dired) |
215 (global-set-key (kbd "C-x C-d") 'dired) |
200 |
216 |
362 ;; ---------------------------------------------------------------------- |
378 ;; ---------------------------------------------------------------------- |
363 ;; Time |
379 ;; Time |
364 |
380 |
365 ;; Also useful such format: |
381 ;; Also useful such format: |
366 ;; (setq display-time-format " %H:%M %d-%m-%y ") |
382 ;; (setq display-time-format " %H:%M %d-%m-%y ") |
367 (setq display-time-24hr-format 0) |
383 (setq display-time-24hr-format t) |
|
384 (setq display-time-default-load-average nil) |
368 (display-time) |
385 (display-time) |
369 |
386 |
370 ;; ---------------------------------------------------------------------- |
387 ;; ---------------------------------------------------------------------- |
371 ;; Calendar |
388 ;; Calendar |
372 ;; (setq mark-holidays-in-calendar t) |
389 ;; (setq mark-holidays-in-calendar t) |
693 (when (featurep 'jabber) |
710 (when (featurep 'jabber) |
694 (setq jabber-history-enabled t |
711 (setq jabber-history-enabled t |
695 jabber-use-global-history nil |
712 jabber-use-global-history nil |
696 jabber-backlog-number 15 |
713 jabber-backlog-number 15 |
697 jabber-backlog-days 30 |
714 jabber-backlog-days 30 |
|
715 jabber-alert-presence-message-function (lambda (who oldstatus newstatus statustext) nil) |
698 ) |
716 ) |
699 ) |
717 ) |
700 |
718 |
701 |
719 |
702 ;; ====================================================================== |
720 ;; ====================================================================== |