Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
emacs.d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
Liu Miao
emacs.d
Commits
d1fac4aa
Commit
d1fac4aa
authored
2 years ago
by
Liu Miao
Browse files
Options
Downloads
Patches
Plain Diff
Fix some issues
parent
d4297de2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
init.el
+1
-1
1 addition, 1 deletion
init.el
lisp/configs.el
+1
-1
1 addition, 1 deletion
lisp/configs.el
lisp/editor.el
+25
-19
25 additions, 19 deletions
lisp/editor.el
lisp/init-org.el
+1
-40
1 addition, 40 deletions
lisp/init-org.el
lisp/keybinds.el
+8
-2
8 additions, 2 deletions
lisp/keybinds.el
with
36 additions
and
63 deletions
init.el
+
1
−
1
View file @
d1fac4aa
...
...
@@ -118,7 +118,7 @@
(
require
'prog-verilog
)
(
require
'init-org
)
(
require
'apps
)
(
require
'keybind
ing
s
)
(
require
'keybinds
)
;; Configurations after init
(
user/config-after-init
)
...
...
This diff is collapsed.
Click to expand it.
lisp/configs.el
+
1
−
1
View file @
d1fac4aa
...
...
@@ -56,7 +56,7 @@
(
defvar
user/notes-dir
"~/org"
"User defined notes directory."
)
(
defvar
user/org-roam-dir
"~/org/roam"
(
defvar
user/org-roam-dir
user/notes-dir
"User defined org roam directory."
)
(
defvar
user/notes-extensions
'
(
"org"
"md"
"markdown"
))
...
...
This diff is collapsed.
Click to expand it.
lisp/editor.el
+
25
−
19
View file @
d1fac4aa
...
...
@@ -3,7 +3,6 @@
;;; Commentary:
;;
;;; Code:
;; Resolve symlinks when opening files
(
setq
find-file-visit-truename
t
vc-follow-symlinks
t
)
...
...
@@ -35,7 +34,15 @@
backup-directory-alist
user/backup-directory-alist
tramp-backup-directory-alist
backup-directory-alist
)
(
setq-default
scroll-step
1
)
;; smooth scroll
;;; Scrolling
(
setq
hscroll-margin
2
hscroll-step
1
scroll-conservatively
101
scroll-margin
0
scroll-preserve-screen-position
t
auto-window-vscroll
nil
mouse-wheel-scroll-amount
'
(
2
((
shift
)
.
hscroll
))
mouse-wheel-scroll-amount-horizontal
2
)
(
setq-default
auto-image-file-mode
t
)
...
...
@@ -163,6 +170,12 @@
(
use-package
display-fill-column-indicator
:ensure
nil
))
(
use-package
compile
:config
(
setq
compilation-always-kill
t
compilation-ask-about-save
nil
compilation-scroll-output
'first-error
))
;;; Minibuffers
;; Allow for minibuffer-ception.
(
setq
enable-recursive-minibuffers
t
)
...
...
@@ -229,12 +242,6 @@
:defer
t
:hook
(
isearch-mode
.
anzu-mode
)))
(
use-package
unicode-fonts
:ensure
t
:init
(
setq
unicode-fonts-skip-font-groups
'
(
decorative
low-quality-glyphs
))
(
unicode-fonts-setup
))
;;; doom themes
(
use-package
doom-themes
:ensure
t
...
...
@@ -244,17 +251,16 @@
;;; Undo tree mode
(
use-package
undo-tree
:ensure
t
:defer
t
:init
(
progn
(
setq
undo-tree-visualizer-timestamps
t
undo-tree-visualizer-diff
t
;; 10X bump of the undo limits to avoid issues with premature
;; Emacs GC which truncages the undo history very aggresively
undo-limit
800000
undo-strong-limit
12000000
undo-outer-limit
120000000
)
(
global-undo-tree-mode
)))
:hook
(
after-init
.
global-undo-tree-mode
)
:config
(
setq
undo-tree-visualizer-timestamps
t
undo-tree-visualizer-diff
t
;; 10X bump of the undo limits to avoid issues with premature
;; Emacs GC which truncages the undo history very aggresively
undo-limit
800000
undo-strong-limit
12000000
undo-outer-limit
120000000
)
(
global-undo-tree-mode
))
(
use-package
writeroom-mode
:ensure
t
...
...
This diff is collapsed.
Click to expand it.
lisp/init-org.el
+
1
−
40
View file @
d1fac4aa
...
...
@@ -2,36 +2,6 @@
;;; Commentary:
;;; Code:
(
defvar
org-ctexart-class
'
(
"ctexart"
"\\documentclass[11pt]{ctexart}"
(
"\\section{%s}"
.
"\\section*{%s}"
)
(
"\\subsection{%s}"
.
"\\subsection*{%s}"
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
)
(
"\\paragraph{%s}"
.
"\\paragraph*{%s}"
)
(
"\\subparagraph{%s}"
.
"\\subparagraph*{%s}"
)))
(
defvar
org-complex-ctexbook-class
'
(
"cctexbook"
"\\documentclass[11pt]{ctexbook}"
(
"\\part{%s}"
.
"\\part*{%s}"
)
(
"\\chapter{%s}"
.
"\\chapter*{%s}"
)
(
"\\section{%s}"
.
"\\section*{%s}"
)
(
"\\subsection{%s}"
.
"\\subsection*{%s}"
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
)))
(
defvar
org-simple-ctexbook-class
'
(
"sctexbook"
"\\documentclass[11pt]{ctexbook}"
(
"\\chapter{%s}"
.
"\\chapter*{%s}"
)
(
"\\section{%s}"
.
"\\section*{%s}"
)
(
"\\subsection{%s}"
.
"\\subsection*{%s}"
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
)))
(
defvar
org-user-latex-class
(
list
org-ctexart-class
org-complex-ctexbook-class
org-simple-ctexbook-class
))
(
defvar
roam/default-capture
'
(
"d"
"default"
plain
"%?"
:if-new
(
file+head
"${slug}.org"
...
...
@@ -85,7 +55,7 @@
(
use-package
org-roam
:if
(
and
user/enable-org-roam
user/enable-org
)
:ensure
t
:ensure
org-roam
:hook
(
after-init
.
org-roam-setup
)
:custom
(
org-roam-directory
user/org-roam-dir
)
...
...
@@ -96,14 +66,6 @@
(
add-to-list
'user/roam-templates
roam/default-capture
)
(
setq
org-roam-capture-templates
user/roam-templates
))
(
use-package
org-journal
:if
user/enable-org
:ensure
t
:config
(
setq
org-journal-file-type
user/org-journal-type
)
(
setq
org-journal-dir
(
expand-file-name
"journal"
user/notes-dir
)
org-journal-file-format
"%Y-%m-%d.org"
))
(
use-package
gnuplot
:ensure
gnuplot
:defer
t
)
...
...
@@ -114,6 +76,5 @@
(
add-hook
'org-mode-hook
#'
valign-mode
)
:diminish
valign-mode
)
(
provide
'init-org
)
;;; init-org.el ends here
This diff is collapsed.
Click to expand it.
lisp/keybind
ing
s.el
→
lisp/keybinds.el
+
8
−
2
View file @
d1fac4aa
...
...
@@ -2,9 +2,15 @@
;;; Commentary:
;;; Code:
(
defvar
emacs-default
-map
(
make-sparse-keymap
)
(
defvar
user/leader
-map
(
make-sparse-keymap
)
"Base keymap for all Emacs leader key commands."
)
(
defvar
user/leader-key
"SPC"
"The leader prefix key."
)
(
defvar
user/localleader-key
"SPC m"
"The localleader prefix key."
)
;;; Whichkey
(
use-package
which-key
:ensure
t
...
...
@@ -237,5 +243,5 @@
"mrta"
'org-roam-tag-add
"mrtd"
'org-roam-tag-remove
))
(
provide
'keybind
ing
s
)
(
provide
'keybinds
)
;;; keybindings.el ends here
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment