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
2c5f7a9e
Commit
2c5f7a9e
authored
4 years ago
by
MoScribe
Browse files
Options
Downloads
Patches
Plain Diff
fix package function
parent
7e21ce7f
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
init.el
+31
-19
31 additions, 19 deletions
init.el
lisp/keybindings.el
+1
-0
1 addition, 0 deletions
lisp/keybindings.el
lisp/program/program.el
+5
-0
5 additions, 0 deletions
lisp/program/program.el
lisp/use-org/use-org.el
+6
-0
6 additions, 0 deletions
lisp/use-org/use-org.el
with
43 additions
and
19 deletions
init.el
+
31
−
19
View file @
2c5f7a9e
...
...
@@ -8,7 +8,13 @@
;;; Code:
;;======================================================================================
;; (setq debug-on-error t)
(
setq
debug-on-error
t
)
(
let
(
;; adjust garbage collection at startup
(
gc-cons-threshold
most-positive-fixnum
)
(
gc-cons-percentage
0.6
))
;; Use a hook so the messages doesn't get clobbered by other messages.
(
add-hook
'emacs-startup-hook
...
...
@@ -20,9 +26,9 @@
gcs-done
)))
;; adjust garbage collection thresholds during startup, and thereafter
(
setq
gc-cons-threshold
(
*
128
1024
1024
))
(
add-hook
'emacs-startup-hook
(
lambda
()
(
setq
gc-cons-
threshold
(
*
20
1024
1024
)
)))
;; (add-hook 'emacs-startup-hook
;; (lambda () (setq gc-cons-threshold most-positive-fixnum)
;;
(setq gc-cons-
percentage 0.6
)))
;; extract different file for emacs
(
setq
custom-file
(
expand-file-name
"custom.el"
user-emacs-directory
))
...
...
@@ -40,15 +46,6 @@
(
expand-file-name
"elpa"
user-emacs-directory
)
"Packages install by package-initilize."
)
;; variables----------------------------------------------------------------------------
(
defvar
helm-display-buffer-regexp
`
(
"*.*helm.**"
(
display-buffer-in-side-window
)
(
inhibit-same-window
.
t
)
(
side
.
bottom
)
(
window-width
.
0.6
)
(
window-height
.
0.4
)))
;;; My Functions=======================================================================
(
defun
open-init-file
()
"Find and open the init.el."
...
...
@@ -209,13 +206,21 @@
(
use-package
snails
:load-path
"lisp/snails"
:bind
((
"C-c s s"
.
snails
))
:bind
((
"C-c s s"
.
'
snails
))
)
(
use-package
window-jump
:ensure
t
)
:ensure
t
:bind
((
"C-c w l"
.
'window-jump-right
)
(
"C-c w h"
.
'window-jump-left
)
(
"C-c w k"
.
'window-jump-up
)
(
"C-c w j"
.
'window-jump-down
)
(
"C-c w 2"
.
'split-window-right
)
(
"C-c w 0"
.
'delete-window
)
(
"C-c w 1"
.
'delete-other-windows
)
))
;; Helm------------------------------------------------------------------------------------
(
use-package
popwin
:ensure
t
)
...
...
@@ -230,7 +235,8 @@
:diminish
projectile-mode
:bind
((
"C-c p f"
.
'counsel-projectile-find-file
)
(
"C-c p p"
.
'counsel-projectile-switch-project
)
(
"C-c p b"
.
'counsel-projectile-switch-to-buffer
))
(
"C-c p b"
.
'counsel-projectile-switch-to-buffer
)
(
"C-c p k"
.
'projectile-kill-buffers
))
)
(
use-package
recentf
:defer
1
)
...
...
@@ -291,10 +297,16 @@
:diminish
which-key-mode
)
(
require
'keybindings
)
)
;;; self-defined packages
(
use-package
program
:load-path
"lisp/program"
)
:load-path
"lisp/program"
:hook
prog-mode
)
(
use-package
use-org
:load-path
"lisp/use-org"
:hook
org-mode
)
(
provide
'init
)
;;; init.el ends here
This diff is collapsed.
Click to expand it.
lisp/keybindings.el
+
1
−
0
View file @
2c5f7a9e
...
...
@@ -28,6 +28,7 @@
"p h"
'counsel-projectile
"p p"
'counsel-projectile-switch-project
"p b"
'counsel-projectile-switch-to-buffer
"p k"
'projectile-kill-buffers
;; windows options-------------------------
"w l"
'window-jump-right
"w h"
'window-jump-left
...
...
This diff is collapsed.
Click to expand it.
lisp/program/program.el
+
5
−
0
View file @
2c5f7a9e
...
...
@@ -15,5 +15,10 @@
(
require
'prog-haskell
)
(
require
'prog-lsp
)
(
defun
program
()
"Manage programming issues for Emacs."
(
interactive
)
)
(
provide
'program
)
;;; program.el ends here
This diff is collapsed.
Click to expand it.
lisp/use-org.el
→
lisp/use-org
/use-org
.el
+
6
−
0
View file @
2c5f7a9e
;; use-org.el --- the org mode file
;;; Commentary:
;;; Code:
...
...
@@ -34,5 +35,10 @@
(
defvar
org-user-latex-class
(
list
org-ctexart-class
org-complex-ctexbook-class
org-simple-ctexbook-class
))
(
defun
use-org
()
"Manage useage of 'org-mode'."
(
interactive
)
(
message
"Welcome to the world of writting"
))
(
provide
'use-org
)
;;; use-org 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