This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Fixing leaf-keywords "Unrecognized keyword" error in flycheck | |
(eval-and-compile (require 'flycheck)) | |
(setq flycheck-emacs-lisp-package-initialize-form | |
(flycheck-sexp-to-string | |
'(progn | |
(with-demoted-errors "Error during package initialization: %S" | |
(package-initialize)) | |
(leaf-keywords-init)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img id="pic" src="pic/0.jpg" style="width:100%; border-radius: 8px;"> | |
<script> | |
'use strict'; | |
const img = ["pic/0.jpg", "pic/1.jpg", "pic/2.jpg" , "pic/3.jpg" , "pic/4.jpg" , "pic/5.jpg" , "pic/6.jpg" , "pic/7.jpg" , "pic/8.jpg" , "pic/9.jpg"]; | |
let count = -1; | |
picChange(); // 関数を実行 | |
function picChange() { | |
count++; | |
// カウントが最大になれば配列を初期値に戻すため「0」を指定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dired-my-append-buffer-name-hint () | |
"Append a auxiliary string [Dir] to a name of dired buffer." | |
(when (eq major-mode 'dired-mode) | |
(let* ((dir (expand-file-name list-buffers-directory)) | |
;; Add a drive letter for Windows | |
(drive (if (and (eq 'system-type 'windows-nt) | |
(string-match "^\\([a-zA-Z]:\\)/" dir)) | |
(match-string 1 dir) ""))) | |
(rename-buffer (concat (buffer-name) " [" drive "dir]") t)))) | |
(add-hook 'dired-mode-hook 'dired-my-append-buffer-name-hint) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Install | |
;; requestが必要なので M-x package-install request などでインストールしておく | |
;; init.elなどでロードする | |
;; (load-file "/path/to/deepl.el") | |
;; キーバインドを設定しておく | |
;; (global-set-key (kbd "C-c t") 'deepl-translate) | |
;;; Usage | |
;; 翻訳したい部分をリージョン選択して設定したキーバインド、または M-x deepl-translate | |
;; 翻訳結果がミニバッファに出る。また、同じ内容がクリップボードにコピーされている |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Install | |
;; requestが必要なので M-x package-install request などでインストールしておく | |
;; init.elなどでロードする | |
;; (load-file "/path/to/deepl.el") | |
;; キーバインドを設定しておく | |
;; (global-set-key (kbd "C-c t") 'deepl-translate) | |
;;; Usage | |
;; 翻訳したい部分をリージョン選択して設定したキーバインド、または M-x deepl-translate | |
;; 翻訳結果がミニバッファに出る。また、同じ内容がクリップボードにコピーされている |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dired-my-append-buffer-name-hint () | |
"Append a auxiliary string [Dir] to a name of dired buffer." | |
(when (eq major-mode 'dired-mode) | |
(let* ((dir (expand-file-name list-buffers-directory)) | |
;; Add a drive letter for Windows | |
(drive (if (and (eq 'system-type 'windows-nt) | |
(string-match "^\\([a-zA-Z]:\\)/" dir)) | |
(match-string 1 dir) ""))) | |
(rename-buffer (concat (buffer-name) " [" drive "dir]") t)))) | |
(add-hook 'dired-mode-hook 'dired-my-append-buffer-name-hint) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(leaf nyan-mode | |
:ensure t | |
:if (display-graphic-p) | |
:after doom-modeline | |
:config | |
(nyan-mode 1) | |
(nyan-start-animation)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(leaf tempbuf | |
:doc "Auto kill unused buffers in the background" | |
:el-get (tempbuf :url "http://www.emacswiki.org/emacs/download/tempbuf.el") | |
:hook ((find-file-hook . my:find-file-tempbuf-hook) | |
((dired-mode-hook magit-mode-hook) . turn-on-tempbuf-mode)) | |
:custom | |
`((tempbuf-kill-message . nil) | |
(my:tempbuf-ignore-files . '("~/Dropbox/org/task.org"))) | |
:init | |
(defun my:find-file-tempbuf-hook () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(leaf pangu-spacing | |
:doc "Put a space between Japanese and English" | |
:url "http://github.com/coldnew/pangu-spacing" | |
:ensure t | |
:hook ((markdown-mode-hook text-mode-hook) . pangu-spacing-mode) | |
:config | |
(setq pangu-spacing-real-insert-separtor t) | |
(setq pangu-spacing-include-regexp ;; alphabet only | |
(rx (or (and (or (group-n 3 (any "。,!?;:「」()、")) | |
(group-n 1 (or (category japanese)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(leaf *text-adjust-space | |
:doc "Put space between full-width and half-width characters" | |
:url "https://github.com/uwabami/text-adjust.el" | |
:el-get uwabami/text-adjust.el | |
:hook (before-save-hook . text-adjust-space-before-save-if-needed) | |
:config | |
(defun text-adjust-space-before-save-if-needed () | |
(when (memq major-mode | |
'(prog-mode text-mode markdown-mode)) | |
(text-adjust-space-buffer))) |
NewerOlder