Skip to content
Snippets Groups Projects
Commit 2d67e43e authored by MoScribe's avatar MoScribe
Browse files

add installation of use-package

parent 19132567
No related branches found
No related tags found
No related merge requests found
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
(add-hook 'prog-mode-hook (lambda () (setq truncate-lines t))) (add-hook 'prog-mode-hook (lambda () (setq truncate-lines t)))
;;; Packages=============================================================================== ;;; Packages===============================================================================
(require 'package)
(setq package--init-file-ensured t (setq package--init-file-ensured t
package-enable-at-startup nil package-enable-at-startup nil
package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/") package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/")
...@@ -144,6 +145,11 @@ ...@@ -144,6 +145,11 @@
(if (< emacs-major-version 27.0) (if (< emacs-major-version 27.0)
(package-initialize) (package-initialize)
) )
(or (package-installed-p 'use-package)
(progn
;; (package-refresh-contents)
(package-install 'use-package))
)
;;--------------------------------------------------------------------------------------- ;;---------------------------------------------------------------------------------------
;;; Completion============================================================================= ;;; Completion=============================================================================
...@@ -315,13 +321,11 @@ ...@@ -315,13 +321,11 @@
"f s" 'save-buffer "f s" 'save-buffer
"SPC" 'counsel-M-x "SPC" 'counsel-M-x
"s s" 'swiper "s s" 'swiper
;; "s r" 'helm-swoop
"h i" 'counsel-imenu "h i" 'counsel-imenu
;; "h f" 'helm-flycheck
;; buffer ;; buffer
"b d" 'kill-current-buffer "b d" 'kill-current-buffer
"b k" 'kill-buffer "b k" 'kill-buffer
;; "b b" 'helm-mini "b b" 'counsel-switch-buffer
;; magit----------------------------------- ;; magit-----------------------------------
"g s" 'magit-status "g s" 'magit-status
"g d" 'magit-diff-range "g d" 'magit-diff-range
......
;;; keybinding.el --- This is a file about keyboard setting
;;; Commentary:
;; Here gets some keyboards that could be used when the
;; Emacs started.
;;; code:
(require 'user-fun)
(require 'basic)
(defun install-key-pack ()
" "
(let ((key-pack-list
'(evil)))
(dolist (pack key-pack-list)
(require-package pack))
))
(install-key-pack)
;;; Evil
;;=====================================================================
(require 'evil)
(evil-mode 1)
;;=====================================================================
;;; helm
;; ==================================================================
(global-set-key (kbd "M-x") #'helm-M-x)
(global-set-key (kbd "C-x C-f") #'helm-find-files)
;; ==================================================================
;;; Org mode global keys
;;==================================================================
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-iswitchb)
;;==================================================================
;;; Youdao search
;;==================================================================
(global-set-key (kbd "M-s s") 'youdao-dictionary-search-from-input)
(global-set-key (kbd "M-s t") 'youdao-dictionary-search-at-point+)
;;==================================================================
;;; Search
;;==================================================================
(global-set-key "\C-s" 'helm-swoop-without-pre-input)
;;; Recentf mode
;;------------------------------------------------------------------------
(global-set-key (kbd "\C-cr") 'recentf-open-files)
;;------------------------------------------------------------------------
;;; disaster
;; ===================================================================================
(global-set-key (kbd "\C-cd") 'disaster)
;; ===================================================================================
;;; windows jump
;;------------------------------------------------------------------------------------
(global-set-key (kbd "M-s r") 'window-jump-right)
(global-set-key (kbd "M-s l") 'window-jump-left)
(global-set-key (kbd "M-s u") 'window-jump-up)
(global-set-key (kbd "M-s d") 'window-jump-down)
;;------------------------------------------------------------------------------------
(provide 'keybinding)
;;; keyboard.el ends here
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment