Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emacs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DOSCH Philippe
emacs
Compare revisions
b39811aae1d025b233b5549175a166a0299a7fdc to 87d57e0198e7e37c0fb6224aba16a8f037648e25
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dosch5/emacs
Select target project
No results found
87d57e0198e7e37c0fb6224aba16a8f037648e25
Select Git revision
Swap
Target
dosch5/emacs
Select target project
dosch5/emacs
1 result
b39811aae1d025b233b5549175a166a0299a7fdc
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
Ajout pour org-reveal
· 3dfc901e
Philippe Dosch
authored
3 months ago
3dfc901e
Les heures au format 24h
· 84df2cb7
Philippe Dosch
authored
3 months ago
84df2cb7
Les couleurs ANSI
· e1cc6984
Philippe Dosch
authored
3 months ago
e1cc6984
Abbrev et yasnippet qui marchent ensemble
· 87d57e01
Philippe Dosch
authored
3 months ago
87d57e01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.emacs
+57
-4
57 additions, 4 deletions
.emacs
with
57 additions
and
4 deletions
.emacs
View file @
87d57e01
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
(append
(append
'(
'(
"/home/phil/.lisp/"
"/home/phil/.lisp/"
"/home/phil/.lisp/org-reveal/"
"/home/phil/.lisp/Emacs-langtool/"
"/home/phil/.lisp/Emacs-langtool/"
)
)
load-path))
load-path))
...
@@ -71,6 +72,7 @@
...
@@ -71,6 +72,7 @@
;; On affiche l'heure et le numéro de ligne
;; On affiche l'heure et le numéro de ligne
(display-time)
(display-time)
(setq display-time-24hr-format t)
(line-number-mode t)
(line-number-mode t)
;; Autorevert par défaut
;; Autorevert par défaut
...
@@ -230,6 +232,13 @@
...
@@ -230,6 +232,13 @@
(use-package flycheck
(use-package flycheck
:ensure t)
:ensure t)
;; Les couleurs ansi
(require 'ansi-color)
(defun display-ansi-colors ()
(interactive)
(ansi-color-apply-on-region (point-min) (point-max)))
;; Pour une ouverture intelligente des fichiers recherchés
;; Pour une ouverture intelligente des fichiers recherchés
;; en fonction du contexte
;; en fonction du contexte
(use-package ffap
(use-package ffap
...
@@ -456,10 +465,8 @@
...
@@ -456,10 +465,8 @@
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
;; org-reveal
;; org-reveal
;; (use-package ox-reveal
(require 'ox-reveal)
;; :ensure t
(setq org-reveal-root "file:///home/phil/divers/presentation/reveal.js")
;; :config
;; (setq org-reveal-root "file:///home/phil/divers/presentation/reveal.js"))
;; Openwith : utilsation de programmes externe lors de
;; Openwith : utilsation de programmes externe lors de
;; l'ouverture pour certains types de fichiers
;; l'ouverture pour certains types de fichiers
...
@@ -1003,6 +1010,52 @@
...
@@ -1003,6 +1010,52 @@
;; whitespace next to cursor
;; whitespace next to cursor
(global-set-key (kbd "S-SPC") 'insert-postfix-whitespace)
(global-set-key (kbd "S-SPC") 'insert-postfix-whitespace)
;; Le support des abbréviations
(setq abbrev-file-name "~/.emacs.d/mes_abbrevs")
(quietly-read-abbrev-file)
;; 1. Fonction pour gérer TAB sans récursion
(defun my-expand-or-indent ()
"Essaie YASnippet, puis abbrev, puis indente, sans récursion."
(interactive)
(let ((expanded nil))
;; Essayer YASnippet
(when (and (bound-and-true-p yas-minor-mode)
(yas-expand))
(setq expanded t))
;; Si YASnippet n’a rien fait, essayer abbrev
(when (and (not expanded)
(bound-and-true-p abbrev-mode)
(expand-abbrev))
(setq expanded t))
;; Si rien n’a été expansé, indenter
(unless expanded
(indent-for-tab-command))))
;; 2. Associer TAB à la fonction
(global-set-key (kbd "TAB") #'my-expand-or-indent)
;; 3. Désactiver l’expansion automatique d’abbrev sur l’espace
(defun my-space-no-expand ()
"Insère un espace sans expanser d’abréviation."
(interactive)
(insert " "))
;; Associer l’espace à cette fonction dans les modes souhaités
(dolist (hook '(text-mode-hook prog-mode-hook))
(add-hook hook
(lambda ()
(local-set-key (kbd "SPC") #'my-space-no-expand))))
;; 4. Activer abbrev-mode globalement
(setq-default abbrev-mode t)
;; 5. Activer YASnippet globalement
(yas-global-mode 1)
;; 6. Définir une abréviation de test
(define-abbrev global-abbrev-table "btw" "by the way")
;; Macro Google
;; Macro Google
(defun google ()
(defun google ()
"Google the selected region if any, display a query prompt otherwise."
"Google the selected region if any, display a query prompt otherwise."
...
...
This diff is collapsed.
Click to expand it.