Advertisement
Guest User

Untitled

a guest
Nov 29th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. ;;------------------------------mode------------------------------
  2.  
  3. ;;(helm-mode)
  4. (add-to-list 'load-path "~/.emacs.d/elpa/autopair-0.3")
  5. (require 'autopair)
  6. (autopair-global-mode)
  7. (ido-mode)
  8. (global-linum-mode)
  9. (evil-mode)
  10.  
  11. (add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-1.4")
  12. (require 'auto-complete)
  13.  
  14. ;;------------------------------settings------------------------------
  15.  
  16.  
  17. (custom-set-variables
  18. ;; custom-set-variables was added by Custom.
  19. ;; If you edit it by hand, you could mess it up, so be careful.
  20. ;; Your init file should contain only one such instance.
  21. ;; If there is more than one, they won't work right.
  22. '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
  23. '(custom-enabled-themes nil)
  24. '(custom-safe-themes (quote ("3c44eedd72c5ec5d1664e9fb828cc2f6caaa434c6cb929f454e02e8a272bbbe0" "da094437b48c936dcc342acf1a76a3b93cb818a7186360fe3f55d54588aeb453" default)))
  25. '(fringe-mode 0 nil (fringe))
  26. '(markdown-command "pandoc -s -c ~/.emacs.d/style.css --toc --highlight-style espresso -N --self-contained --data-dir=~/.emacs.d/")
  27. '(markdown-enable-math t)
  28. '(scroll-bar-mode nil)
  29. '(send-mail-function (quote mailclient-send-it))
  30. '(show-paren-mode t)
  31. '(text-mode-hook (quote (text-mode-hook-identify)))
  32. '(tool-bar-mode nil))
  33. (set-default-font "consolas 17")
  34. (setq-default line-spacing 6)
  35. (setq default-frame-alist
  36. '((height . 47) (width . 160)(alpha .90 90) (top . 60) (left . 180) (tool-bar-lines . 0)))
  37. (setq inhibit-startup-message t)
  38. (set 'yes-or-no-p 'y-or-n-p)
  39. (setq linum-format "|-%d-|")
  40.  
  41. (setq ac-quick-help-prefer-pos-tip t) ;default is
  42. (setq ac-quick-help-prefer-pos-tip t) ;default is
  43. (add-to-list 'ac-dictionary-directories "~/.emacs.d/")
  44. (ac-config-default)
  45. (add-hook 'before-save-hook 'gofmt-before-save)
  46.  
  47.  
  48.  
  49.  
  50. (setq-default make-backup-files nil)
  51. (defun load-molo-theme ()
  52. (interactive)
  53. (load "~/.emacs.d/elpa/color-theme-lime/lime-theme.el"))
  54.  
  55.  
  56. ;;------------------------------key-map------------------------------
  57. (add-hook 'go-mode-hook '(lambda ()
  58. (global-set-key (kbd "C-c d") 'godoc-at-point)))
  59.  
  60. (add-hook 'c-mode-hook '(lambda ()
  61. (global-set-key (kbd "C-c d") 'c-man-at-point)))
  62. (global-set-key "\C-cl" 'load-molo-theme)
  63. (global-set-key (kbd "C-^") 'er/expand-region)
  64. (define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark)
  65. (define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
  66. (global-set-key "\C-x\C-m" 'execute-extended-command)
  67. ;;(global-set-key (kbd "C-c d") 'godoc-at-point)
  68. (global-set-key (kbd "C-c o") 'pop-global-mark)
  69. (global-set-key (kbd "C-c C-d") 'c-man-at-point)
  70.  
  71.  
  72. (defun c-man (NAME)
  73. "Find the C manual page corresponding to the function NAME.
  74. Search for man(2) and man(3) by default."
  75. (if (file-exists-p (concat "/usr/share/man/man2/" NAME ".2.gz"))
  76. (man (concat NAME "(2)"))
  77. (if (file-exists-p (concat "/usr/share/man/man3/" NAME ".3.gz"))
  78. (man (concat NAME "(3)"))
  79. (man NAME))))
  80.  
  81. (defun c-man-at-point ()
  82. "Find a C man page with the current word if present, otherwise
  83. require input from user."
  84. (interactive)
  85. (when (not (setq cur-word (current-word)))
  86. (setq cur-word (read-from-minibuffer "Man Page: ")))
  87. (if (string= "" cur-word)
  88. (message "No man args given")
  89. (c-man cur-word)))
  90. (provide 'auto-config)
  91.  
  92. ;;------------------------------man-follo----------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement