first commit
This commit is contained in:
49
lisp/init-startup.el
Normal file
49
lisp/init-startup.el
Normal file
@@ -0,0 +1,49 @@
|
||||
;;; init-startup.el
|
||||
;;; -*- lexical-binding: t -*-
|
||||
|
||||
;; 配置备份文件和自动保存文件目录
|
||||
(setq backup-directory-alist
|
||||
`((".*" . ,(expand-file-name "backup/" user-emacs-directory)))
|
||||
backup-by-copying t
|
||||
delete-old-versions t
|
||||
kept-new-versions 6
|
||||
kept-old-versions 2
|
||||
version-control t)
|
||||
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" ,(expand-file-name "auto-save-list/" user-emacs-directory) t)))
|
||||
|
||||
;; 关闭lock文件
|
||||
(setq create-lockfiles nil)
|
||||
|
||||
;; 关闭提示音
|
||||
(setq ring-bell-function 'ignore)
|
||||
|
||||
;; 同步scoop目录
|
||||
(when *is-windows*
|
||||
;; 将 Scoop 的 Python Scripts 添加到 exec-path
|
||||
(add-to-list 'exec-path (expand-file-name "H/appppppppppp/scoop/apps/"))
|
||||
;; 同时更新环境变量 PATH(供子进程使用)
|
||||
(setenv "PATH" (concat (expand-file-name "H/appppppppppp/scoop/apps/") ";" (getenv "PATH"))))
|
||||
|
||||
;; 当文件被外部修改时自动刷新
|
||||
(global-auto-revert-mode 1)
|
||||
|
||||
;; 开启rencent file mode
|
||||
(recentf-mode)
|
||||
(setq recentf-max-saved-items 20) ;; 最大保存数量
|
||||
|
||||
;; 启用select delete
|
||||
(delete-selection-mode)
|
||||
|
||||
;; 启用winner mode
|
||||
(winner-mode)
|
||||
|
||||
;; 自定义scratch
|
||||
(setq initial-scratch-message
|
||||
";; SCRATCH SCRATCH SCRATCH\n\n")
|
||||
|
||||
;; 开启server mode
|
||||
(server-start)
|
||||
|
||||
(provide 'init-startup)
|
||||
Reference in New Issue
Block a user