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 nil) |
96 (setq iswitchb-buffer-ignore nil) |
95 (mapc (lambda (arg) (add-to-list 'iswitchb-buffer-ignore arg)) |
97 (mapc (lambda (arg) (add-to-list 'iswitchb-buffer-ignore arg)) |
110 (global-set-key "\C-x\C-b" 'buffer-menu) |
112 (global-set-key "\C-x\C-b" 'buffer-menu) |
111 |
113 |
112 ;; ---------------------------------------------------------------------- |
114 ;; ---------------------------------------------------------------------- |
113 ;; Scrolling |
115 ;; Scrolling |
114 |
116 |
115 ;; гладкий скроллинг с полями |
117 (setq-default |
116 ;; (setq-default scroll-conservatively 70) |
118 ;; 2 - default value |
117 ;; (setq-default scroll-preserve-screen-position 't) |
119 next-screen-context-lines 2 |
118 ;; при перемещении точка останавливается на расстоянии i строк к границе фрейма, |
120 ;; The number of lines to try scrolling a window by when point moves out. |
119 ;; далее скроллиться текст |
121 scroll-step 1 |
120 ;; (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 |
121 |
130 |
122 ;; ---------------------------------------------------------------------- |
131 ;; ---------------------------------------------------------------------- |
123 ;; *Text* |
132 ;; *Text* |
124 (setq default-major-mode 'text-mode) |
133 (setq default-major-mode 'text-mode) |
125 |
134 |
199 |
208 |
200 ;; *Occur* |
209 ;; *Occur* |
201 (global-set-key [f7] 'occur) ; Key binding as in mc |
210 (global-set-key [f7] 'occur) ; Key binding as in mc |
202 |
211 |
203 ;; frames, windows manipulation, switch buffers |
212 ;; frames, windows manipulation, switch buffers |
204 (global-set-key [C-tab] 'other-window) |
|
205 (global-set-key [?\C-x right] 'next-buffer) |
213 (global-set-key [?\C-x right] 'next-buffer) |
206 (global-set-key [?\C-x left] 'previous-buffer) |
214 (global-set-key [?\C-x left] 'previous-buffer) |
207 |
215 |
208 (global-set-key (kbd "C-x C-d") 'dired) |
216 (global-set-key (kbd "C-x C-d") 'dired) |
209 |
217 |
804 ;; ---------------------------------------------------------------------- |
812 ;; ---------------------------------------------------------------------- |
805 ;; C, c-lang |
813 ;; C, c-lang |
806 (setq c-echo-syntactic-information-p t) |
814 (setq c-echo-syntactic-information-p t) |
807 |
815 |
808 (defconst my-c-style |
816 (defconst my-c-style |
809 '((c-tab-always-indent . t) |
817 '((c-tab-always-indent . t) |
810 (c-comment-only-line-offset . 4) |
818 (c-comment-only-line-offset . 4) |
811 (c-hanging-braces-alist . ((substatement-open after) |
819 (c-hanging-braces-alist |
812 (brace-list-open))) |
820 . ( |
813 (c-hanging-colons-alist . ((member-init-intro before) |
821 (brace-list-open) |
814 (inher-intro) |
822 (substatement-open after) |
815 (case-label after) |
823 )) |
816 (label after) |
824 (c-hanging-colons-alist |
817 (access-label after))) |
825 . ( |
818 (c-cleanup-list . (scope-operator |
826 (access-label after) |
819 empty-defun-braces |
827 (case-label after) |
820 defun-close-semi)) |
828 (inher-intro) |
821 (c-offsets-alist . ((arglist-intro . ++) |
829 (label after) |
822 (arglist-close . c-lineup-arglist) |
830 (member-init-intro before) |
823 (arglist-cont-nonempty . ++) |
831 )) |
824 (statement-block-intro . +) |
832 (c-cleanup-list |
825 (inline-open . 0) |
833 . ( |
826 (inexpr-class . 0) |
834 defun-close-semi |
827 (statement-cont . ++) |
835 empty-defun-braces |
828 (label . 0) |
836 scope-operator |
829 (substatement-open . 0) |
837 )) |
830 (case-label . 0) |
838 (c-offsets-alist |
831 (block-open . 0) |
839 . ( |
832 (comment-intro . 0) |
840 (arglist-close . c-lineup-arglist) |
833 (knr-argdecl-intro . -))) |
841 (arglist-cont-nonempty . ++) |
|
842 (arglist-intro . ++) |
|
843 (block-open . 0) |
|
844 (case-label . 0) |
|
845 (comment-intro . 0) |
|
846 (func-decl-cont . ++) |
|
847 (inexpr-class . 0) |
|
848 (inline-open . 0) |
|
849 (knr-argdecl-intro . -) |
|
850 (label . 0) |
|
851 (statement-block-intro . +) |
|
852 (statement-cont . ++) |
|
853 (substatement-open . 0) |
|
854 )) |
834 (c-echo-syntactic-information-p . t)) |
855 (c-echo-syntactic-information-p . t)) |
835 "My C Programming Style") |
856 "My C Programming Style") |
836 |
857 |
837 ;; (objc-mode . "my-mode") (c++-mode . "cc-mode") |
858 ;; (objc-mode . "my-mode") (c++-mode . "cc-mode") |
838 (add-hook 'c-initialization-hook (lambda () |
859 (add-hook 'c-mode-common-hook |
839 (c-add-style "my" my-c-style t))) |
860 (lambda () (c-add-style "my" my-c-style t))) |
840 (setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (other . "my"))) |
861 (setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (other . "my"))) |
841 |
862 |
842 ;; Customizations for all modes in CC Mode. |
863 ;; Customizations for all modes in CC Mode. |
843 ;; (defun my-c-mode-common-hook () |
864 ;; (defun my-c-mode-common-hook () |
844 ;; ;; add my personal style and set it for the current buffer |
865 ;; ;; add my personal style and set it for the current buffer |