1. ;; -*- mode: emacs-lisp -*-
  2. ;; This file is loaded by Spacemacs at startup.
  3. ;; It must be stored in your home directory.
  4. (defun dotspacemacs/layers ()
  5. "Configuration Layers declaration.
  6. You should not put any user code in this function besides modifying the variable
  7. values."
  8. (setq-default
  9. ;; Base distribution to use. This is a layer contained in the directory
  10. ;; `+distribution'. For now available distributions are `spacemacs-base'
  11. ;; or `spacemacs'. (default 'spacemacs)
  12. dotspacemacs-distribution 'spacemacs
  13. ;; List of additional paths where to look for configuration layers.
  14. ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
  15. dotspacemacs-configuration-layer-path '()
  16. ;; List of configuration layers to load. If it is the symbol `all' instead
  17. ;; of a list then all discovered layers will be installed.
  18. dotspacemacs-configuration-layers
  19. '(
  20. ;; ----------------------------------------------------------------
  21. ;; Example of useful layers you may want to use right away.
  22. ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
  23. ;; <M-m f e R> (Emacs style) to install them.
  24. ;; ----------------------------------------------------------------
  25. ;; auto-completion
  26. ;; better-defaults
  27. emacs-lisp
  28. ;; git
  29. ;; markdown
  30. ;; org
  31. ;; (shell :variables
  32. ;; shell-default-height 30
  33. ;; shell-default-position 'bottom)
  34. ;; spell-checking
  35. ;; syntax-checking
  36. ;; version-control
  37. )
  38. ;; List of additional packages that will be installed without being
  39. ;; wrapped in a layer. If you need some configuration for these
  40. ;; packages, then consider creating a layer. You can also put the
  41. ;; configuration in `dotspacemacs/user-config'.
  42. dotspacemacs-additional-packages '()
  43. ;; A list of packages and/or extensions that will not be install and loaded.
  44. dotspacemacs-excluded-packages '()
  45. ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
  46. ;; are declared in a layer which is not a member of
  47. ;; the list `dotspacemacs-configuration-layers'. (default t)
  48. dotspacemacs-delete-orphan-packages t))
  49. (defun dotspacemacs/init ()
  50. "Initialization function.
  51. This function is called at the very startup of Spacemacs initialization
  52. before layers configuration.
  53. You should not put any user code in there besides modifying the variable
  54. values."
  55. ;; This setq-default sexp is an exhaustive list of all the supported
  56. ;; spacemacs settings.
  57. (setq-default
  58. ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
  59. ;; possible. Set it to nil if you have no way to use HTTPS in your
  60. ;; environment, otherwise it is strongly recommended to let it set to t.
  61. ;; This variable has no effect if Emacs is launched with the parameter
  62. ;; `--insecure' which forces the value of this variable to nil.
  63. ;; (default t)
  64. dotspacemacs-elpa-https t
  65. ;; Maximum allowed time in seconds to contact an ELPA repository.
  66. dotspacemacs-elpa-timeout 5
  67. ;; If non nil then spacemacs will check for updates at startup
  68. ;; when the current branch is not `develop'. (default t)
  69. dotspacemacs-check-for-update t
  70. ;; One of `vim', `emacs' or `hybrid'. Evil is always enabled but if the
  71. ;; variable is `emacs' then the `holy-mode' is enabled at startup. `hybrid'
  72. ;; uses emacs key bindings for vim's insert mode, but otherwise leaves evil
  73. ;; unchanged. (default 'vim)
  74. dotspacemacs-editing-style 'vim
  75. ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
  76. dotspacemacs-verbose-loading nil
  77. ;; Specify the startup banner. Default value is `official', it displays
  78. ;; the official spacemacs logo. An integer value is the index of text
  79. ;; banner, `random' chooses a random text banner in `core/banners'
  80. ;; directory. A string value must be a path to an image format supported
  81. ;; by your Emacs build.
  82. ;; If the value is nil then no banner is displayed. (default 'official)
  83. dotspacemacs-startup-banner 'official
  84. ;; List of items to show in the startup buffer. If nil it is disabled.
  85. ;; Possible values are: `recents' `bookmarks' `projects'.
  86. ;; (default '(recents projects))
  87. dotspacemacs-startup-lists '(recents projects)
  88. ;; Number of recent files to show in the startup buffer. Ignored if
  89. ;; `dotspacemacs-startup-lists' doesn't include `recents'. (default 5)
  90. dotspacemacs-startup-recent-list-size 5
  91. ;; Default major mode of the scratch buffer (default `text-mode')
  92. dotspacemacs-scratch-mode 'text-mode
  93. ;; List of themes, the first of the list is loaded when spacemacs starts.
  94. ;; Press <SPC> T n to cycle to the next theme in the list (works great
  95. ;; with 2 themes variants, one dark and one light)
  96. dotspacemacs-themes '(spacemacs-dark
  97. spacemacs-light
  98. solarized-light
  99. solarized-dark
  100. leuven
  101. monokai
  102. zenburn)
  103. ;; If non nil the cursor color matches the state color in GUI Emacs.
  104. dotspacemacs-colorize-cursor-according-to-state t
  105. ;; Default font. `powerline-scale' allows to quickly tweak the mode-line
  106. ;; size to make separators look not too crappy.
  107. dotspacemacs-default-font '("Source Code Pro"
  108. :size 13
  109. :weight normal
  110. :width normal
  111. :powerline-scale 1.1)
  112. ;; The leader key
  113. dotspacemacs-leader-key "SPC"
  114. ;; The leader key accessible in `emacs state' and `insert state'
  115. ;; (default "M-m")
  116. dotspacemacs-emacs-leader-key "M-m"
  117. ;; Major mode leader key is a shortcut key which is the equivalent of
  118. ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
  119. dotspacemacs-major-mode-leader-key ","
  120. ;; Major mode leader key accessible in `emacs state' and `insert state'.
  121. ;; (default "C-M-m)
  122. dotspacemacs-major-mode-emacs-leader-key "C-M-m"
  123. ;; These variables control whether separate commands are bound in the GUI to
  124. ;; the key pairs C-i, TAB and C-m, RET.
  125. ;; Setting it to a non-nil value, allows for separate commands under <C-i>
  126. ;; and TAB or <C-m> and RET.
  127. ;; In the terminal, these pairs are generally indistinguishable, so this only
  128. ;; works in the GUI. (default nil)
  129. dotspacemacs-distinguish-gui-tab nil
  130. ;; (Not implemented) dotspacemacs-distinguish-gui-ret nil
  131. ;; The command key used for Evil commands (ex-commands) and
  132. ;; Emacs commands (M-x).
  133. ;; By default the command key is `:' so ex-commands are executed like in Vim
  134. ;; with `:' and Emacs commands are executed with `<leader> :'.
  135. dotspacemacs-command-key ":"
  136. ;; If non nil `Y' is remapped to `y$'. (default t)
  137. dotspacemacs-remap-Y-to-y$ t
  138. ;; Name of the default layout (default "Default")
  139. dotspacemacs-default-layout-name "Default"
  140. ;; If non nil the default layout name is displayed in the mode-line.
  141. ;; (default nil)
  142. dotspacemacs-display-default-layout nil
  143. ;; If non nil then the last auto saved layouts are resume automatically upon
  144. ;; start. (default nil)
  145. dotspacemacs-auto-resume-layouts nil
  146. ;; Location where to auto-save files. Possible values are `original' to
  147. ;; auto-save the file in-place, `cache' to auto-save the file to another
  148. ;; file stored in the cache directory and `nil' to disable auto-saving.
  149. ;; (default 'cache)
  150. dotspacemacs-auto-save-file-location 'cache
  151. ;; Maximum number of rollback slots to keep in the cache. (default 5)
  152. dotspacemacs-max-rollback-slots 5
  153. ;; If non nil then `ido' replaces `helm' for some commands. For now only
  154. ;; `find-files' (SPC f f), `find-spacemacs-file' (SPC f e s), and
  155. ;; `find-contrib-file' (SPC f e c) are replaced. (default nil)
  156. dotspacemacs-use-ido nil
  157. ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
  158. dotspacemacs-helm-resize nil
  159. ;; if non nil, the helm header is hidden when there is only one source.
  160. ;; (default nil)
  161. dotspacemacs-helm-no-header nil
  162. ;; define the position to display `helm', options are `bottom', `top',
  163. ;; `left', or `right'. (default 'bottom)
  164. dotspacemacs-helm-position 'bottom
  165. ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
  166. ;; several times cycle between the kill ring content. (default nil)
  167. dotspacemacs-enable-paste-micro-state nil
  168. ;; Which-key delay in seconds. The which-key buffer is the popup listing
  169. ;; the commands bound to the current keystroke sequence. (default 0.4)
  170. dotspacemacs-which-key-delay 0.4
  171. ;; Which-key frame position. Possible values are `right', `bottom' and
  172. ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
  173. ;; right; if there is insufficient space it displays it at the bottom.
  174. ;; (default 'bottom)
  175. dotspacemacs-which-key-position 'bottom
  176. ;; If non nil a progress bar is displayed when spacemacs is loading. This
  177. ;; may increase the boot time on some systems and emacs builds, set it to
  178. ;; nil to boost the loading time. (default t)
  179. dotspacemacs-loading-progress-bar t
  180. ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
  181. ;; (Emacs 24.4+ only)
  182. dotspacemacs-fullscreen-at-startup nil
  183. ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
  184. ;; Use to disable fullscreen animations in OSX. (default nil)
  185. dotspacemacs-fullscreen-use-non-native nil
  186. ;; If non nil the frame is maximized when Emacs starts up.
  187. ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
  188. ;; (default nil) (Emacs 24.4+ only)
  189. dotspacemacs-maximized-at-startup nil
  190. ;; A value from the range (0..100), in increasing opacity, which describes
  191. ;; the transparency level of a frame when it's active or selected.
  192. ;; Transparency can be toggled through `toggle-transparency'. (default 90)
  193. dotspacemacs-active-transparency 90
  194. ;; A value from the range (0..100), in increasing opacity, which describes
  195. ;; the transparency level of a frame when it's inactive or deselected.
  196. ;; Transparency can be toggled through `toggle-transparency'. (default 90)
  197. dotspacemacs-inactive-transparency 90
  198. ;; If non nil unicode symbols are displayed in the mode line. (default t)
  199. dotspacemacs-mode-line-unicode-symbols t
  200. ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
  201. ;; scrolling overrides the default behavior of Emacs which recenters the
  202. ;; point when it reaches the top or bottom of the screen. (default t)
  203. dotspacemacs-smooth-scrolling t
  204. ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
  205. ;; derivatives. If set to `relative', also turns on relative line numbers.
  206. ;; (default nil)
  207. dotspacemacs-line-numbers nil
  208. ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
  209. ;; (default nil)
  210. dotspacemacs-smartparens-strict-mode nil
  211. ;; Select a scope to highlight delimiters. Possible values are `any',
  212. ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
  213. ;; emphasis the current one). (default 'all)
  214. dotspacemacs-highlight-delimiters 'all
  215. ;; If non nil advises quit functions to keep server open when quitting.
  216. ;; (default nil)
  217. dotspacemacs-persistent-server nil
  218. ;; List of search tool executable names. Spacemacs uses the first installed
  219. ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
  220. ;; (default '("ag" "pt" "ack" "grep"))
  221. dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
  222. ;; The default package repository used if no explicit repository has been
  223. ;; specified with an installed package.
  224. ;; Not used for now. (default nil)
  225. dotspacemacs-default-package-repository nil
  226. ;; Delete whitespace while saving buffer. Possible values are `all'
  227. ;; to aggressively delete empty line and long sequences of whitespace,
  228. ;; `trailing' to delete only the whitespace at end of lines, `changed'to
  229. ;; delete only whitespace for changed lines or `nil' to disable cleanup.
  230. ;; (default nil)
  231. dotspacemacs-whitespace-cleanup nil
  232. ))
  233. (add-to-list 'load-path "~/.emacs.d2/")
  234. (autoload 'rpm-spec-mode "rpm-spec-mode"
  235. "Mode for editing RPM spec files" t)
  236. (autoload 'markdown-mode "markdown-mode"
  237. "Major mode for editing Markdown files" t)
  238. (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
  239. (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
  240. (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
  241. (require 'neotree)
  242. (neotree-mode t)
  243. (global-set-key [f8] 'neotree-toggle)
  244. (autoload 'pkgbuild-mode "pkgbuild-mode.el" "PKGBUILD mode." t)
  245. (setq auto-mode-alist (append '(("/PKGBUILD$" . pkgbuild-mode)) auto-mode-alist))
  246. (add-to-list 'load-path "~/.emacs.d2/elfeed")
  247. (autoload 'elfeed "elfeed.el" "Read RSS feeds" t)
  248. (global-set-key (kbd "C-x w") 'elfeed)
  249. (global-set-key (kbd "C-x a") 'elfeed-add-feed)
  250. (setq elfeed-feeds
  251. '("http://www.terminally-incoherent.com/blog/feed/"))
  252. (add-to-list 'load-path "~/.emacs.d2/tabbar")
  253. (autoload 'tabbar "tabbar.el" "Create tabs in GNU Emacs" t)
  254. (require 'tabbar)
  255. (tabbar-mode t)
  256. ;(dolist (func '(tabbar-mode tabbar-forward-tab tabbar-forward-group tabbar-backward-tab tabbar-backward-group))
  257. ; (autoload func "tabbar" "Tabs at the top of buffers and easy control-tab navigation"))
  258. ; (defmacro defun-prefix-alt (name on-no-prefix on-prefix &optional do-always)
  259. ; `(defun ,name (arg)
  260. ; (interactive "P")
  261. ; ,do-always
  262. ; (if (equal nil arg)
  263. ; ,on-no-prefix
  264. ; ,on-prefix)))
  265. ; (defun-prefix-alt shk-tabbar-next (tabbar-forward-tab) (tabbar-forward-group) (tabbar-mode 1))
  266. ; (defun-prefix-alt shk-tabbar-prev (tabbar-backward-tab) (tabbar-backward-group) (tabbar-mode 1))
  267. ; (global-set-key [(control tab)] 'shk-tabbar-next)
  268. ; (global-set-key [(control shift tab)] 'shk-tabbar-prev)
  269. ; (global-set-key [(alt tab)] 'tabbar-make-tab)
  270. (defun dotspacemacs/user-init ()
  271. "Initialization function for user code.
  272. It is called immediately after `dotspacemacs/init'. You are free to put almost
  273. any user code here. The exception is org related code, which should be placed
  274. in `dotspacemacs/user-config'."
  275. )
  276. (defun dotspacemacs/user-config ()
  277. "Configuration function for user code.
  278. This function is called at the very end of Spacemacs initialization after
  279. layers configuration. You are free to put any user code."
  280. )
  281. ;; Do not write anything past this comment. This is where Emacs will
  282. ;; auto-generate custom variable definitions.
  283. (custom-set-variables
  284. ;; custom-set-variables was added by Custom.
  285. ;; If you edit it by hand, you could mess it up, so be careful.
  286. ;; Your init file should contain only one such instance.
  287. ;; If there is more than one, they won't work right.
  288. '(elfeed-feeds
  289. (quote
  290. ("http://fusion809.github.io/feed/" ""))))
  291. (custom-set-faces
  292. ;; custom-set-faces was added by Custom.
  293. ;; If you edit it by hand, you could mess it up, so be careful.
  294. ;; Your init file should contain only one such instance.
  295. ;; If there is more than one, they won't work right.
  296. )