25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

38 satır
2.0 KiB

  1. ((c++-mode . ((eval . (company-clang-set-prefix "main.cpp"))
  2. (eval . (flycheck-mode 0))
  3. (eval . (rainbow-mode 0))))
  4. (nil . ((eval . (progn
  5. (defvar context-mode-map (make-sparse-keymap)
  6. "Keymap while context-mode is active.")
  7. (define-minor-mode context-mode
  8. "A temporary minor mode to be activated only specific to a buffer."
  9. nil
  10. :lighter " [f2]-Context"
  11. context-mode-map)
  12. (context-mode 1)
  13. ;; additional scripts
  14. (defun save-and-find-test-script-and-compile ()
  15. (interactive)
  16. (let ((build-script-name "test.bat"))
  17. (save-and-find-build-script-and-compile)))
  18. (defun save-and-find-run-script-and-compile ()
  19. (interactive)
  20. (let ((build-script-name "run.bat"))
  21. (save-and-find-build-script-and-compile)))
  22. (defun save-and-find-debug-script-and-compile ()
  23. (interactive)
  24. (let ((build-script-name "debug.bat"))
  25. (save-and-find-build-script-and-compile)))
  26. (defhydra hydra-context (context-mode-map "<f2>")
  27. "Context Actions:"
  28. ("b" save-and-find-build-script-and-compile "build" :color blue)
  29. ("r" save-and-find-run-script-and-compile "run" :color blue)
  30. ("d" save-and-find-debug-script-and-compile "debug" :color blue)
  31. ("t" save-and-find-test-script-and-compile "test" :color blue)
  32. ("o" browse-file-directory "open" :color blue)
  33. ("q" nil "quit" :color blue))
  34. (define-key context-mode-map (kbd "<f2>") 'hydra-context/body))))))