(set-language-environment 'UTF-8)
(setq default-input-method 'russian-computer)
(set-selection-coding-system 'windows-1251)
(set-default-coding-systems 'windows-1251)
(prefer-coding-system 'windows-1251)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :background "gray17" :foreground "snow" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "outline" :family "Courier New"))))
'(cursor ((t (:background "peach puff"))))
'(font-lock-comment-delimiter-face ((default (:inherit font-lock-comment-face)) (((class color) (min-colors 16)) (:background "green"))))
'(font-lock-comment-face ((nil nil)))
'(font-lock-doc-face ((t (:inherit font-lock-string-face :background "black")))))
(set-background-color "#333333")
(set-foreground-color "#ffffff")
(autoload 'javascript-mode "javascript" nil t)
(setq auto-mode-alist
(append
'(
( "\\.el$". emacs-lisp-mode)
( ".emacs". emacs-lisp-mode)
( "\\.py$". python-mode)
( "\\.pyw$". python-mode)
( "\\.html$". sgml-mode)
( "\\.xml$". sgml-mode)
( "\\.js$". javascript-mode)
( "\\.cpp$". c++-mode)
( "\\.h$". c++-mode)
)))
(global-font-lock-mode 1) ;; ,
(tool-bar-mode -1) ;;
(setq scroll-step 1) ;; =1
(setq default-tab-width 4) ;; 4
(global-hl-line-mode 1) ;;
(windmove-default-keybindings 'meta) ;;
(fset 'yes-or-no-p 'y-or-np) ;;
(iswitchb-mode 1) ;;
(desktop-save-mode t) ;;
(defun load-config ()
(interactive)
(find-file "~/.emacs"))
(global-set-key "\Cx/" 'load-config)
(global-set-key [(control tab)] 'previous-buffer)
(global-set-key [(control shift tab)] 'next-buffer)
(global-set-key [f4] 'revert-buffer)
(global-set-key [f5] 'call-last-kbd-macro)
(global-set-key [f8] 'linum-mode) ;;
(global-set-key [f11] 'ibuffer)
(global-set-key [f10] 'bookmark-bmenu-list) ;; , Ctrl-D , (C-xrm) .
(global-set-key [?\C-'] 'toggle-truncate-lines) ;; word-wrap -
(global-set-key "\C-cr" 'rename-buffer)
(global-set-key "\Cc!" 'revert-buffer)
(global-set-key "\Cz" 'undo) ;;
(global-set-key "\Cc\Cr" 'replace-string)
(add-hook 'javascript-mode-hook 'linum-mode 'toggle-truncate-lines)
(add-hook 'python-mode-hook 'linum-mode)
Source: https://habr.com/ru/post/83291/
All Articles