blob: 85eb60ad1de903c7c1693d0cdfb0b6e2873891db (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
;;; package --- Summary
;;; Commentary:
;;; useful snippets of code for my daily use.
;;; Code:
(defun apollo/html-boostrap-boilerplate ()
"Insert html boilerplate with boostrap link."
(interactive)
(insert
"<!DOCTYPE html>
<html lang=\"en\">
<head>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
<title>My Title</title>
<link rel=\"stylesheet\" href=\"./style.css\">
<link href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi\" crossorigin=\"anonymous\">
</head>
<body>
<main>
<h1>Starting point</h1>
</main>
<script src=\"index.js\"></script>
</body>
</html>" ))
(defun center-buffer ()
"Center buffer."
(interactive)
(setq visual-fill-column-width 100
visual-fill-column-center-text t)
(visual-fill-column-mode 1))
(defun center-buffer-undo ()
"Undo center-buffer."
(interactive)
(setq visual-fill-column-width 2000
visual-fill-column-center-text nil)
(visual-fill-column-mode 1))
;;; my-functions.el ends here
|