|
@@ -450,10 +450,15 @@ Otherwize hook it." |
|
|
|
|
|
|
|
|
;; (global-set-key (kbd "C-s") 'isearch-forward-regexp) |
|
|
;; (global-set-key (kbd "C-s") 'isearch-forward-regexp) |
|
|
;; (global-set-key (kbd "C-r") 'isearch-backward-regexp) |
|
|
;; (global-set-key (kbd "C-r") 'isearch-backward-regexp) |
|
|
(if (eval-and-compile (require 'prescient nil t)) |
|
|
|
|
|
(set-variable 'search-default-mode |
|
|
|
|
|
(lambda (orig lax) |
|
|
|
|
|
(prescient-fuzzy-regexp orig))) |
|
|
|
|
|
|
|
|
(if (locate-library "prescient") |
|
|
|
|
|
(progn |
|
|
|
|
|
(declare-function prescient-fuzzy-regexp |
|
|
|
|
|
"prescient") |
|
|
|
|
|
(autoload 'prescient-fuzzy-regexp |
|
|
|
|
|
"prescient") |
|
|
|
|
|
(set-variable 'search-default-mode |
|
|
|
|
|
(lambda (orig lax) |
|
|
|
|
|
(prescient-fuzzy-regexp orig)))) |
|
|
(set-variable 'search-default-mode t)) |
|
|
(set-variable 'search-default-mode t)) |
|
|
;; (set-variable 'search-whitespace-regexp ".*?") |
|
|
;; (set-variable 'search-whitespace-regexp ".*?") |
|
|
;; (set-variable 'isearch-regexp-lax-whitespace t) |
|
|
;; (set-variable 'isearch-regexp-lax-whitespace t) |
|
@@ -1234,7 +1239,7 @@ THEM are function and its args." |
|
|
(when (and (require 'recently nil t) |
|
|
(when (and (require 'recently nil t) |
|
|
(fboundp 'ivy-read)) |
|
|
(fboundp 'ivy-read)) |
|
|
(defun my-counsel-recently () |
|
|
(defun my-counsel-recently () |
|
|
"Consel `recently'." |
|
|
|
|
|
|
|
|
"Counsel `recently'." |
|
|
(interactive) |
|
|
(interactive) |
|
|
(ivy-read "Recently: " (mapcar 'abbreviate-file-name (recently-list)) |
|
|
(ivy-read "Recently: " (mapcar 'abbreviate-file-name (recently-list)) |
|
|
:require-match t |
|
|
:require-match t |
|
@@ -1741,6 +1746,17 @@ ORIG-FUNC is the target function, and ARGS is the argument when it is called." |
|
|
;; Used in interactive function of pydoc |
|
|
;; Used in interactive function of pydoc |
|
|
(with-venv-advice-add 'pydoc-all-modules))) |
|
|
(with-venv-advice-add 'pydoc-all-modules))) |
|
|
|
|
|
|
|
|
|
|
|
(defvar my-cousel-pydoc-history nil "History of `my-counsel-pydoc'.") |
|
|
|
|
|
(defun my-counsel-pydoc () |
|
|
|
|
|
"Counsel `pydoc'." |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(eval-and-compile (require 'pydoc nil t)) |
|
|
|
|
|
(ivy-read "Recently: " (pydoc-all-modules) |
|
|
|
|
|
:require-match t |
|
|
|
|
|
:history 'my-cousel-pydoc-history |
|
|
|
|
|
:action (lambda (x) (pydoc x)) |
|
|
|
|
|
:caller 'my-counsel-pydoc)) |
|
|
|
|
|
|
|
|
(set-variable 'flycheck-python-mypy-config '("mypy.ini" ".mypy.ini" "setup.cfg")) |
|
|
(set-variable 'flycheck-python-mypy-config '("mypy.ini" ".mypy.ini" "setup.cfg")) |
|
|
(set-variable 'flycheck-flake8rc '("setup.cfg" "tox.ini" ".flake8rc")) |
|
|
(set-variable 'flycheck-flake8rc '("setup.cfg" "tox.ini" ".flake8rc")) |
|
|
|
|
|
|
|
@@ -3111,6 +3127,7 @@ ARGS are not used." |
|
|
url)) |
|
|
url)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; 前の実行結果を残したまま次のコマンドを実行する方法はあるだろうか |
|
|
(defun my-vterm-cmd (command) |
|
|
(defun my-vterm-cmd (command) |
|
|
"Start arbitrary command in vterm buffer." |
|
|
"Start arbitrary command in vterm buffer." |
|
|
(interactive "sCommand: ") |
|
|
(interactive "sCommand: ") |
|
@@ -3125,8 +3142,32 @@ ARGS are not used." |
|
|
;; (setq vterm-kill-buffer-on-exit nil) |
|
|
;; (setq vterm-kill-buffer-on-exit nil) |
|
|
;; ;; (setq vterm-term-environment-variable "screen-256color") |
|
|
;; ;; (setq vterm-term-environment-variable "screen-256color") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; これいつ動くの? |
|
|
|
|
|
;; 自動で project を switch させる方法はある? |
|
|
|
|
|
(add-hook 'projectile-after-switch-project-hook |
|
|
|
|
|
(lambda () |
|
|
|
|
|
(message "Projecttile switched to: %s" |
|
|
|
|
|
(projectile-project-root)))) |
|
|
|
|
|
(when (fboundp 'projectile-mode) |
|
|
|
|
|
(projectile-mode 1)) |
|
|
|
|
|
|
|
|
|
|
|
(with-eval-after-load 'eglot |
|
|
|
|
|
(when (fboundp 'with-venv-advice-add) |
|
|
|
|
|
(with-venv-advice-add 'eglot--executable-find)) |
|
|
|
|
|
(set-variable 'eldoc-echo-area-use-multiline-p nil) |
|
|
|
|
|
(set-variable 'eglot-extend-to-xref t)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(message "Emacs started at %s" |
|
|
(message "Emacs started at %s" |
|
|
(current-time-string)) |
|
|
(current-time-string)) |
|
|
|
|
|
(run-with-idle-timer (* 3 60 60) ;; 3 hours |
|
|
|
|
|
t |
|
|
|
|
|
(lambda () |
|
|
|
|
|
(message "Emacs does nothing for 3 hours: %s" |
|
|
|
|
|
(current-time-string)))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; https://emacs-jp.github.io/tips/startup-optimization |
|
|
;; https://emacs-jp.github.io/tips/startup-optimization |
|
|
;; Restore to original value |
|
|
;; Restore to original value |
|
|