修訂 | 3e7ae8bd66dbcb97201874b55377505df2294b0b (tree) |
---|---|
時間 | 2023-05-03 20:24:42 |
作者 | badcoff33 |
Commiter | badcoff33 |
prefer toggle-truncate-lines instead var truncate-lines
@@ -251,17 +251,19 @@ | ||
251 | 251 | (add-hook 'markdown-mode-hook |
252 | 252 | (lambda () |
253 | 253 | (+skeletons-for-markdown) |
254 | - (setq truncate-lines nil) | |
254 | + (toggle-truncate-lines 1) | |
255 | + (setq-local face-remapping-alist | |
256 | + '((markdown-header-face (:height 4.0) markdown-header-face))) | |
255 | 257 | (let* ((pandoc-command "pandoc -f gfm -t html5 --toc --toc-depth=2") |
256 | 258 | (css-file (concat user-emacs-directory "html-files/pandoc_simple.css")) |
257 | 259 | (html-file (concat user-emacs-directory "html-files/pandoc_template.html"))) |
258 | - (setq markdown-command (concat pandoc-command | |
259 | - " --metadata title=" (file-name-sans-extension | |
260 | - (file-name-nondirectory buffer-file-name)) | |
261 | - (when (and (file-exists-p css-file) | |
262 | - (file-exists-p html-file)) | |
263 | - (concat " --css=" css-file " --template=" html-file))))) | |
264 | - (local-set-key (kbd "C-c a") 'rst-adjust-adornment))) | |
260 | + (setq markdown-command-needs-filename t | |
261 | + markdown-command | |
262 | + (concat pandoc-command | |
263 | + " --metadata title=" (file-name-sans-extension | |
264 | + (file-name-nondirectory buffer-file-name)) | |
265 | + (if (file-exists-p css-file) (concat " --css=" css-file) "") | |
266 | + (if (file-exists-p html-file) (concat " --template=" html-file))))))) | |
265 | 267 | |
266 | 268 | (add-hook 'eshell-mode-hook |
267 | 269 | (lambda () |
@@ -294,7 +296,7 @@ | ||
294 | 296 | (lambda () |
295 | 297 | (eldoc-mode 1) |
296 | 298 | (indent-tabs-mode -1) |
297 | - (setq truncate-lines t) | |
299 | + (toggle-truncate-lines 1) | |
298 | 300 | (prettify-symbols-mode 1) |
299 | 301 | (setq hippie-expand-try-functions-list |
300 | 302 | '(try-expand-dabbrev |
@@ -343,6 +345,7 @@ | ||
343 | 345 | (add-hook 'c-mode-common-hook |
344 | 346 | (lambda () |
345 | 347 | (local-set-key (kbd "C-c f") #'clang-format-buffer) |
348 | + (local-set-key (kbd "C-c i") #'imenu) | |
346 | 349 | (local-set-key (kbd "C-c g") |
347 | 350 | (lambda () |
348 | 351 | (interactive) |
@@ -357,7 +360,7 @@ | ||
357 | 360 | (push '("!=" . ?≠) prettify-symbols-alist) |
358 | 361 | (push '("->" . ?→) prettify-symbols-alist) |
359 | 362 | (prettify-symbols-mode 1) |
360 | - (setq truncate-lines t) | |
363 | + (toggle-truncate-lines 1) | |
361 | 364 | (+skeletons-for-c) |
362 | 365 | (cwarn-mode 1) |
363 | 366 | (indent-tabs-mode -1) |