Skip to content
Snippets Groups Projects
Commit 24789bd6 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Encore du nettoyage

parent eae7d6ce
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,5 @@ auto-save-list
/irony/
/projectile-bookmarks.eld
/transient/
/.python-environments/
/elpy/
#+STARTUP: org-pretty-entities entitiespretty
#+PROPERTY: header-args :comments yes :results silent
* Conseils d'installation
* Installation
L'installation la plus simple de cette configuration se résume à
renommer ce répertoire en
#+BEGIN_SRC shell
......@@ -29,12 +29,6 @@ For a list of all posts and videos check out
-- Mike Zamansky
#+end_verse
* Définitions elpa pour org-mode
On doit définir ce dépôt (même s'il n'est pas accessible) pour org-mode
#+BEGIN_SRC emacs-lisp
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
#+END_SRC
* Choix d'interface
** Pas d'écran de bienvenue
#+BEGIN_SRC emacs-lisp
......@@ -98,6 +92,10 @@ buffer
(delete-trailing-whitespace))))
#+END_SRC
** Affichage de la fonction courante
#+BEGIN_SRC emacs-lisp
(which-function-mode t)
#+END_SRC
* Powerline
Un bel affichage pour la barre d'état (=mode-line=)
#+BEGIN_SRC emacs-lisp
......@@ -419,33 +417,29 @@ Active flycheck globalement
#+BEGIN_SRC
(add-hook 'after-init-hook #'global-flycheck-mode)
#+END_SRC
* COMMENT Python
* Python
Attention pour que la configuration fonctionne, il faut installer
~virtualenv~. Pour les systèmes Debian
#+BEGIN_SRC shell
apt install virtualenv
#+END_SRC
#+BEGIN_SRC emacs-lisp
(setq py-python-command "python3")
(setq python-shell-interpreter "python3")
(use-package elpy
:ensure t
:custom (elpy-rpc-backend "jedi")
:config
(elpy-enable)
)
(elpy-enable))
(use-package virtualenvwrapper
:ensure t
:config
(venv-initialize-interactive-shells)
(venv-initialize-eshell))
#+END_SRC
#+RESULTS:
: t
* YaSnippet
Le système de templates pour Emacs
#+BEGIN_SRC emacs-lisp
......
......@@ -13,14 +13,16 @@
'("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives
'("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives
'("org" . "https://orgmode.org/elpa/"))
;; positionner is-standalone à true pour utiliser l'archive elpa
;; locale
;; locale (nécessite au)
(defvar is-standalone nil)
(if is-standalone
(setq package-archives '(("myelpa" . "~/.emacs.d/myelpa/")))
(setq package-archives '(("myelpa" . "~/.emacs.d/myelpa/")
("org" . "https://orgmode.org/elpa/")))
nil)
(package-initialize)
;; Bootstrap `use-package'
......@@ -28,8 +30,11 @@
(package-refresh-contents)
(package-install 'use-package))
;; show the current function on top
(which-function-mode t)
(add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa"))
(use-package auto-async-byte-compile
:ensure t
:hook
(emacs-lisp-mode-hook . 'enable-auto-async-byte-compile-mode))
(org-babel-load-file (expand-file-name "~/.emacs.d/Readme.org"))
(custom-set-variables
......@@ -43,7 +48,6 @@
'(irony-cdb-search-directory-list (quote ("." "build")))
'(org-confirm-babel-evaluate nil)
'(org-default-notes-file (concat org-directory "/notes.org"))
'(org-directory "~/Sync/orgfiles")
'(org-export-html-postamble nil)
'(org-hide-leading-stars t)
'(org-src-fontify-natively t)
......@@ -54,13 +58,13 @@
(better-shell flycheck-irony tabbar cmake-font-lock alect-theme zero-dark-theme autumn-light-theme solarized-dark-theme misterioso misterioso-theme zenburn sourcerer-theme flycheck-pos-tip flycheck-clojure ox-reveal posframe processing-snippets processing-mode rg deadgrep flycheck-rust cargo racer yasnippet-classic-snippets rustic lsp-rust lsp-java company-lsp lsp-ui lsp-mode lsp yasnippet-snippets counsel-spotify exec-path-from-shell easy-kill auto-yasnippet org-pdfview pdf-tools atomic-chrome mingus simple-mpc pcre2el ag wgrep-ag wgrep haskell-mode aggressive-indent prodigy origami dumb-jump cider ggtags circe-notifications circe org-gcal mu4e-alert git-timemachine git-gutter magit hydra default-text-scale smartparens projectile auctex tern-auto-complete tern js2-refactor ac-js2 js2-mode emmet-mode web-mode iedit expand-region multiple-cursors hungry-delete beacon undo-tree virtualenvwrapper elpy flycheck doom-modeline doom-themes tao-theme poet-theme faff-theme zerodark-theme alect-themes moe-theme base16-theme zenburn-theme color-theme-modern company-jedi irony-eldoc company-irony company counsel ace-window htmlize noflet org-bullets which-key try use-package)))
'(sp-escape-quotes-after-insert nil))
(byte-recompile-directory (expand-file-name "~/.emacs.d") 0)
;;(byte-recompile-directory (expand-file-name "~/.emacs.d") 0)
;; Byte-compile again to ~/.emacs.elc if it is outdated
(if (file-newer-than-file-p
(file-truename "~/.emacs.d/init.el")
(file-truename "~/.emacs.d/init.elc"))
(byte-compile-file "~/.emacs.d/init.el"))
;; (if (file-newer-than-file-p
;; (file-truename "~/.emacs.d/init.el")
;; (file-truename "~/.emacs.d/init.elc"))
;; (byte-compile-file "~/.emacs.d/init.el"))
(custom-set-faces
;; custom-set-faces was added by Custom.
......
import random
def f(x):
return random.randrange(1, x)
for i in range(2,10):
print f(i)
if __name__ == '__main__':
hello
class myclass(somethingelse):
"""documentation
"""
def __init__(self, some_args):
super(myclass, self).__init__()
self.some_args = some_args
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>My Awesome Presentation</title>
<meta name="author" content="(Mike Zamansky)"/>
<style type="text/css">
.underline { text-decoration: underline; }
</style>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/reveal.js/3.0.0/css/reveal.css"/>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/reveal.js/3.0.0/css/theme/sky.css" id="theme"/>
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'http://cdn.jsdelivr.net/reveal.js/3.0.0/css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section id="sec-title-slide"><h1 class="title">My Awesome Presentation</h1><h2 class="author">Mike Zamansky</h2><p class="date">Created: 2016-07-19 Tue 11:44</p>
</section>
<section>
<section id="slide-orgheadline1">
<h2 id="orgheadline1">Slide 1</h2>
<p>
here's some text
</p>
</section>
</section>
<section>
<section id="slide-orgheadline4">
<h2 id="orgheadline4">Slide 2</h2>
<div class="outline-text-2" id="text-orgheadline4">
</div></section>
<section id="slide-orgheadline2">
<h3 id="orgheadline2">subslide 1</h3>
</section>
<section id="slide-orgheadline3">
<h3 id="orgheadline3">subslide 2</h3>
</section>
</section>
<section>
<section id="slide-orgheadline5">
<h2 id="orgheadline5">Slide 3</h2>
<ul>
<li class="fragment roll-in">list item 1</li>
<li class="fragment roll-in"><p>
list item 2
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-right">a</th>
<th scope="col" class="org-right">b</th>
<th scope="col" class="org-right">c</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-right">1</td>
<td class="org-right">2</td>
<td class="org-right">3</td>
</tr>
<tr>
<td class="org-right">4</td>
<td class="org-right">5</td>
<td class="org-right">6</td>
</tr>
</tbody>
</table></li>
</ul>
</section>
</section>
<section>
<section id="slide-orgheadline6">
<h2 id="orgheadline6">slide 4</h2>
<div class="org-src-container">
<pre class="src src-python"><span style="color: #F0DFAF; font-weight: bold;">def</span> <span style="color: #93E0E3;">f</span>(x):
<span style="color: #F0DFAF; font-weight: bold;">return</span> x + 1
<span style="color: #F0DFAF; font-weight: bold;">print</span> f(5)
</pre>
</div>
</section>
</section>
</div>
</div>
<script src="http://cdn.jsdelivr.net/reveal.js/3.0.0/lib/js/head.min.js"></script>
<script src="http://cdn.jsdelivr.net/reveal.js/3.0.0/js/reveal.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: false,
center: true,
slideNumber: 'c',
rollingLinks: false,
keyboard: true,
overview: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
transitionSpeed: 'default',
multiplex: {
secret: '', // null if client
id: '', // id, obtained from socket.io server
url: '' // Location of socket.io server
},
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'http://cdn.jsdelivr.net/reveal.js/3.0.0/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'http://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'http://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'http://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'http://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }]
});
</script>
</body>
</html>
#+REVEAL_THEME: sky
#+OPTIONS: toc:nil num:nil
#+TITLE: My Awesome Presentation
#+AUTHOR: Mike Zamansky
* Slide 1
here's some text
* Slide 2
** subslide 1
** subslide 2
* Slide 3
#+ATTR_REVEAL: :frag (roll-in)
- list item 1
- list item 2
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
|---+---+---|
* slide 4
#+BEGIN_SRC python
def f(x):
return x + 1
print f(5)
#+END_SRC
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment