diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -42,6 +42,7 @@ (global-set-key (kbd "C-.") #'other-window) (global-set-key (kbd "C-,") #'ymhg/prev-window) (global-set-key (kbd "C-\\") #'undo-only) +(global-set-key (kbd "M-SPC") (lambda () (interactive)(insert " "))) (global-set-key (kbd "C-c l") #'org-store-link) (global-set-key (kbd "C-c c") #'org-capture) @@ -90,6 +91,12 @@ (calendar-last-day-of-month month year))) (= day last-day-of-month))) +(defun ymhg/electric-space () + (interactive) + (if (looking-back (sentence-end)) + (insert "%\n") + (self-insert-command 1))) + (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) @@ -115,6 +122,7 @@ (setq confirm-nonexistent-file-or-buffer nil) (setq ring-bell-function 'ignore) (setq sentence-end-double-space t) + (setq truncate-partial-width-windows nil) (setq-default bidi-paragraph-direction 'left-to-right) (if (version<= "27.1" emacs-version) (setq bidi-inhibit-bpa t)) @@ -159,6 +167,9 @@ (internal-border-width . 5))) (setq auth-sources '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")) + (setq wdired-allow-to-change-permissions t) + + (add-hook 'text-mode-hook #'visual-line-mode) :config (unless (string= system-type "darwin") (menu-bar-mode -1)) @@ -859,7 +870,11 @@ https://yannherklotz.com")) (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer) (add-hook 'TeX-mode-hook #'reftex-mode) - (add-hook 'TeX-mode-hook #'outline-minor-mode)) + (add-hook 'TeX-mode-hook #'outline-minor-mode) + (with-eval-after-load 'latex + (define-key LaTeX-mode-map + " " + #'ymhg/electric-space))) (setq gc-cons-threshold (* 1024 1024 10)) |