Skip to content

Commit cf0439f

Browse files
author
liquanwei
committed
feat: add C-- key binding
1 parent 5ab1a62 commit cf0439f

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

init.el

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,31 @@
2929
;; If you edit it by hand, you could mess it up, so be careful.
3030
;; Your init file should contain only one such instance.
3131
;; If there is more than one, they won't work right.
32-
'(package-selected-packages
33-
(quote
34-
(company-quickhelp company-tern window-purpose markdown-preview-mode markdown-mode python-mode editorconfig helpful pass diminish dashboard snazzy-theme base16-theme dante grizzl hackernews youdao-dictionary counsel-projectile projectile avy magit whitespace-cleanup-mode counsel-dash haskell-mode web-mode nodejs-repl emmet-mode dumb-jump dockerfile-mode company-jedi company pyim eshell-git-prompt smartparens mode-icons org-download s use-package))))
32+
'(auto-save-file-name-transforms (quote ((".*" "~/.emacs.d/autosaves/" t))))
33+
'(backup-directory-alist (quote ((".*" . "~/.emacs.d/backups/"))))
34+
'(browse-url-browser-function (quote eww-browse-url))
35+
'(column-number-mode t)
36+
'(custom-safe-themes
37+
(quote
38+
("b3bcf1b12ef2a7606c7697d71b934ca0bdd495d52f901e73ce008c4c9825a3aa" "3f67aee8f8d8eedad7f547a346803be4cc47c420602e19d88bdcccc66dba033b" "d9dab332207600e49400d798ed05f38372ec32132b3f7d2ba697e59088021555" "0809485f08aa8c9b0100033eaa2d04f6a7410c2afcdbd76ce368a7a8e5744ffb" default)))
39+
'(org-download-screenshot-method "xclip -selection clipboard -t image/png -o > %s")
40+
'(org-export-backends (quote (ascii html icalendar latex md odt)))
41+
'(org-trello-current-prefix-keybinding "C-c o" nil (org-trello))
42+
'(org-trello-files
43+
(seq-filter
44+
(lambda
45+
(x)
46+
(s-suffix\? ".org" x))
47+
(directory-files "~/org/trello" t)) nil (org-trello))
48+
'(package-selected-packages
49+
(quote
50+
(org-trello magithub magit-todos nginx-mode ox-gfm ox-pandoc web-beautify geiser direx ag which-key lsp-javascript html-mode sass-mode less-mode dot-mode gitter lsp-javascript-typescript rust-mode lsp-flycheck lsp-vue company-lsp ht vue-mode kv lsp-mode json-mode company-quickhelp company-tern window-purpose markdown-preview-mode markdown-mode python-mode editorconfig helpful pass diminish dashboard snazzy-theme base16-theme dante grizzl hackernews youdao-dictionary counsel-projectile projectile avy magit whitespace-cleanup-mode counsel-dash haskell-mode web-mode nodejs-repl emmet-mode dumb-jump dockerfile-mode company-jedi company pyim eshell-git-prompt smartparens mode-icons org-download s use-package))))
3551
(custom-set-faces
3652
;; custom-set-faces was added by Custom.
3753
;; If you edit it by hand, you could mess it up, so be careful.
3854
;; Your init file should contain only one such instance.
3955
;; If there is more than one, they won't work right.
56+
'(lsp-face-highlight-textual ((t (:foreground "steel blue"))))
4057
'(markdown-code-face ((t (:inherit fixed-pitch :background "gray20" :foreground "dark orange"))))
4158
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 2.0))))
4259
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.8)))))

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ make install
3434
## 基础快捷键
3535

3636
* F2 自动更新本配置文件
37+
* C-- 相当于执行M-x
3738
* C-x C-n 下一个window
3839
* C-x C-p 前一个window
3940
* C-t 交换当前位置与前一个位置的字符

setting.org

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
(define-key global-map (kbd "C-x C-n") '(lambda () (interactive) (other-window 1)))
4545
(define-key global-map (kbd "C-x C-p") '(lambda () (interactive) (other-window -1)))
46+
(define-key global-map (kbd "C--") 'execute-extended-command)
4647

4748
(setq truncate-lines t)
4849

@@ -175,10 +176,14 @@
175176
(file "/sync/org/oh-my-life.org")
176177
"* TODO %?")
177178
("w" "for work" entry
178-
(file+datetree+prompt "/sync/org/work.org")
179+
(file+datetree "/sync/org/work.org")
179180
"* TODO %? [%]"))))
180181
#+END_SRC
181182

183+
#+RESULTS:
184+
| l | oh-my-life | entry | (file /sync/org/oh-my-life.org) | * TODO %? |
185+
| w | for work | entry | (file+datetree /sync/org/work.org) | * TODO %? [%] |
186+
182187
*** org drag image
183188

184189
拖动图片到org-mode中
@@ -459,6 +464,9 @@
459464
:bind (("C-c g c" . magit-checkout)
460465
("C-c g f c" . magit-file-checkout)))
461466
#+END_SRC
467+
468+
#+RESULTS:
469+
462470
** avy
463471
#+BEGIN_SRC emacs-lisp
464472
(use-package avy
@@ -474,14 +482,21 @@
474482
:config
475483
(setq projectile-create-missing-test-files t)
476484
(setq projectile-enable-caching t)
477-
(setq projectile-require-project-root nil))
485+
(setq projectile-require-project-root nil)
486+
(projectile-register-project-type
487+
'npm '("package.json")
488+
:compile "npm run build"
489+
:test "npm run test"
490+
:run "npm run start"
491+
:test-suffix ".spec"))
478492

479493
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
480494

495+
481496
#+END_SRC
482497

483498
#+RESULTS:
484-
: t
499+
: projectile-command-map
485500

486501

487502
** hackernews
@@ -656,22 +671,6 @@
656671
:config
657672
(setq inferior-lisp-program "sbcl"))
658673
#+END_SRC
659-
** typescript
660-
661-
#+BEGIN_SRC emacs-lisp
662-
(use-package tide :ensure)
663-
664-
(defun my-ts-mode-configuration ()
665-
(interactive)
666-
(tide-setup)
667-
(define-key typescript-mode-map (kbd "M-/") 'tide-jump-to-implementation)
668-
(define-key typescript-mode-map (kbd "M-?") 'tide-references))
669-
670-
(add-hook 'typescript-mode-hook #'my-ts-mode-configuration)
671-
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
672-
#+END_SRC
673-
674-
#+RESULTS:
675674
** which-key
676675

677676
#+BEGIN_SRC emacs-lisp

0 commit comments

Comments
 (0)