diff --git a/init.el b/init.el index 7d23a5235e6e2b92d62b1d0006cf1441e62836e7..6e85229185cd7be1e445dccba8d4172c2081be0b 100644 --- a/init.el +++ b/init.el @@ -134,6 +134,7 @@ (add-hook 'prog-mode-hook (lambda () (setq truncate-lines t))) ;;; Packages=============================================================================== +(require 'package) (setq package--init-file-ensured t package-enable-at-startup nil package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/") @@ -144,6 +145,11 @@ (if (< emacs-major-version 27.0) (package-initialize) ) +(or (package-installed-p 'use-package) + (progn +;; (package-refresh-contents) + (package-install 'use-package)) + ) ;;--------------------------------------------------------------------------------------- ;;; Completion============================================================================= @@ -315,13 +321,11 @@ "f s" 'save-buffer "SPC" 'counsel-M-x "s s" 'swiper -;; "s r" 'helm-swoop "h i" 'counsel-imenu -;; "h f" 'helm-flycheck ;; buffer "b d" 'kill-current-buffer "b k" 'kill-buffer -;; "b b" 'helm-mini + "b b" 'counsel-switch-buffer ;; magit----------------------------------- "g s" 'magit-status "g d" 'magit-diff-range diff --git a/lisp/keybinding.el b/lisp/keybinding.el deleted file mode 100644 index ff2f5c8d9c4a6153ff7eab0b491d377d596dc4f5..0000000000000000000000000000000000000000 --- a/lisp/keybinding.el +++ /dev/null @@ -1,71 +0,0 @@ -;;; 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