LINUX.ORG.RU

Не поможет

(setq auto-save-default nil)
(setq make-backup-files nil)
(setq-default indent-tabs-mode nil)

(setq load-path (cons "/usr/lib64/erlang/lib/tools-2.8.4/emacs" load-path))
(require 'erlang-start)
staseg ★★★★★
()
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/emacs-color-theme-solarized/")
(add-to-list 'load-path "~/.emacs.d/appload/")
(load "package")
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                                                   ("melpa" . "http://melpa.milkbox.net/packages/")))
(require 'ido)
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
      backup-by-copying t    ; Don't delink hardlinks
      version-control t      ; Use version numbers on backups
      delete-old-versions t  ; Automatically delete excess backups
      kept-new-versions 20   ; how many of the newest versions to keep
      kept-old-versions 5    ; and how many of the old
        )
(setq auto-save-file-name-transforms
            `((".*" ,"~/.emacs.d/autosave")))
(ido-mode t)
(add-hook 'python-mode-hook 'auto-complete-mode)
(add-hook 'python-mode-hook 'jedi:ac-setup)
(global-linum-mode t)
(load-theme 'wombat t)
(custom-set-variables
;;JEDI config
;; don't use default keybindings from jedi.el; keep C-. free
(setq py-python-command "/usr/bin/python3")
(setq jedi:setup-keys t)
(setq jedi:tooltip-method nil)
(autoload 'jedi:setup "jedi" nil t)
(add-hook 'python-mode-hook 'jedi:setup)
(defvar jedi:goto-stack '())
(defun jedi:jump-to-definition ()
  (interactive)
  (add-to-list 'jedi:goto-stack
               (list (buffer-name) (point)))
  (jedi:goto-definition))
(defun jedi:jump-back ()
  (interactive)
  (let ((p (pop jedi:goto-stack)))
    (if p (progn
            (switch-to-buffer (nth 0 p))
            (goto-char (nth 1 p))))))
;; redefine jedi's C-. (jedi:goto-definition)
;; to remember position, and set C-, to jump back
(add-hook 'python-mode-hook
          '(lambda ()
             (local-set-key (kbd "C-.") 'jedi:jump-to-definition)
             (local-set-key (kbd "C-,") 'jedi:jump-back)
             (local-set-key (kbd "C-c d") 'jedi:show-doc)
                          (local-set-key (kbd "C-<tab>") 'jedi:complete)))
fang90 ★★★★★
()
Ответ на: комментарий от fang90

дефолтный spacemacs с включенными слоями для некоторых языков и разных плюшек и светлой темой всесто дефолтной темной

f1u77y ★★★★
()
Ответ на: комментарий от f1u77y

spacemacs

wtf?

светлой темой

мимо

включенными слоями для некоторых языков

для одного

что сказать-то хотел?:)

fang90 ★★★★★
()

Сабж поможет

Вот уж точно, что нет :)

aidaho ★★★★★
()

И сразу побеждаю в номинации «дефолт на дефолте и дефолтом погоняет», я в конфиг дописал только одну строчку (убирает тулбар и скролбар):

(tool-bar-mode -1)

Hasek ★★
()
Ответ на: комментарий от Hasek

Клас !
Но, у меня чет убрало только тулбар, пришлось добавить

 (scroll-bar-mode -1)
 

Int0l ★★
()
Ответ на: комментарий от Medar

как может основной инструмент надоесть ? Есть желание потыкать emacs, если понравится, можно на него пересесть.

bryak ★★★★
() автор топика

Сабж не поможет

Сабж.

Camel ★★★★★
()

Инкрементирую непомогаторов. Либо бери какой-нибудь стартер кит, например spacemacs, либо гугли конкретные хотелки и помаленьку пили свой конфиг. Разве что, вот у этого товарища есть куча полезных всем ништяков. Вот его бложек.

feofan ★★★★★
()

что-то как-то много emacs-тем в последние дни.

Конфиги состоят чуть менее, чем полностью из подёрганного в интернетах.

init.el

(package-initialize)
(custom-set-variables
 '(custom-safe-themes
   (quote
    ("119ba989ec49df3784657b41f3b76a820f3ba13afb0bf33f9b44287deaf1f8d4" default)))
 '(erc-nick "debasher")
 '(package-selected-packages
   (quote
    (scala-mode ac-cider debian-changelog-mode github-browse-file nginx-mode erc sql-indent clojure-mode fish-mode lua-mode company-math racer rustfmt cider clojure-mode go-mode rust-mode web-mode python-mode php-mode neotree multiple-cursors markdown-mode jabber gotham-theme dockerfile-mode))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(load "~/.emacs.d/utils.el")
(load "~/.emacs.d/environment.el")
(load "~/.emacs.d/hotkeys.el")
(load-config-by-hostname)

(if window-system (load-theme 'gotham))
environment.el
(set-language-environment 'Russian)
(prefer-coding-system 'utf-8)
(tool-bar-mode -1)
(require 'linum)
(line-number-mode   t)
(global-linum-mode  t)
(column-number-mode t)
(setq linum-format " %d")
(menu-bar-mode -1)
(setq-default fill-column 240)
(show-paren-mode 1)
(cua-mode t)
(setq cua-auto-tabify-rectangles nil)
(transient-mark-mode 1)
(setq cua-keep-region-after-copy t)
(if window-system (scroll-bar-mode 0))
(setq make-backup-files        nil)
(setq auto-save-default        nil)
(setq auto-save-list-file-name nil)
(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)
(setq save-interprogram-paste-before-kill t)
(setq package-archives
      '(("ELPA"      . "http://tromey.com/elpa/")
	("gnu"       . "http://elpa.gnu.org/packages/")
	("marmalade" . "http://marmalade-repo.org/packages/")
	("melpa"     . "https://melpa.org/packages/")))

(add-hook 'window-configuration-change-hook
	   '(lambda ()
	      (setq erc-fill-column (- (window-width) 2))))

(add-hook 'cider-mode-hook #'eldoc-mode)

(require 'ac-cider)

(add-hook 'cider-mode-hook 'ac-flyspell-workaround)
(add-hook 'cider-mode-hook 'ac-cider-setup)
(add-hook 'cider-repl-mode-hook 'ac-cider-setup)
(eval-after-load "auto-complete"
  '(progn
     (add-to-list 'ac-modes 'cider-mode)
     (add-to-list 'ac-modes 'cider-repl-mode)))

(defun set-auto-complete-as-completion-at-point-function ()
  (setq completion-at-point-functions '(auto-complete)))

(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function)
(add-hook 'cider-mode-hook 'set-auto-complete-as-completion-at-point-function)
(add-hook 'cider-mode-hook 'auto-complete-mode)

(setq scroll-step 1)
(volatile-highlights-mode t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)

(cfg:reverse-input-method 'russian-computer)
utils.el
(defun load-config-by-hostname ()
  (load (concat "~/.emacs.d/" (system-name) ".el")))

(defun my-delete-word (arg)
  "Delete characters forward until encountering the end of a word.
With argument, do this that many times.
This command does not push text to `kill-ring'."
  (interactive "p")
  (delete-region
   (point)
   (progn
     (forward-word arg)
     (point))))

(defun my-backward-delete-word (arg)
  "Delete characters backward until encountering the beginning of a word.
With argument, do this that many times.
This command does not push text to `kill-ring'."
  (interactive "p")
  (my-delete-word (- arg)))

(defun my-delete-line ()
  "Delete text from current position to end of line char.
This command does not push text to `kill-ring'."
  (interactive)
  (delete-region
   (point)
   (progn (end-of-line 1) (point)))
  (delete-char 1))

(defun my-delete-line-backward ()
  "Delete text between the beginning of the line to the cursor position.
This command does not push text to `kill-ring'."
  (interactive)
  (let (p1 p2)
    (setq p1 (point))
    (beginning-of-line 1)
    (setq p2 (point))
    (delete-region p1 p2)))

(defun comment-or-uncomment-region-or-line ()
  "Comments or uncomments the region or the current line if there's no active region."
  (interactive)
  (let (beg end)
    (if (region-active-p)
	(setq beg (region-beginning) end (region-end))
      (setq beg (line-beginning-position) end (line-end-position)))
    (comment-or-uncomment-region beg end)
    (next-line)))

(defun volume-up ()
  (interactive)
  (shell-command-to-string "pactl set-sink-volume 0 +5%"))

(defun volume-down ()
  (interactive)
  (shell-command-to-string "pactl set-sink-volume 0 -5%"))

(defun cfg:reverse-input-method (input-method)
  "Build the reverse mapping of single letters from INPUT-METHOD."
  (interactive
   (list (read-input-method-name "Use input method (default current): ")))
  (if (and input-method (symbolp input-method))
      (setq input-method (symbol-name input-method)))
  (let ((current current-input-method)
        (modifiers '(nil (control) (meta) (control meta))))
    (when input-method
      (activate-input-method input-method))
    (when (and current-input-method quail-keyboard-layout)
      (dolist (map (cdr (quail-map)))
        (let* ((to (car map))
               (from (quail-get-translation
                      (cadr map) (char-to-string to) 1)))
          (when (and (characterp from) (characterp to))
            (dolist (mod modifiers)
              (define-key local-function-key-map
                (vector (append mod (list from)))
                (vector (append mod (list to)))))))))
    (when input-method
      (activate-input-method current))))

(defun cfg:page-up ()
  (interactive)
  (condition-case nil (scroll-down)
    (beginning-of-buffer (goto-char (point-min)))))

(defun cfg:page-down ()
  (interactive)
  (condition-case nil (scroll-up)
    (end-of-buffer (goto-char (point-max)))))

(defun copy-file-name-to-clipboard ()
  "Copy the current buffer full file name to the clipboard."
  (interactive)
  (let ((str (if (stringp buffer-file-name)
                 buffer-file-name
               (buffer-name))))
    (when str
      (kill-new str)
      (message "Copied '%s' to the clipboard." str))))

(defun copy-dir-name-to-clipboard ()
  "Copy the current buffer directory name to the clipboard."
  (interactive)
  (let ((str (if (stringp buffer-file-name)
                 (file-name-directory buffer-file-name)
               default-directory)))
    (when str
      (kill-new str)
      (message "Copied '%s' to the clipboard." str))))
hotkeys.el
(global-unset-key (kbd "C-<z>"))
(global-set-key "\C-x\C-z" nil)
(global-set-key (kbd "C-x C-z") nil)
(global-unset-key (kbd "C-<w>"))
(global-unset-key (kbd "M-<z>"))
(global-unset-key (kbd "M-<w>"))
(global-set-key (kbd "M-<down>") 'mc/unmark-next-like-this)
(global-set-key (kbd "M-<up>") 'mc/unmark-previous-like-this)
(global-set-key (kbd "C-<down>") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<up>") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
(global-set-key [C-backspace] 'my-backward-delete-word)
(global-set-key [M-backspace] 'my-backward-delete-word)
(global-set-key (kbd "C-k") 'my-delete-line)
(global-set-key (kbd "M-d") 'my-delete-word)
(global-set-key (kbd "M-k") 'my-delete-line)
(global-set-key (kbd "C-d") 'my-delete-word)
(global-set-key (kbd "s-/") 'comment-or-uncomment-region-or-line)
(global-unset-key (kbd "C-l"))
(global-unset-key (kbd "C-y"))
(global-set-key (kbd "C-l") 'goto-line)
(define-key cua-global-keymap [C-return] #'cider-eval-last-sexp)
(global-set-key (kbd "C-<f4>") 'kill-this-buffer)
(global-set-key (kbd "<XF86AudioLowerVolume>") 'volume-down)
(global-set-key (kbd "<XF86AudioRaiseVolume>") 'volume-up)
(global-unset-key (kbd "C-j"))
(global-unset-key (kbd "C-p"))
(global-unset-key (kbd "C-f"))
(global-unset-key (kbd "C-x C-b"))
(global-unset-key (kbd "C-\\"))
(global-unset-key (kbd "C-h"))
(global-unset-key (kbd "C-u"))
(global-set-key (kbd "<prior>") 'cfg:page-up)
(global-set-key (kbd "<next>") 'cfg:page-down)

Debasher ★★★★★
()

поможет тем, кто хочет на emacs перейти

Таким уже ничего не поможет.

cipher ★★★★★
()
7 июля 2017 г.

хм, ну пожалуйста)

(setq show-paren-style 'expression);;Подсветка скобок
(show-paren-mode 2)

(setq make-backup-files     nil)
(setq make-save-list-file-name   nil)
(setq auto-save-default   nil)

(add-to-list 'load-path "~/.emacs.d/lisp")
(when (>= emacs-major-version 24)
  (require 'package)
  (add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
  (add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)
  (add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/") t)
  (package-initialize))

(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'cyberpunk t)

(require 'imenu)
(setq imenu-auto-rescan      t) ;; автоматически обновлять список функций в буфере
(setq imenu-use-popup-menu nil) ;; диалоги Imenu только в минибуфере
(global-set-key (kbd "<f6>") 'imenu) ;; вызов Imenu на F6
(setq frame-title-format "GNU Emacs: %b")
;;(global-set-key (kbd "TAB") 'tab-to-tab-stop);

(tooltip-mode      -1)
(menu-bar-mode     -1) ;; отключаем графическое меню
(tool-bar-mode     -1) ;; отключаем tool-bar
(scroll-bar-mode   -1) ;; отключаем полосу прокрутки
(blink-cursor-mode 1) ;; курсор не мигает
(setq use-dialog-box     nil) ;; никаких графических диалогов и окон - все через минибуфер
(setq redisplay-dont-pause t)  ;; лучшая отрисовка буфера
(setq ring-bell-function 'ignore) ;; отключить звуковой сигнал
(windmove-default-keybindings 'meta) ;; переключение фокуса буферов


(require 'linum+)
(setq linum-format "%d ")
(global-linum-mode 1)
(column-number-mode t)
(line-number-mode   t)

(setq word-wrap          t) ;; переносить по словам
(global-visual-line-mode t)
(global-set-key (kbd "RET") 'newline-and-indent)
(setq scroll-step               1) ;; вверх-вниз по 1 строке
(setq scroll-margin            10) ;; сдвигать буфер верх/вниз когда курсор в 10 шагах от верхней/нижней границы  
(setq scroll-conservatively 10000)
(defalias 'yes-or-no-p 'y-or-n-p)
(setq x-select-enable-clipboard t)

;;built-in
(require 'ido)
(ido-mode t)
(setq ido-enable-flex-matching t)

(require 'bs)
(setq bs-configurations
      '(("files" "^\\*scratch\\*" nil nil bs-visits-non-file bs-sort-buffer-interns-are-last)))

(global-set-key (kbd "<f2>") 'bs-show)


(add-to-list 'load-path "/home/ovin-off/.emacs.d/auto-complete")
(require 'auto-complete-config)
(ac-config-default)
(add-to-list 'ac-dictionary-directories "/home/ovin-off/.emacs.d/elpa/auto-complete-20170124.1845/dict")
;;(add-to-list 'ac-modes 'web-mode)
;; (add-to-list 'ac-dictionary-directories "/home/ovin-off/.emacs.d/elpa/auto-complete-20170124.1845/dict")
;;dirty fix for having AC everywhere
;; (define-globalized-minor-mode real-global-auto-complete-mode
;;   auto-complete-mode (lambda ()
;;                        (if (not (minibufferp (current-buffer)))
;;                          (auto-complete-mode 1))
;;                        ))
;; (real-global-auto-complete-mode t)
;; (setq web-mode-ac-sources-alist
;;   '(("php" . (ac-source-yasnippet ac-source-php-auto-yasnippets))))


;; (require 'sr-speedbar)
;; (global-set-key (kbd "<f12>") 'sr-speedbar-toggle)
(add-to-list 'load-path "~/.emacs.d/neotree")
  (require 'neotree)
  (global-set-key [f12] 'neotree-toggle)


(add-to-list 'load-path
              "~/.emacs.d/yasnippet")
(require 'yasnippet)
(yas-global-mode t)

;; startup message off
(setq inhibit-startup-message t)

(global-set-key (kbd "<f5>") 'bookmark-set)
(global-set-key (kbd "M-b") 'bookmark-jump)
(global-set-key (kbd "<XF86Favorites>") 'bookmark-bmenu-list)



(require 'web-mode)

;; с какими файлами ассоциировать web-mode
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html\\'" . html-mode))

(require 'lua-mode)
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))


; настройка отступов
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)

; сниппеты и автозакрытие парных скобок
(setq web-mode-extra-snippets '(("erb" . (("name" . ("beg" . "end"))))
                                ))
(setq web-mode-extra-auto-pairs '(("erb" . (("open" "close")))
                                  ))

; подсвечивать текущий элемент
(setq web-mode-enable-current-element-highlight t)



;; Javascript modes
(require 'js2-mode)
(require 'json-mode)
(require 'ac-js2)
(require 'jquery-doc)

;;query syntaxe
(autoload #'espresso-mode "espresso" "Start espresso-mode" t)
(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))

;;ORG-mode
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(global-set-key "\e\el" 'org-store-link)
(global-set-key "\e\ec" 'org-capture)
(global-set-key "\e\ea" 'org-agenda)
(global-set-key "\e\eb" 'org-iswitchb)
 
(setq org-agenda-files (quote ("~/Organisation/")))
 
;my prefer identation
(setq org-startup-indented t)
 
;;logging stuff
(setq org-log-done (quote time))
(setq org-log-into-drawer nil)
(setq org-log-redeadline (quote note))
(setq org-log-reschedule (quote time))
;todo keywords
(setq org-todo-keywords
      (quote ((sequence "TODO(t!)" "NEXT(n!)" "WAITING(w@/!)" "STARTED(s!)" "|" "DONE(d!/!)" "CANCELLED(c@/!)")
              (sequence "QUOTE(Q!)" "QUOTED(D!)" "|" "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)")
              (sequence "OPEN(O!)" "|" "CLOSED(C!)"))))
;;autopair
(require 'autopair)
(autopair-global-mode)
;; Rainbow
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)

;;Emmet
(add-to-list 'load-path "~/.emacs.d/elpa/emmet-mode")
(require 'emmet-mode)
(add-hook 'sqml-mode-hook 'emmet-mode)
(add-hook 'html-mode-hook 'emmet-mode)
(add-hook 'css-mode-hook 'emmet-mode)
(add-hook 'web-mode-hook 'emmet-mode)

sudoLife
()

Самое важное, что всегда использую. Остальное если и ставлю, то только по ситуации.

(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x <left>") 'windmove-left)
(global-set-key (kbd "<f12>") 'buffer-menu)
Norgat ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.