Update.
This commit is contained in:
parent
0cc7d1ced5
commit
60361bc254
10
README.md
10
README.md
@ -1,2 +1,8 @@
|
||||
Jeff's dotfiles
|
||||
===============
|
||||
# Jeff's dotfiles
|
||||
|
||||
My dotfiles for awesome, emacs, vim, zsh, tmux,...
|
||||
|
||||
## Externals / Librairies used
|
||||
* [dotbot](https://github.com/anishathalye/dotbot/)
|
||||
* [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
|
||||
* [vim-plug](https://github.com/junegunn/vim-plug)
|
||||
|
266
emacs/emacs
266
emacs/emacs
@ -34,7 +34,7 @@
|
||||
;;
|
||||
;; User details
|
||||
(setq user-full-name "Jeff LANCE"
|
||||
user-mail-address "jeff.lance@mala.fr")
|
||||
user-mail-address "jeff.lance@mala.fr")
|
||||
|
||||
;; My directory Location
|
||||
(defconst jeff/emacsd (concat (getenv "HOME") "/.emacs.d/"))
|
||||
@ -65,7 +65,7 @@
|
||||
;; LaTeX file with LuaLaTeX.
|
||||
(setenv "LC_ALL" "fr_FR.UTF-8")
|
||||
|
||||
|
||||
|
||||
|
||||
;; ____ _____ _ ____ _____ _ _ ____
|
||||
;; / ___|_ _|/ \ | _ \_ _| | | | | _ \
|
||||
@ -75,8 +75,8 @@
|
||||
;;
|
||||
;; Splash screen
|
||||
(setq inhibit-splash-screen t
|
||||
initial-scratch-message nil
|
||||
initial-major-mode 'org-mode)
|
||||
initial-scratch-message nil
|
||||
initial-major-mode 'org-mode)
|
||||
|
||||
;; Scroll bar, menu bar, tool bar
|
||||
(scroll-bar-mode -1)
|
||||
@ -98,12 +98,12 @@
|
||||
|
||||
;; Column and line numbers
|
||||
(setq column-number-mode t
|
||||
line-number-mode t)
|
||||
line-number-mode t)
|
||||
|
||||
;; Indentation
|
||||
; no tabs for indentation but two spaces.
|
||||
(setq tab-width 2
|
||||
indent-tabs-mode nil)
|
||||
indent-tabs-mode nil)
|
||||
; make tab key do indent first then completion.
|
||||
(setq-default tab-always-indent 'complete)
|
||||
|
||||
@ -120,10 +120,10 @@
|
||||
;;
|
||||
;; Package Manager
|
||||
(require 'package)
|
||||
(setq package-archives '(("org" . "http://orgmode.org/elpa/")
|
||||
("gnu" . "http://elpa.gnu.org/packages/")
|
||||
("melpa" . "http://melpa.org/packages/")
|
||||
("marmalade" . "http://marmalade-repo.org/packages/")))
|
||||
(setq package-archives '(("org" . "http://orgmode.org/elpa/")
|
||||
("gnu" . "http://elpa.gnu.org/packages/")
|
||||
("melpa" . "http://melpa.org/packages/")
|
||||
("marmalade" . "http://marmalade-repo.org/packages/")))
|
||||
(package-initialize)
|
||||
(if (is-connected-to) (package-refresh-contents)) ; package refresh if we are connected.
|
||||
|
||||
@ -139,10 +139,10 @@
|
||||
:mode ("\\.tex\\'" . latex-mode)
|
||||
:commands (latex-mode LaTeX-mode plain-tex-mode)
|
||||
:init
|
||||
(progn
|
||||
(eval-after-load "tex"
|
||||
'(add-to-list 'TeX-command-list
|
||||
'("LatexMk Clean" "latexmk -lualatex %t && latexmk -c %t" TeX-run-command)))
|
||||
(progn
|
||||
(eval-after-load "tex"
|
||||
'(add-to-list 'TeX-command-list
|
||||
'("LatexMk Clean" "latexmk -lualatex %t && latexmk -c %t" TeX-run-command)))
|
||||
;; (add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup)
|
||||
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
|
||||
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
|
||||
@ -158,42 +158,42 @@
|
||||
(use-package auctex-latexmk
|
||||
:ensure t
|
||||
:config
|
||||
(auctex-latexmk-setup))
|
||||
(auctex-latexmk-setup))
|
||||
|
||||
;; Yasnippet
|
||||
;; Needed to load yasnippet before auto-complete to make them work together.
|
||||
(use-package yasnippet
|
||||
:ensure t
|
||||
:init
|
||||
(unless (package-installed-p 'yasnippet-snippets)
|
||||
(unless (package-installed-p 'yasnippet-snippets)
|
||||
(package-refresh-contents)
|
||||
(package-install 'yasnippet-snippets))
|
||||
:config
|
||||
(yas-global-mode 1))
|
||||
(yas-global-mode 1))
|
||||
|
||||
;; Auto-complete
|
||||
(use-package auto-complete
|
||||
:ensure t
|
||||
:config
|
||||
(add-to-list 'ac-dictionary-directories (concat jeff/emacsd "ac-dict"))
|
||||
(setq ac-comphist-file (concat jeff/emacsd "ac-comphist.dat"))
|
||||
(ac-config-default)
|
||||
(ac-set-trigger-key "TAB")
|
||||
(ac-set-trigger-key "<tab>")
|
||||
(global-auto-complete-mode t)
|
||||
(auto-complete-mode))
|
||||
(add-to-list 'ac-dictionary-directories (concat jeff/emacsd "ac-dict"))
|
||||
(setq ac-comphist-file (concat jeff/emacsd "ac-comphist.dat"))
|
||||
(ac-config-default)
|
||||
(ac-set-trigger-key "TAB")
|
||||
(ac-set-trigger-key "<tab>")
|
||||
(global-auto-complete-mode t)
|
||||
(auto-complete-mode))
|
||||
|
||||
;; Auto-insert
|
||||
(use-package autoinsert
|
||||
:init
|
||||
(setq auto-insert-query nil)
|
||||
(setq auto-insert-directory (concat jeff/emacsd "my-templates/"))
|
||||
(add-hook 'find-file-hook 'auto-insert)
|
||||
(auto-insert-mode 1)
|
||||
(setq auto-insert-query nil)
|
||||
(setq auto-insert-directory (concat jeff/emacsd "my-templates/"))
|
||||
(add-hook 'find-file-hook 'auto-insert)
|
||||
(auto-insert-mode 1)
|
||||
:config
|
||||
(define-auto-insert "\\.py" ["python.py" my-autoinsert-yas-expand])
|
||||
(define-auto-insert "\\.sh" ["shellscript.sh" my-autoinsert-yas-expand])
|
||||
(define-auto-insert "\\.yml" ["yaml.yml" my-autoinsert-yas-expand]))
|
||||
(define-auto-insert "\\.py" ["python.py" my-autoinsert-yas-expand])
|
||||
(define-auto-insert "\\.sh" ["shellscript.sh" my-autoinsert-yas-expand])
|
||||
(define-auto-insert "\\.yml" ["yaml.yml" my-autoinsert-yas-expand]))
|
||||
|
||||
;; Better-defaults
|
||||
(use-package better-defaults
|
||||
@ -201,11 +201,11 @@
|
||||
|
||||
;; Darkroom-mode
|
||||
(use-package darkroom-mode
|
||||
:load-path "elisp/darkroom-mode"
|
||||
:config
|
||||
(setq darkroom-mode-face-foreground "Inconsolata 15")
|
||||
(setq darkroom-mode-face-size 150)
|
||||
(setq darkroom-mode-center-margin 150))
|
||||
:load-path "elisp/darkroom-mode"
|
||||
:config
|
||||
(setq darkroom-mode-face-foreground "Inconsolata 15")
|
||||
(setq darkroom-mode-face-size 150)
|
||||
(setq darkroom-mode-center-margin 150))
|
||||
|
||||
;; Deft
|
||||
(use-package deft
|
||||
@ -222,16 +222,16 @@
|
||||
(use-package elpy
|
||||
:ensure t
|
||||
:config
|
||||
(elpy-enable))
|
||||
(elpy-enable))
|
||||
|
||||
;; Exec-path-from-shell
|
||||
(use-package exec-path-from-shell
|
||||
; :if (memq window-system '(mac ns))
|
||||
:ensure t
|
||||
:config
|
||||
(exec-path-from-shell-copy-env "TEXPATH")
|
||||
(setq exec-path-from-shell-check-startup-files nil)
|
||||
(exec-path-from-shell-initialize))
|
||||
(exec-path-from-shell-copy-env "TEXPATH")
|
||||
(setq exec-path-from-shell-check-startup-files nil)
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
;; Flycheck
|
||||
(use-package flycheck
|
||||
@ -247,10 +247,10 @@
|
||||
:ensure t
|
||||
:pin melpa
|
||||
:config
|
||||
(hlinum-activate)
|
||||
(setq linum-format "%4d \u2502")
|
||||
(setq linum-highlight-face "#bc0744")
|
||||
(global-linum-mode 1))
|
||||
(hlinum-activate)
|
||||
(setq linum-format "%4d \u2502")
|
||||
(setq linum-highlight-face "#bc0744")
|
||||
(global-linum-mode 1))
|
||||
|
||||
;; Lua-mode
|
||||
(use-package lua-mode
|
||||
@ -258,7 +258,7 @@
|
||||
:pin melpa
|
||||
:mode ("\\.lua\\'")
|
||||
:config
|
||||
(setq lua-indent-level 2))
|
||||
(setq lua-indent-level 2))
|
||||
|
||||
;; Magit
|
||||
(use-package magit
|
||||
@ -272,10 +272,10 @@
|
||||
("\\.md\\'" . markdown-mode)
|
||||
("\\.markdown\\'" . markdown-mode))
|
||||
:init
|
||||
(setq markdown-command "multimarkdown")
|
||||
(unless (package-installed-p 'markdown-preview-mode)
|
||||
(package-refresh-contents)
|
||||
(package-install 'markdown-preview-mode)))
|
||||
(setq markdown-command "multimarkdown")
|
||||
(unless (package-installed-p 'markdown-preview-mode)
|
||||
(package-refresh-contents)
|
||||
(package-install 'markdown-preview-mode)))
|
||||
(eval-after-load "markdown-mode"
|
||||
'(defalias 'markdown-add-xhtml-header-and-footer 'my-markdown-add-xhtml-header-and-footer))
|
||||
|
||||
@ -283,12 +283,12 @@
|
||||
(use-package neotree
|
||||
:ensure t
|
||||
:init
|
||||
(unless (package-installed-p 'all-the-icons)
|
||||
(package-refresh-contents)
|
||||
(package-install 'all-the-icons)
|
||||
(all-the-icons-install-fonts))
|
||||
(unless (package-installed-p 'all-the-icons)
|
||||
(package-refresh-contents)
|
||||
(package-install 'all-the-icons)
|
||||
(all-the-icons-install-fonts))
|
||||
:config
|
||||
(setq neo-theme (if (display-graphic-p) 'nerd 'arrow)))
|
||||
(setq neo-theme (if (display-graphic-p) 'nerd 'arrow)))
|
||||
|
||||
;; Org
|
||||
(use-package org
|
||||
@ -296,91 +296,91 @@
|
||||
:pin org
|
||||
:mode ("\\.org\\'" . org-mode)
|
||||
:init
|
||||
(unless (package-installed-p 'org-plus-contrib)
|
||||
(package-refresh-contents)
|
||||
(package-install 'org-plus-contrib))
|
||||
(unless (package-installed-p 'org-bullets)
|
||||
(package-refresh-contents)
|
||||
(package-install 'org-bullets))
|
||||
(unless (package-installed-p 'org-ac)
|
||||
(package-refresh-contents)
|
||||
(package-install 'org-ac))
|
||||
(unless (package-installed-p 'org-plus-contrib)
|
||||
(package-refresh-contents)
|
||||
(package-install 'org-plus-contrib))
|
||||
(unless (package-installed-p 'org-bullets)
|
||||
(package-refresh-contents)
|
||||
(package-install 'org-bullets))
|
||||
(unless (package-installed-p 'org-ac)
|
||||
(package-refresh-contents)
|
||||
(package-install 'org-ac))
|
||||
:config
|
||||
(require 'ox-latex)
|
||||
(require 'ob-ditaa)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
(setq org-log-done t)
|
||||
(setq org-list-allow-alphabetical t)
|
||||
(setq org-agenda-files (file-expand-wildcards "~/Notes/*.org"))
|
||||
(setq org-tag-alist
|
||||
'((:startgroup . nil)
|
||||
("@TRAVAIL" . ?t)
|
||||
("@MAISON" . ?m)
|
||||
(:endgroup . nil)
|
||||
(:startgroup . nil)
|
||||
("ADMINISTRATIF" . ?a)
|
||||
("COURS" . ?c)
|
||||
("RECHERCHE" . ?r)
|
||||
("DEV" . ?d)
|
||||
("OS" . ?o)
|
||||
("WWW" . ?w)
|
||||
(:endgroup . nil)
|
||||
(:startgroup . nil)
|
||||
("EASY" . ?1)
|
||||
("MEDIUM" . ?2)
|
||||
("HARD" . ?3)
|
||||
(:endgroup . nil)
|
||||
("URGENT" . ?u)
|
||||
(require 'ox-latex)
|
||||
(require 'ob-ditaa)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
(setq org-log-done t)
|
||||
(setq org-list-allow-alphabetical t)
|
||||
(setq org-agenda-files (file-expand-wildcards "~/Notes/*.org"))
|
||||
(setq org-tag-alist
|
||||
'((:startgroup . nil)
|
||||
("@TRAVAIL" . ?t)
|
||||
("@MAISON" . ?m)
|
||||
(:endgroup . nil)
|
||||
(:startgroup . nil)
|
||||
("ADMINISTRATIF" . ?a)
|
||||
("COURS" . ?c)
|
||||
("RECHERCHE" . ?r)
|
||||
("DEV" . ?d)
|
||||
("OS" . ?o)
|
||||
("WWW" . ?w)
|
||||
(:endgroup . nil)
|
||||
(:startgroup . nil)
|
||||
("EASY" . ?1)
|
||||
("MEDIUM" . ?2)
|
||||
("HARD" . ?3)
|
||||
(:endgroup . nil)
|
||||
("URGENT" . ?u)
|
||||
)
|
||||
)
|
||||
)
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((ditaa . t))) ; this line activates ditaa
|
||||
(setq org-support-shift-select 'always)
|
||||
(setq org-latex-compiler "lualatex")
|
||||
(setq org-latex-pdf-process
|
||||
'("lualatex -shell-escape -synctex=1 -interaction nonstopmode %f"
|
||||
"lualatex -shell-escape -synctex=1 -interaction nonstopmode %f"))
|
||||
;(setq org-latex-pdf-process '("latexmk -f %f"))
|
||||
(setq org-export-with-toc nil)
|
||||
(add-to-list 'org-latex-classes
|
||||
'("devoir"
|
||||
"\\documentclass{cours_devoir}"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||
(add-to-list 'org-latex-classes
|
||||
'("cours_prof"
|
||||
"\\documentclass{cours_prof}"))
|
||||
(add-to-list 'org-latex-classes
|
||||
'("cours_beamer"
|
||||
"\\documentclass{cours_beamer}")))
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((ditaa . t))) ; this line activates ditaa
|
||||
(setq org-support-shift-select 'always)
|
||||
(setq org-latex-compiler "lualatex")
|
||||
(setq org-latex-pdf-process
|
||||
'("lualatex -shell-escape -synctex=1 -interaction nonstopmode %f"
|
||||
"lualatex -shell-escape -synctex=1 -interaction nonstopmode %f"))
|
||||
;(setq org-latex-pdf-process '("latexmk -f %f"))
|
||||
(setq org-export-with-toc nil)
|
||||
(add-to-list 'org-latex-classes
|
||||
'("devoir"
|
||||
"\\documentclass{cours_devoir}"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||
(add-to-list 'org-latex-classes
|
||||
'("cours_prof"
|
||||
"\\documentclass{cours_prof}"))
|
||||
(add-to-list 'org-latex-classes
|
||||
'("cours_beamer"
|
||||
"\\documentclass{cours_beamer}")))
|
||||
|
||||
;; Pc-bufsw
|
||||
(use-package pc-bufsw
|
||||
:ensure t
|
||||
:config
|
||||
(pc-bufsw-default-keybindings))
|
||||
(pc-bufsw-default-keybindings))
|
||||
|
||||
;; Powerline
|
||||
(use-package powerline
|
||||
:ensure t
|
||||
:config
|
||||
(powerline-default-theme))
|
||||
(powerline-default-theme))
|
||||
|
||||
;; Rainbow-mode
|
||||
(use-package rainbow-mode
|
||||
:ensure t
|
||||
:config
|
||||
(rainbow-mode))
|
||||
(rainbow-mode))
|
||||
|
||||
;; Rigid-tabs
|
||||
(use-package rigid-tabs
|
||||
:ensure t
|
||||
:config
|
||||
(rigid-tabs-mode))
|
||||
(rigid-tabs-mode))
|
||||
|
||||
;;; Rings
|
||||
(use-package rings
|
||||
@ -391,55 +391,55 @@
|
||||
:ensure t
|
||||
:pin melpa
|
||||
:config
|
||||
(setq sml/theme 'dark)
|
||||
(sml/setup))
|
||||
(setq sml/theme 'dark)
|
||||
(sml/setup))
|
||||
|
||||
;; Smart-tabs-mode
|
||||
(use-package smart-tabs-mode
|
||||
:ensure t
|
||||
:config
|
||||
(smart-tabs-add-language-support lua lua-mode-hook
|
||||
((lua-indent-line . lua-basic-offset)
|
||||
(lua-indent-region . lua-basic-offset)))
|
||||
(smart-tabs-insinuate 'c 'c++ 'javascript 'lua 'python 'ruby))
|
||||
(smart-tabs-add-language-support lua lua-mode-hook
|
||||
((lua-indent-line . lua-basic-offset)
|
||||
(lua-indent-region . lua-basic-offset)))
|
||||
(smart-tabs-insinuate 'c 'c++ 'javascript 'lua 'python 'ruby))
|
||||
|
||||
;; Smartparens
|
||||
(use-package smartparens
|
||||
:ensure t
|
||||
:pin melpa
|
||||
:config
|
||||
(smartparens-global-mode 1)
|
||||
(sp-pair "$" "$") ;; latex math inline mode
|
||||
(sp-pair "\[" "\]")) ;; latex math display mode
|
||||
(smartparens-global-mode 1)
|
||||
(sp-pair "$" "$") ;; latex math inline mode
|
||||
(sp-pair "\[" "\]")) ;; latex math display mode
|
||||
|
||||
;; Smooth-scroll
|
||||
(use-package smooth-scrolling
|
||||
:ensure t
|
||||
:pin melpa
|
||||
:config
|
||||
(smooth-scrolling-mode 1))
|
||||
(smooth-scrolling-mode 1))
|
||||
|
||||
;; Tabbar-ruler
|
||||
(use-package tabbar-ruler
|
||||
:ensure t
|
||||
:pin melpa
|
||||
:config
|
||||
(setq tabbar-ruler-global-tabbar t)
|
||||
(setq tabbar-ruler-popup-menu t)
|
||||
(setq tabbar-ruler-popup-scrollbar t))
|
||||
(setq tabbar-ruler-global-tabbar t)
|
||||
(setq tabbar-ruler-popup-menu t)
|
||||
(setq tabbar-ruler-popup-scrollbar t))
|
||||
|
||||
;; Undo/Redo
|
||||
(use-package undo-tree
|
||||
:ensure t
|
||||
:diminish undo-tree-mode
|
||||
:init
|
||||
(global-undo-tree-mode))
|
||||
(global-undo-tree-mode))
|
||||
|
||||
;; Which-key
|
||||
(use-package which-key
|
||||
:ensure t
|
||||
:config
|
||||
(which-key-mode))
|
||||
(which-key-mode))
|
||||
|
||||
|
||||
|
||||
@ -509,7 +509,7 @@
|
||||
(defun my-enable-minor-modes ()
|
||||
"Enables several minor modes."
|
||||
(interactive "")
|
||||
(define-globalized-minor-mode real-global-auto-complete-mode
|
||||
(define-globalized-minor-mode real-global-auto-complete-mode
|
||||
auto-complete-mode (lambda ()
|
||||
(if (not (minibufferp (current-buffer)))
|
||||
(auto-complete-mode 1))))
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 547a6ce260362b06e86a9c366dc29984c0954124
|
||||
Subproject commit 3c1cdc1e86d09d7893536ed0e2d8730bfe0597e9
|
Loading…
Reference in New Issue
Block a user