From 67eb02db15d6d544b256a46adc1f3261052db989 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Mon, 29 Jun 2015 16:25:03 +0200 Subject: [PATCH] Aggiunta conf emacs per gnu/linux. --- tools/emacs_linux | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tools/emacs_linux diff --git a/tools/emacs_linux b/tools/emacs_linux new file mode 100644 index 0000000..b4304cd --- /dev/null +++ b/tools/emacs_linux @@ -0,0 +1,53 @@ +(custom-set-variables + ;; custom-set-variables 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. + '(blink-cursor-mode nil) + '(column-number-mode t) + '(tool-bar-mode nil)) +(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. + '(default ((t (:family "Droid Sans Mono" :foundry "unknown" :slant normal :weight normal :height 90 :width normal))))) +(load-theme 'misterioso) + + +(global-linum-mode 1) ; display line numbers in margin +(column-number-mode 1) +(setq make-backup-files nil) ; stop creating backup~ files +(setq auto-save-default nil) ; stop creating #autosave# files +;; save/restore opened files and windows config +(desktop-save-mode 1) ; 0 for off + + +(setq-default tab-width 4) +(setq-default c-basic-offset 4) +(setq-default scroll-conservatively 1) + + +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") t) + +(setq package-enable-at-startup nil) +(package-initialize) + +(require 'autopair) +(autopair-global-mode) + +(require 'auto-complete-config) +(ac-config-default) +(defun my:ac-c-header-init () + (require 'auto-complete-c-headers) + (add-to-list 'ac-sources 'ac-source-c-headers) + (add-to-list 'achead:include-directories '"/usr/include") + (add-to-list 'achead:include-directories '"/usr/local/include")) + +(require 'yasnippet) +(yas-global-mode 1) + +(add-hook 'c++-mode-hook 'my:ac-c-header-init) +(add-hook 'c-mode-hook 'my:ac-c-header-init) -- 2.49.0