Major overhaul
This commit is contained in:
parent
4ab3ae1125
commit
6bda25da1f
76 changed files with 7431 additions and 571 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1,5 +1,13 @@
|
|||
eshell/
|
||||
init/autoload.el
|
||||
auto-save-list
|
||||
recentf
|
||||
savehist
|
||||
saveplace
|
||||
places
|
||||
semanticdb
|
||||
ede-projects.el
|
||||
tramp
|
||||
|
||||
# compiled files
|
||||
.*
|
||||
|
|
31
Cask
31
Cask
|
@ -12,6 +12,8 @@
|
|||
(depends-on "fuzzy")
|
||||
(depends-on "use-package")
|
||||
(depends-on "smex")
|
||||
(depends-on "floobits")
|
||||
(depends-on "pos-tip")
|
||||
|
||||
;; OSX
|
||||
(depends-on "exec-path-from-shell")
|
||||
|
@ -47,18 +49,22 @@
|
|||
;; Auto-completion
|
||||
(depends-on "company")
|
||||
(depends-on "company-c-headers")
|
||||
;;(depends-on "company-cmake")
|
||||
(depends-on "company-tern")
|
||||
;; (depends-on "company-anaconda")
|
||||
(depends-on "company-anaconda")
|
||||
(depends-on "company-inf-ruby")
|
||||
;;(depends-on "auto-complete")
|
||||
;;(depends-on "auto-complete-clang")
|
||||
;;(depends-on "auto-complete-c-headers")
|
||||
;;(depends-on "ac-etags")
|
||||
;;(depends-on "ac-ispell")
|
||||
;;(depends-on "tern-auto-complete")
|
||||
;;(depends-on "ac-inf-ruby")
|
||||
;;(depends-on "jedi")
|
||||
(depends-on "company-irony")
|
||||
(depends-on "irony-mode" :git "https://github.com/Sarcasm/irony-mode")
|
||||
|
||||
(depends-on "auto-complete")
|
||||
(depends-on "auto-complete-clang")
|
||||
(depends-on "auto-complete-c-headers")
|
||||
(depends-on "ac-etags")
|
||||
(depends-on "ac-ispell")
|
||||
(depends-on "ac-anaconda")
|
||||
(depends-on "tern-auto-complete")
|
||||
(depends-on "ac-inf-ruby")
|
||||
(depends-on "jedi")
|
||||
|
||||
;; Eeeevil
|
||||
(depends-on "god-mode")
|
||||
|
@ -72,6 +78,9 @@
|
|||
(depends-on "evil-indent-textobject")
|
||||
(depends-on "evil-jumper")
|
||||
(depends-on "evil-god-state")
|
||||
(depends-on "evil-escape")
|
||||
;;(depends-on "evil-snipe" :git "https://github.com/hlissner/evil-snipe")
|
||||
;;(depends-on "evil-noautochdir" :git "https://github.com/gbarta/evil-noautochdir")
|
||||
;; evil-nerd-commenter chokes if it's installed via cask for some reason...
|
||||
(depends-on "evil-nerd-commenter")
|
||||
|
||||
|
@ -120,11 +129,13 @@
|
|||
(depends-on "js2-mode")
|
||||
(depends-on "js2-refactor")
|
||||
|
||||
(depends-on "enh-ruby-mode")
|
||||
(depends-on "ruby-refactor")
|
||||
(depends-on "rspec-mode")
|
||||
(depends-on "inf-ruby")
|
||||
(depends-on "robe")
|
||||
|
||||
;; (depends-on "anaconda")
|
||||
(depends-on "anaconda")
|
||||
|
||||
(depends-on "omnisharp")
|
||||
(depends-on "csharp-mode")
|
||||
|
|
294
core/autoloads.el
Normal file
294
core/autoloads.el
Normal file
|
@ -0,0 +1,294 @@
|
|||
;;; autoloads.el --- automatically extracted autoloads
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;;### (autoloads nil "../lib/help-fns+" "../lib/help-fns+.el" (21631
|
||||
;;;;;; 21029 0 0))
|
||||
;;; Generated autoloads from ../lib/help-fns+.el
|
||||
|
||||
(autoload 'describe-command "../lib/help-fns+" "\
|
||||
Describe an Emacs command (interactive function).
|
||||
Equivalent to using a prefix arg with `describe-function'.
|
||||
|
||||
If you use Icicles then in Icicle mode keys bound to the commands are
|
||||
shown next to them in `*Completions*. You can toggle this keys
|
||||
display on/off using `C-x C-a'.
|
||||
|
||||
\(fn FUNCTION)" t nil)
|
||||
|
||||
(autoload 'describe-option "../lib/help-fns+" "\
|
||||
Describe an Emacs user variable (option).
|
||||
Same as using a prefix arg with `describe-variable'.
|
||||
|
||||
\(fn VARIABLE &optional BUFFER)" t nil)
|
||||
|
||||
(autoload 'describe-option-of-type "../lib/help-fns+" "\
|
||||
Describe an Emacs user OPTION (variable) of a given `defcustom' TYPE.
|
||||
A prefix argument determines the type-checking behavior:
|
||||
- None: OPTION is defined with TYPE or a subtype of TYPE.
|
||||
- Plain `C-u': OPTION is defined with TYPE or a subtype of TYPE,
|
||||
or its current value is compatible with TYPE.
|
||||
- Negative: OPTION is defined with TYPE (exact match).
|
||||
- Non-negative: OPTION is defined with TYPE (exact match),
|
||||
or its current value is compatible with TYPE.
|
||||
|
||||
If TYPE is nil (default value) then *all* `defcustom' variables are
|
||||
potential candidates. That is different from using `describe-option',
|
||||
because `describe-option' includes user-variable candidates not
|
||||
defined with `defcustom' (with `*'-prefixed doc strings).
|
||||
|
||||
\(fn TYPE OPTION)" t nil)
|
||||
|
||||
(autoload 'describe-file "../lib/help-fns+" "\
|
||||
Describe the file named FILENAME.
|
||||
If FILENAME is nil, describe current directory (`default-directory').
|
||||
|
||||
Starting with Emacs 22, if the file is an image file then:
|
||||
* Show a thumbnail of the image as well.
|
||||
* If you have command-line tool `exiftool' installed and in your
|
||||
`$PATH' or `exec-path', then show EXIF data (metadata) about the
|
||||
image. See standard Emacs library `image-dired.el' for more
|
||||
information about `exiftool'.
|
||||
|
||||
If FILENAME is the name of an autofile bookmark and you use library
|
||||
`Bookmark+', then show also the bookmark information (tags etc.). In
|
||||
this case, a prefix arg shows the internal form of the bookmark.
|
||||
|
||||
In Lisp code:
|
||||
|
||||
Non-nil optional arg INTERNAL-FORM-P shows the internal form.
|
||||
Non-nil optional arg NO-ERROR-P prints an error message but does not
|
||||
raise an error.
|
||||
|
||||
\(fn FILENAME &optional INTERNAL-FORM-P NO-ERROR-P)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "../lib/hl-todo" "../lib/hl-todo.el" (21619
|
||||
;;;;;; 3856 0 0))
|
||||
;;; Generated autoloads from ../lib/hl-todo.el
|
||||
|
||||
(autoload 'hl-todo-mode "../lib/hl-todo" "\
|
||||
Highlight TODO tags in comments.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(defvar global-hl-todo-mode nil "\
|
||||
Non-nil if Global-Hl-Todo mode is enabled.
|
||||
See the command `global-hl-todo-mode' for a description of this minor mode.
|
||||
Setting this variable directly does not take effect;
|
||||
either customize it (see the info node `Easy Customization')
|
||||
or call the function `global-hl-todo-mode'.")
|
||||
|
||||
(custom-autoload 'global-hl-todo-mode "../lib/hl-todo" nil)
|
||||
|
||||
(autoload 'global-hl-todo-mode "../lib/hl-todo" "\
|
||||
Toggle Hl-Todo mode in all buffers.
|
||||
With prefix ARG, enable Global-Hl-Todo mode if ARG is positive;
|
||||
otherwise, disable it. If called from Lisp, enable the mode if
|
||||
ARG is omitted or nil.
|
||||
|
||||
Hl-Todo mode is enabled in all buffers where
|
||||
`turn-on-hl-todo-mode-if-desired' would do it.
|
||||
See `hl-todo-mode' for more information on Hl-Todo mode.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "../lib/rotate-text" "../lib/rotate-text.el"
|
||||
;;;;;; (21631 59390 0 0))
|
||||
;;; Generated autoloads from ../lib/rotate-text.el
|
||||
|
||||
(autoload 'rotate-region "../lib/rotate-text" "\
|
||||
Rotate all matches in `rotate-text-rotations' between point and mark.
|
||||
|
||||
\(fn BEG END)" t nil)
|
||||
|
||||
(autoload 'rotate-word-at-point "../lib/rotate-text" "\
|
||||
Rotate word at point based on sets in `rotate-text-rotations'.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "defuns-buffers" "defuns-buffers.el" (21630
|
||||
;;;;;; 64935 0 0))
|
||||
;;; Generated autoloads from defuns-buffers.el
|
||||
|
||||
(autoload 'my-narrow-to-region-indirect "defuns-buffers" "\
|
||||
Restrict editing in this buffer to the current region, indirectly.
|
||||
|
||||
\(fn START END)" t nil)
|
||||
|
||||
(autoload 'my--cleanup-buffers-add "defuns-buffers" "\
|
||||
|
||||
|
||||
\(fn REGEXP)" nil nil)
|
||||
|
||||
(autoload 'my-cleanup-buffers "defuns-buffers" "\
|
||||
Kill left-over temporary, dired or buried special buffers
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my-kill-matching-buffers "defuns-buffers" "\
|
||||
|
||||
|
||||
\(fn REGEXP &optional BUFFER-LIST)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "defuns-text" "defuns-text.el" (21630 61093
|
||||
;;;;;; 0 0))
|
||||
;;; Generated autoloads from defuns-text.el
|
||||
|
||||
(autoload 'my--point-at-bol-non-blank "defuns-text" "\
|
||||
|
||||
|
||||
\(fn)" nil nil)
|
||||
|
||||
(autoload 'my--surrounded-p "defuns-text" "\
|
||||
|
||||
|
||||
\(fn)" nil nil)
|
||||
|
||||
(autoload 'my\.backward-kill-to-bol-and-indent "defuns-text" "\
|
||||
Kill line to the first non-blank character. If invoked again
|
||||
afterwards, kill line to column 1.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.move-to-bol "defuns-text" "\
|
||||
Moves cursor to the first non-blank character on the line. If
|
||||
already there, move it to the true bol.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.move-to-eol "defuns-text" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.backward-delete-whitespace-to-column "defuns-text" "\
|
||||
Delete back to the previous column of whitespace, or as much
|
||||
whitespace as possible, or just one char if that's not possible.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.dumb-indent "defuns-text" "\
|
||||
Inserts a tab character (or spaces x tab-width). Checks if the
|
||||
auto-complete window is open.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.inflate-space-maybe "defuns-text" "\
|
||||
Checks if point is surrounded by {} [] () delimiters and adds a
|
||||
space on either side of the point if so.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.deflate-space-maybe "defuns-text" "\
|
||||
Checks if point is surrounded by {} [] () delimiters, and deletes
|
||||
spaces on either side of the point if so. Resorts to
|
||||
`my.backward-delete-whitespace-to-column' otherwise.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'my\.newline-and-indent "defuns-text" "\
|
||||
Newline and indent; if in a comment, auto-comment and properly
|
||||
indent the next line.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "defuns-ui" "defuns-ui.el" (21635 60933 0 0))
|
||||
;;; Generated autoloads from defuns-ui.el
|
||||
|
||||
(autoload 'load-dark-theme "defuns-ui" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'load-light-theme "defuns-ui" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'load-font "defuns-ui" "\
|
||||
|
||||
|
||||
\(fn FONT SIZE)" t nil)
|
||||
|
||||
(autoload 'toggle-transparency "defuns-ui" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'toggle-theme "defuns-ui" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'toggle-presentation-mode "defuns-ui" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "defuns-util" "defuns-util.el" (21631 18940
|
||||
;;;;;; 0 0))
|
||||
;;; Generated autoloads from defuns-util.el
|
||||
|
||||
(after "s" (defun s-count-lines (s) "Get number of lines in a string" (length (s-lines s))))
|
||||
|
||||
(after "f" (defmacro f--exists\? (file dir) `(f-exists\? (expand-file-name ,file ,dir))))
|
||||
|
||||
(after "projectile" (defun my--project-root (&optional force-pwd) (if (and (not force-pwd) (projectile-project-p)) (projectile-project-root) default-directory)))
|
||||
|
||||
(autoload 'what-face "defuns-util" "\
|
||||
Tells you the name of the face (point) is on.
|
||||
|
||||
\(fn POS)" t nil)
|
||||
|
||||
(autoload 'what-col "defuns-util" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'what-bindings "defuns-util" "\
|
||||
|
||||
|
||||
\(fn KEY)" nil nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("../lib/evil-ex-registers.el" "../lib/evil-little-word.el"
|
||||
;;;;;; "../lib/ruby-mode-indent-fix.el" "../lib/shaderlab-mode.el"
|
||||
;;;;;; "../modules/init-auto-complete.el" "../modules/init-auto-insert.el"
|
||||
;;;;;; "../modules/init-company.el" "../modules/init-cpp.el" "../modules/init-cscope.el"
|
||||
;;;;;; "../modules/init-csharp.el" "../modules/init-dev.el" "../modules/init-elisp.el"
|
||||
;;;;;; "../modules/init-eshell.el" "../modules/init-fly.el" "../modules/init-git.el"
|
||||
;;;;;; "../modules/init-go.el" "../modules/init-helm.el" "../modules/init-ido.el"
|
||||
;;;;;; "../modules/init-java.el" "../modules/init-js.el" "../modules/init-lua.el"
|
||||
;;;;;; "../modules/init-org.el" "../modules/init-php.el" "../modules/init-project.el"
|
||||
;;;;;; "../modules/init-projectile.el" "../modules/init-python.el"
|
||||
;;;;;; "../modules/init-regex.el" "../modules/init-ruby.el" "../modules/init-scss.el"
|
||||
;;;;;; "../modules/init-sh.el" "../modules/init-swift.el" "../modules/init-text.el"
|
||||
;;;;;; "../modules/init-tmux.el" "../modules/init-web.el" "../modules/init-yasnippet.el"
|
||||
;;;;;; "../my/my-bindings.el" "../my/my-settings.el" "core-editor.el"
|
||||
;;;;;; "core-evil.el" "core-linux.el" "core-osx.el" "core-ui.el"
|
||||
;;;;;; "core.el" "defuns.el") (21638 3439 736094 0))
|
||||
|
||||
;;;***
|
||||
|
||||
(provide 'autoloads)
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; autoloads.el ends here
|
|
@ -8,6 +8,7 @@
|
|||
evil-magic 'very-magic
|
||||
evil-want-C-u-scroll t ; enable C-u for scrolling
|
||||
evil-ex-visual-char-range t ; column range for ex commands
|
||||
evil-ex-search-vim-style-regexp t
|
||||
|
||||
;; Color-coded state cursors
|
||||
evil-normal-state-cursor '("white" box)
|
||||
|
@ -24,15 +25,21 @@
|
|||
(evil-mode)
|
||||
;; Always ensure evil-shift-width is consistent with tab-width
|
||||
(add-hook! 'find-file-hook (setq evil-shift-width tab-width))
|
||||
;; highlight matching delimiters (only in insert mode)
|
||||
|
||||
;; highlight matching delimiters where it's important
|
||||
(defun show-paren-mode-off () (show-paren-mode -1))
|
||||
(add-hook 'evil-insert-state-entry-hook 'show-paren-mode)
|
||||
(add-hook 'evil-insert-state-exit-hook (λ (show-paren-mode -1)))
|
||||
(add-hook 'evil-insert-state-exit-hook 'show-paren-mode-off)
|
||||
(add-hook 'evil-visual-state-entry-hook 'show-paren-mode)
|
||||
(add-hook 'evil-visual-state-exit-hook 'show-paren-mode-off)
|
||||
(add-hook 'evil-motion-state-entry-hook 'show-paren-mode)
|
||||
(add-hook 'evil-motion-state-exit-hook 'show-paren-mode-off)
|
||||
(add-hook 'evil-operator-state-entry-hook 'show-paren-mode)
|
||||
(add-hook 'evil-operator-state-exit-hook 'show-paren-mode-off)
|
||||
|
||||
;; Disable highlights on insert-mode
|
||||
(add-hook 'evil-insert-state-entry-hook 'evil-ex-nohighlight)
|
||||
|
||||
;; Evil command window
|
||||
;;(my/cleanup-buffers-add "^\\*Command Line\\*$")
|
||||
|
||||
;; modes to map to different default states
|
||||
(dolist (mode-map '((cider-repl-mode . emacs)
|
||||
(comint-mode . emacs)
|
||||
|
@ -59,7 +66,18 @@
|
|||
|
||||
(use-package evil-matchit :init (global-evil-matchit-mode 1))
|
||||
|
||||
(use-package evil-surround :init (global-evil-surround-mode 1))
|
||||
(use-package evil-snipe
|
||||
:disabled t
|
||||
:init (global-evil-snipe-mode 1)
|
||||
:config
|
||||
(progn
|
||||
(evil-snipe-override-surround)
|
||||
(setq evil-snipe-search-highlight t)
|
||||
(setq evil-snipe-search-incremental-highlight t)))
|
||||
|
||||
(use-package evil-surround
|
||||
:init (global-evil-surround-mode 1)
|
||||
:config (evil-define-key 'visual evil-surround-mode-map (kbd "S") 'evil-surround-region))
|
||||
|
||||
(use-package evil-nerd-commenter
|
||||
:pre-load (setq evilnc-hotkey-comment-operator "gc"))
|
||||
|
@ -72,7 +90,8 @@
|
|||
evil-jumper-auto-save-interval 3600)
|
||||
(define-key evil-motion-state-map (kbd "H-i") 'evil-jumper/forward)))
|
||||
|
||||
(use-package ace-window)
|
||||
(use-package ace-window
|
||||
:config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
|
||||
|
||||
(use-package evil-visualstar))
|
||||
|
||||
|
@ -100,12 +119,15 @@
|
|||
(evil-half-cursor))
|
||||
(defadvice evil-ace-jump-word-mode (before evil-ace-jump-word-mode-op activate)
|
||||
(evil-half-cursor))
|
||||
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
|
||||
;; (setq ace-jump-mode-move-keys
|
||||
;; (nconc (loop for i from ?a to ?z collect i)
|
||||
;; (loop for i from ?A to ?Z collect i))
|
||||
|
||||
;; https://github.com/winterTTr/ace-jump-mode/issues/23
|
||||
(evil-define-motion evil-ace-jump-two-chars-mode (count)
|
||||
:type exclusive
|
||||
:repeat abort
|
||||
(evil-without-repeat
|
||||
(evil-enclose-ace-jump-for-motion
|
||||
(call-interactively 'ace-jump-two-chars-mode))))
|
||||
|
||||
(defun ace-jump-two-chars-mode (&optional query-char query-char-2)
|
||||
"AceJump two chars mode"
|
||||
(interactive)
|
||||
|
@ -127,7 +149,12 @@
|
|||
(defadvice evil-window-split (after evil-window-split-jump activate)
|
||||
(evil-window-down 1))
|
||||
(defadvice evil-window-vsplit (after evil-window-vsplit-jump activate)
|
||||
(evil-window-right 1)))
|
||||
(evil-window-right 1))
|
||||
|
||||
(defadvice undo-tree-load-history-hook (around undo-tree-load-history-shut-up activate)
|
||||
(shut-up ad-do-it))
|
||||
(defadvice undo-tree-save-history-hook (around undo-tree-save-history-shut-up activate)
|
||||
(shut-up ad-do-it)))
|
||||
|
||||
(progn ; extensions
|
||||
(defun evil-visual-line-state-p ()
|
||||
|
@ -183,11 +210,9 @@
|
|||
"\\1" file-name t)))
|
||||
file-name))
|
||||
|
||||
;; (evil-ex-define-cmd "r[esize]" 'my:resize-window)
|
||||
|
||||
(progn ; ex-commands
|
||||
(evil-ex-define-cmd "pres[ent]" 'toggle-theme)
|
||||
(evil-ex-define-cmd "full[scr]" 'toggle-frame-fullscreen)
|
||||
(evil-ex-define-cmd "present" 'toggle-theme)
|
||||
(evil-ex-define-cmd "k[ill]" 'kill-this-buffer) ; Kill current buffer
|
||||
(evil-ex-define-cmd "k[ill]o" 'cleanup-buffers) ; Kill current project buffers
|
||||
|
||||
|
@ -212,7 +237,7 @@
|
|||
:repeat nil
|
||||
(interactive "<!>")
|
||||
(if bang
|
||||
(ido-find-file-in-dir my-init-dir)
|
||||
(ido-find-file-in-dir my-modules-dir)
|
||||
(ido-find-file-in-dir my-dir)))
|
||||
|
||||
(evil-ex-define-cmd "n[otes]" 'my:notes)
|
||||
|
@ -336,15 +361,6 @@ provided."
|
|||
(tabify beg end)
|
||||
(untabify beg end)))
|
||||
|
||||
(evil-ex-define-cmd "run" 'my:run-code)
|
||||
(evil-define-operator my:run-code (beg end)
|
||||
:move-point nil
|
||||
(interactive "<r>")
|
||||
(cond ((and beg end)
|
||||
(my-run-code-region beg end))
|
||||
(t
|
||||
(my-run-code-buffer))))
|
||||
|
||||
(evil-ex-define-cmd "sq[uint]" 'my:narrow-indirect) ; Narrow buffer to selection
|
||||
(evil-define-operator my:narrow-indirect (beg end)
|
||||
"Indirectly narrow the region from BEG to END."
|
||||
|
@ -353,15 +369,4 @@ provided."
|
|||
:repeat nil
|
||||
(interactive "<r>")
|
||||
(evil-normal-state)
|
||||
(narrow-to-region-indirect beg end))
|
||||
|
||||
(evil-define-operator my:send-region-to-repl (beg end &optional bang)
|
||||
:motion nil
|
||||
:move-point nil
|
||||
:type exclusive
|
||||
:repeat nil
|
||||
(interactive "<r><!>")
|
||||
(cond ((and beg end)
|
||||
(my-send-region-to-repl beg end))
|
||||
(t
|
||||
(my-switch-to-repl)))))))
|
||||
(narrow-to-region-indirect beg end)))))
|
3
core/core-linux.el
Normal file
3
core/core-linux.el
Normal file
|
@ -0,0 +1,3 @@
|
|||
(provide 'core-linux)
|
||||
|
||||
;; Nothing here yet
|
|
@ -8,6 +8,8 @@
|
|||
;; Don't open files from the workspace in a new frame
|
||||
(setq ns-pop-up-frames nil)
|
||||
|
||||
;; (setq ns-auto-hide-menu-bar t)
|
||||
|
||||
;; fix emacs PATH on OSX (GUI only)
|
||||
(use-package exec-path-from-shell
|
||||
:if (memq window-system '(mac ns))
|
||||
|
@ -44,3 +46,8 @@
|
|||
|
||||
(defun my-send-dir-to-finder ()
|
||||
(interactive) (my--open-file-with default-directory "Finder"))
|
||||
|
||||
(defun my-osx-psuedo-fullscreen ()
|
||||
(interactive)
|
||||
(set-frame-position nil 0 0)
|
||||
(set-frame-size nil 362 112))
|
|
@ -222,11 +222,11 @@ the checking happens for all pairs in auto-minor-mode-alist"
|
|||
;; Generate autoloads if necessary
|
||||
(defun my-update-autoloads (&optional forcep)
|
||||
(interactive)
|
||||
(setq generated-autoload-file (concat my-init-dir "autoload.el"))
|
||||
(setq generated-autoload-file (concat my-core-dir "autoloads.el"))
|
||||
(when (or forcep (not (file-exists-p generated-autoload-file)))
|
||||
(if forcep (delete-file generated-autoload-file))
|
||||
(update-directory-autoloads my-init-dir my-elisp-dir))
|
||||
(require 'autoload))
|
||||
(update-directory-autoloads my-core-dir my-modules-dir my-personal-dir my-elisp-dir))
|
||||
(require 'autoloads))
|
||||
|
||||
(my-update-autoloads)
|
||||
|
|
@ -12,20 +12,27 @@
|
|||
|
||||
;; Killing Buffers ;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Buffer defuns
|
||||
(defvar my-cleanup-buffers-alist '("^ \\*"
|
||||
"^\\*Backtrace\\*$"
|
||||
"^\\*Warnings\\*$"
|
||||
"^\\*Compile-Log\\*$"
|
||||
"^\\*Ediff.*\\*$"
|
||||
help-mode
|
||||
dired-mode
|
||||
reb-mode)
|
||||
(defvar my-cleanup-buffers-list '("^ \\*"
|
||||
"^\\*Backtrace\\*$"
|
||||
"^\\*Warnings\\*$"
|
||||
"^\\*Compile-Log\\*$"
|
||||
"^\\*Ediff.*\\*$"
|
||||
help-mode
|
||||
dired-mode
|
||||
reb-mode)
|
||||
"A list of buffer name regexps or major-mode symbols. If buried buffers
|
||||
match/have that mode active, `cleanup-buffers' will kill them.")
|
||||
|
||||
(defvar my-cleanup-processes-alist '(("pry" . ruby-mode)
|
||||
("irb" . ruby-mode)
|
||||
("ipython" . python-mode))
|
||||
"An alist of (process-name . major-mode), that `my-cleanup-processes' checks
|
||||
before killing processes. If there are no buffers with matching major-modes, it
|
||||
gets killed.")
|
||||
|
||||
;;;###autoload
|
||||
(defun my--cleanup-buffers-add (regexp)
|
||||
(add-to-list 'my-cleanup-buffers-alist regexp))
|
||||
(add-to-list 'my-cleanup-buffers-list regexp))
|
||||
|
||||
;;;###autoload
|
||||
(defun my-cleanup-buffers ()
|
||||
|
@ -41,11 +48,30 @@
|
|||
(s-matches? pred (buffer-name b)))
|
||||
((symbolp pred)
|
||||
(eq (buffer-local-value 'major-mode b) pred))))
|
||||
my-cleanup-buffers-alist)))
|
||||
my-cleanup-buffers-list)))
|
||||
kill-list))
|
||||
|
||||
(message "Cleaned up %s buffers" (length kill-list))
|
||||
(mapc 'kill-buffer kill-list)))
|
||||
(mapc 'kill-buffer kill-list)
|
||||
|
||||
(my-cleanup-processes)))
|
||||
|
||||
;;;###autoload
|
||||
(defun my-cleanup-processes ()
|
||||
(interactive)
|
||||
(let ((buffer-list (buffer-list)))
|
||||
(dolist (p (process-list))
|
||||
(let* ((process-name (process-name p))
|
||||
(assoc (assoc process-name my-cleanup-processes-alist)))
|
||||
(when (and assoc
|
||||
(not (string= process-name "server"))
|
||||
(process-live-p p)
|
||||
(not (-any? (lambda (b)
|
||||
(let ((mode (buffer-local-value 'major-mode b)))
|
||||
(eq mode (cdr assoc))))
|
||||
buffer-list)))
|
||||
(message "Cleanup: killing %s" process-name)
|
||||
(delete-process p))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun my-kill-matching-buffers (regexp &optional buffer-list)
|
74
dict/c++-mode
Executable file
74
dict/c++-mode
Executable file
|
@ -0,0 +1,74 @@
|
|||
and
|
||||
and_eq
|
||||
asm
|
||||
auto
|
||||
bitand
|
||||
bitor
|
||||
bool
|
||||
break
|
||||
case
|
||||
catch
|
||||
char
|
||||
class
|
||||
compl
|
||||
const
|
||||
const_cast
|
||||
continue
|
||||
default
|
||||
delete
|
||||
do
|
||||
double
|
||||
dynamic_cast
|
||||
else
|
||||
enum
|
||||
explicit
|
||||
export
|
||||
extern
|
||||
false
|
||||
float
|
||||
for
|
||||
friend
|
||||
goto
|
||||
if
|
||||
inline
|
||||
int
|
||||
long
|
||||
mutable
|
||||
namespace
|
||||
new
|
||||
not
|
||||
not_eq
|
||||
operator
|
||||
or
|
||||
or_eq
|
||||
private
|
||||
protected
|
||||
public
|
||||
register
|
||||
reinterpret_cast
|
||||
return
|
||||
short
|
||||
signed
|
||||
sizeof
|
||||
static
|
||||
static_cast
|
||||
struct
|
||||
switch
|
||||
template
|
||||
this
|
||||
throw
|
||||
true
|
||||
try
|
||||
typedef
|
||||
typeid
|
||||
typename
|
||||
union
|
||||
unsigned
|
||||
using
|
||||
virtual
|
||||
void
|
||||
volatile
|
||||
wchar_t
|
||||
while
|
||||
xor
|
||||
xor_eq
|
37
dict/c-mode
Executable file
37
dict/c-mode
Executable file
|
@ -0,0 +1,37 @@
|
|||
auto
|
||||
_Bool
|
||||
break
|
||||
case
|
||||
char
|
||||
_Complex
|
||||
const
|
||||
continue
|
||||
default
|
||||
do
|
||||
double
|
||||
else
|
||||
enum
|
||||
extern
|
||||
float
|
||||
for
|
||||
goto
|
||||
if
|
||||
_Imaginary
|
||||
inline
|
||||
int
|
||||
long
|
||||
register
|
||||
restrict
|
||||
return
|
||||
short
|
||||
signed
|
||||
sizeof
|
||||
static
|
||||
struct
|
||||
switch
|
||||
typedef
|
||||
union
|
||||
unsigned
|
||||
void
|
||||
volatile
|
||||
while
|
677
dict/css-mode
Executable file
677
dict/css-mode
Executable file
|
@ -0,0 +1,677 @@
|
|||
!important
|
||||
_azimuth
|
||||
_background
|
||||
_background-position-x
|
||||
_background-position-y
|
||||
_border
|
||||
_bottom
|
||||
_caption
|
||||
_clear
|
||||
_clip
|
||||
_color
|
||||
_content
|
||||
_counter
|
||||
_cue
|
||||
_cursor
|
||||
_direction
|
||||
_display
|
||||
_elevation
|
||||
_empty
|
||||
_filter
|
||||
_filter:progid:DXImageTransform.Microsoft
|
||||
_float
|
||||
_font
|
||||
_height
|
||||
_ime
|
||||
_ime-mode
|
||||
_layout
|
||||
_layout-flow
|
||||
_layout-grid
|
||||
_layout-grid-char
|
||||
_layout-grid-line
|
||||
_layout-grid-mode
|
||||
_layout-grid-type
|
||||
_left
|
||||
_letter
|
||||
_line
|
||||
_line-break
|
||||
_list
|
||||
_margin
|
||||
_orphans
|
||||
_outline
|
||||
_overflow
|
||||
_overflow-x
|
||||
_overflow-y
|
||||
_padding
|
||||
_page
|
||||
_pause
|
||||
_pitch
|
||||
_play
|
||||
_position
|
||||
_quotes
|
||||
_richness
|
||||
_right
|
||||
_ruby
|
||||
_ruby-align
|
||||
_ruby-overhang
|
||||
_ruby-position
|
||||
_scrollbar
|
||||
_scrollbar-3dlight-color
|
||||
_scrollbar-arrow-color
|
||||
_scrollbar-base-color
|
||||
_scrollbar-darkshadow-color
|
||||
_scrollbar-face-color
|
||||
_scrollbar-highlight-color
|
||||
_scrollbar-track-color
|
||||
_speak
|
||||
_speech
|
||||
_stress
|
||||
_table
|
||||
_text
|
||||
_text-align-last
|
||||
_text-autospace
|
||||
_text-justify
|
||||
_text-kashida-space
|
||||
_text-overflow
|
||||
_text-underline-position
|
||||
_top
|
||||
_unicode
|
||||
_vertical
|
||||
_visibility
|
||||
_voice
|
||||
_volume
|
||||
_white
|
||||
_widows
|
||||
_width
|
||||
_word
|
||||
_word-break
|
||||
_word-wrap
|
||||
_writing
|
||||
_writing-mode
|
||||
_z
|
||||
_zoom
|
||||
above
|
||||
active
|
||||
adjust
|
||||
after
|
||||
aliceblue
|
||||
align
|
||||
always
|
||||
antiquewhite
|
||||
aqua
|
||||
aquamarine
|
||||
armenian
|
||||
arrow
|
||||
attachment
|
||||
auto
|
||||
autospace
|
||||
avoid
|
||||
azimuth
|
||||
azure
|
||||
background
|
||||
background-attachment
|
||||
background-color
|
||||
background-image
|
||||
background-position
|
||||
background-repeat
|
||||
bar
|
||||
base
|
||||
baseline
|
||||
before
|
||||
behind
|
||||
beige
|
||||
below
|
||||
bidi
|
||||
bidi-override
|
||||
bisque
|
||||
black
|
||||
blanchedalmond
|
||||
blink
|
||||
block
|
||||
blue
|
||||
blueviolet
|
||||
bold
|
||||
bolder
|
||||
border
|
||||
border-bottom
|
||||
border-bottom-color
|
||||
border-bottom-style
|
||||
border-bottom-width
|
||||
border-collapse
|
||||
border-color
|
||||
border-left
|
||||
border-left-color
|
||||
border-left-style
|
||||
border-left-width
|
||||
border-right
|
||||
border-right-color
|
||||
border-right-style
|
||||
border-right-width
|
||||
border-spacing
|
||||
border-style
|
||||
border-top
|
||||
border-top-color
|
||||
border-top-style
|
||||
border-top-width
|
||||
border-width
|
||||
both
|
||||
bottom
|
||||
box
|
||||
break
|
||||
brown
|
||||
burlwood
|
||||
cadetblue
|
||||
capitalize
|
||||
caps
|
||||
caption
|
||||
caption-side
|
||||
cell
|
||||
cells
|
||||
center
|
||||
center-left
|
||||
center-right
|
||||
char
|
||||
chartreuse
|
||||
chocolate
|
||||
circle
|
||||
cjk
|
||||
cjk-ideographic
|
||||
clear
|
||||
clip
|
||||
close
|
||||
close-quote
|
||||
cm
|
||||
code
|
||||
collapse
|
||||
color
|
||||
column
|
||||
compact
|
||||
condensed
|
||||
content
|
||||
continuous
|
||||
coral
|
||||
cornflowerblue
|
||||
cornsilk
|
||||
counter
|
||||
counter-increment
|
||||
counter-reset
|
||||
crimson
|
||||
crop
|
||||
cross
|
||||
crosshair
|
||||
cue
|
||||
cue-after
|
||||
cue-before
|
||||
cursive
|
||||
cursor
|
||||
cyan
|
||||
darkblue
|
||||
darkcyan
|
||||
darkgoldenrod
|
||||
darkgray
|
||||
darkgreen
|
||||
darkkhaki
|
||||
darkmagenta
|
||||
darkolivegreen
|
||||
darkorange
|
||||
darkorchid
|
||||
darkred
|
||||
darksalmon
|
||||
darkseagreen
|
||||
darkshadow
|
||||
darkslateblue
|
||||
darkslategray
|
||||
darkturquoise
|
||||
darkviolet
|
||||
dashed
|
||||
decimal
|
||||
decimal-leading-zero
|
||||
decoration
|
||||
deeppink
|
||||
deepskyblue
|
||||
default
|
||||
deg
|
||||
digits
|
||||
dimgray
|
||||
direction
|
||||
disc
|
||||
display
|
||||
dodgerblue
|
||||
dotted
|
||||
double
|
||||
during
|
||||
e
|
||||
e-resize
|
||||
elevation
|
||||
em
|
||||
embed
|
||||
empty
|
||||
empty-cells
|
||||
ex
|
||||
expanded
|
||||
extra
|
||||
extra-condensed
|
||||
extra-expanded
|
||||
face
|
||||
family
|
||||
fantasy
|
||||
far
|
||||
far-left
|
||||
far-right
|
||||
fast
|
||||
faster
|
||||
firebrick
|
||||
first
|
||||
first-child
|
||||
first-letter
|
||||
first-line
|
||||
fixed
|
||||
float
|
||||
floralwhite
|
||||
flow
|
||||
focus
|
||||
font
|
||||
font-family
|
||||
font-size
|
||||
font-size-adjust
|
||||
font-stretch
|
||||
font-style
|
||||
font-variant
|
||||
font-weight
|
||||
footer
|
||||
forestgreen
|
||||
fuchsia
|
||||
gainsboro
|
||||
georgian
|
||||
ghostwhite
|
||||
gold
|
||||
goldenrod
|
||||
gray
|
||||
greek
|
||||
green
|
||||
greenyellow
|
||||
grid
|
||||
groove
|
||||
group
|
||||
header
|
||||
hebrew
|
||||
height
|
||||
help
|
||||
hidden
|
||||
hide
|
||||
high
|
||||
higher
|
||||
hiragana
|
||||
hiragana-iroha
|
||||
honeydew
|
||||
hotpink
|
||||
hover
|
||||
icon
|
||||
ideographic
|
||||
image
|
||||
in
|
||||
increment
|
||||
indent
|
||||
index
|
||||
indianred
|
||||
indigo
|
||||
inherit
|
||||
inline
|
||||
inline-block
|
||||
inline-table
|
||||
inset
|
||||
inside
|
||||
iroha
|
||||
italic
|
||||
item
|
||||
ivory
|
||||
justify
|
||||
kHz
|
||||
kashida
|
||||
katakana
|
||||
katakana-iroha
|
||||
khaki
|
||||
landscape
|
||||
lang()
|
||||
large
|
||||
larger
|
||||
last
|
||||
latin
|
||||
lavender
|
||||
lavenderblush
|
||||
lawngreen
|
||||
layout
|
||||
leading
|
||||
left
|
||||
left-side
|
||||
leftwards
|
||||
lenonchiffon
|
||||
letter
|
||||
letter-spacing
|
||||
level
|
||||
lightblue
|
||||
lightcoral
|
||||
lightcyan
|
||||
lighter
|
||||
lightgoldenrodyellow
|
||||
lightgray
|
||||
lightgreen
|
||||
lightgrey
|
||||
lightpink
|
||||
lightsalmon
|
||||
lightseagreen
|
||||
lightskyblue
|
||||
lightslategray
|
||||
lightsteelblue
|
||||
lightyellow
|
||||
lime
|
||||
limegreen
|
||||
line
|
||||
line-height
|
||||
line-through
|
||||
linen
|
||||
link
|
||||
list
|
||||
list-item
|
||||
list-style
|
||||
list-style-image
|
||||
list-style-position
|
||||
list-style-type
|
||||
loud
|
||||
low
|
||||
lower
|
||||
lower-alpha
|
||||
lower-greek
|
||||
lower-latin
|
||||
lower-roman
|
||||
lowercase
|
||||
ltr
|
||||
magenta
|
||||
margin
|
||||
margin-bottom
|
||||
margin-left
|
||||
margin-right
|
||||
margin-top
|
||||
marker
|
||||
marker-offset
|
||||
marks
|
||||
maroon
|
||||
max
|
||||
max-height
|
||||
max-width
|
||||
medium
|
||||
mediumaquamarine
|
||||
mediumblue
|
||||
mediumorchid
|
||||
mediumpurple
|
||||
mediumseagreen
|
||||
mediumslateblue
|
||||
mediumspringgreen
|
||||
mediumturquoise
|
||||
mediumvioletred
|
||||
menu
|
||||
message
|
||||
message-box
|
||||
middle
|
||||
midnightblue
|
||||
min
|
||||
min-height
|
||||
min-width
|
||||
mintcream
|
||||
mistyrose
|
||||
mix
|
||||
mm
|
||||
moccasin
|
||||
mode
|
||||
monospace
|
||||
move
|
||||
ms
|
||||
n
|
||||
n-resize
|
||||
naby
|
||||
narrower
|
||||
navajowhite
|
||||
ne
|
||||
ne-resize
|
||||
no
|
||||
no-close-quote
|
||||
no-open-quote
|
||||
no-repeat
|
||||
none
|
||||
normal
|
||||
nowrap
|
||||
number
|
||||
numeral
|
||||
nw
|
||||
nw-resize
|
||||
oblique
|
||||
offset
|
||||
oldlace
|
||||
olive
|
||||
olivedrab
|
||||
once
|
||||
open
|
||||
open-quote
|
||||
orange
|
||||
orangered
|
||||
orchid
|
||||
orphans
|
||||
out
|
||||
outline
|
||||
outline-color
|
||||
outline-style
|
||||
outline-width
|
||||
outset
|
||||
outside
|
||||
overflow
|
||||
overhang
|
||||
overline
|
||||
override
|
||||
padding
|
||||
padding-bottom
|
||||
padding-left
|
||||
padding-right
|
||||
padding-top
|
||||
page
|
||||
page-break-after
|
||||
page-break-before
|
||||
page-break-inside
|
||||
palegoldenrod
|
||||
palegreen
|
||||
paleturquoise
|
||||
palevioletred
|
||||
papayawhip
|
||||
pause
|
||||
pause-after
|
||||
pause-before
|
||||
pc
|
||||
peachpuff
|
||||
peru
|
||||
pink
|
||||
pitch
|
||||
pitch-range
|
||||
play
|
||||
play-during
|
||||
plum
|
||||
pointer
|
||||
portarait
|
||||
position
|
||||
powderblue
|
||||
pre
|
||||
pre-line
|
||||
pre-wrap
|
||||
progid
|
||||
progress
|
||||
pt
|
||||
punctuation
|
||||
purple
|
||||
px
|
||||
quote
|
||||
quotes
|
||||
rad
|
||||
range
|
||||
rate
|
||||
red
|
||||
relative
|
||||
repeat
|
||||
repeat-x
|
||||
repeat-y
|
||||
reset
|
||||
resize
|
||||
richness
|
||||
ridge
|
||||
right
|
||||
right-side
|
||||
rightwards
|
||||
roman
|
||||
rosybrown
|
||||
row
|
||||
royalblue
|
||||
rtl
|
||||
run
|
||||
run-in
|
||||
s
|
||||
s-resize
|
||||
saddlebrown
|
||||
salmon
|
||||
sandybrown
|
||||
sans-serif
|
||||
scroll
|
||||
se
|
||||
se-resize
|
||||
seagreen
|
||||
seashell
|
||||
semi
|
||||
semi-condensed
|
||||
semi-expanded
|
||||
separate
|
||||
serif
|
||||
shadow
|
||||
show
|
||||
side
|
||||
sienna
|
||||
silent
|
||||
silever
|
||||
silver
|
||||
size
|
||||
skyblue
|
||||
slateblue
|
||||
slategray
|
||||
slow
|
||||
slower
|
||||
small
|
||||
small-caps
|
||||
small-caption
|
||||
smaller
|
||||
snow
|
||||
soft
|
||||
solid
|
||||
space
|
||||
spacing
|
||||
speak
|
||||
speak-header
|
||||
speak-numeral
|
||||
speak-punctuation
|
||||
specific
|
||||
specific-voice
|
||||
speech
|
||||
speech-rate
|
||||
spell
|
||||
spell-out
|
||||
springgreen
|
||||
square
|
||||
static
|
||||
status
|
||||
status-bar
|
||||
steelblue
|
||||
stress
|
||||
stretch
|
||||
style
|
||||
sub
|
||||
super
|
||||
sw
|
||||
sw-resize
|
||||
table
|
||||
table-caption
|
||||
table-cell
|
||||
table-column
|
||||
table-column-group
|
||||
table-footer-group
|
||||
table-header-group
|
||||
table-layout
|
||||
table-row
|
||||
table-row-group
|
||||
tan
|
||||
teal
|
||||
text
|
||||
text-align
|
||||
text-bottom
|
||||
text-decoration
|
||||
text-indent
|
||||
text-shadow
|
||||
text-top
|
||||
text-transform
|
||||
thick
|
||||
thin
|
||||
thistle
|
||||
through
|
||||
tomato
|
||||
top
|
||||
track
|
||||
transform
|
||||
transparent
|
||||
turquoise
|
||||
type
|
||||
ultra
|
||||
ultra-condensed
|
||||
ultra-expanded
|
||||
underline
|
||||
unicode
|
||||
unicode-bidi
|
||||
upper
|
||||
upper-alpha
|
||||
upper-latin
|
||||
upper-roman
|
||||
uppercase
|
||||
variant
|
||||
vertical
|
||||
vertical-align
|
||||
violet
|
||||
visibility
|
||||
visible
|
||||
visited
|
||||
voice
|
||||
voice-family
|
||||
volume
|
||||
w
|
||||
w-resize
|
||||
wait
|
||||
weight
|
||||
wheat
|
||||
white
|
||||
white-space
|
||||
whitesmoke
|
||||
wider
|
||||
widows
|
||||
width
|
||||
word
|
||||
word-spacing
|
||||
wrap
|
||||
x
|
||||
x-fast
|
||||
x-high
|
||||
x-large
|
||||
x-loud
|
||||
x-low
|
||||
x-slow
|
||||
x-small
|
||||
x-soft
|
||||
xx
|
||||
xx-large
|
||||
xx-small
|
||||
y
|
||||
yellow
|
||||
yellowgreen
|
||||
z
|
||||
z-index
|
||||
zero
|
4225
dict/java-mode
Executable file
4225
dict/java-mode
Executable file
File diff suppressed because it is too large
Load diff
2
dict/js-mode
Executable file
2
dict/js-mode
Executable file
|
@ -0,0 +1,2 @@
|
|||
JSON.stringify
|
||||
JSON.parse
|
7
dict/js2-mode
Executable file
7
dict/js2-mode
Executable file
|
@ -0,0 +1,7 @@
|
|||
JSON
|
||||
JSON.stringify
|
||||
JSON.parse
|
||||
LaunchBar
|
||||
include
|
||||
HTTP
|
||||
File
|
25
dict/love-mode
Executable file
25
dict/love-mode
Executable file
|
@ -0,0 +1,25 @@
|
|||
draw
|
||||
focus
|
||||
joystickpressed
|
||||
joystickreleased
|
||||
keypressed
|
||||
keyreleased
|
||||
load
|
||||
mousepressed
|
||||
mousereleased
|
||||
quit
|
||||
run
|
||||
update
|
||||
audio
|
||||
event
|
||||
filesystem
|
||||
font
|
||||
graphics
|
||||
image
|
||||
joystick
|
||||
keyboard
|
||||
mouse
|
||||
physics
|
||||
sound
|
||||
thread
|
||||
timer
|
21
dict/lua-mode
Executable file
21
dict/lua-mode
Executable file
|
@ -0,0 +1,21 @@
|
|||
and
|
||||
break
|
||||
do
|
||||
else
|
||||
elseif
|
||||
end
|
||||
false
|
||||
for
|
||||
function
|
||||
if
|
||||
in
|
||||
local
|
||||
nil
|
||||
not
|
||||
or
|
||||
repeat
|
||||
return
|
||||
then
|
||||
true
|
||||
until
|
||||
while
|
34
dict/nxml-mode
Executable file
34
dict/nxml-mode
Executable file
|
@ -0,0 +1,34 @@
|
|||
CFBundleName
|
||||
CFBundleShortVersionString
|
||||
CFBundleVersion
|
||||
CFBundleIdentifier
|
||||
CFBundleIconFile
|
||||
LSMinimumSystemVersion
|
||||
LBMinimumLaunchBarVersion
|
||||
LBDebugLogEnabled
|
||||
LBAbbreviation
|
||||
LBRequiredApplication
|
||||
LBAssociatedApplication
|
||||
LBTextInputTitle
|
||||
LBScripts
|
||||
LBDefaultScript
|
||||
LBScriptName
|
||||
LBRunInBackground
|
||||
LBLiveFeedbackEnabled
|
||||
LBBackgroundKillEnabled
|
||||
LBRequiresArgument
|
||||
LBAcceptedArgumentTypes
|
||||
LBReturnsResult
|
||||
LBResultType
|
||||
LBKeepWindowActive
|
||||
LBSuggestionsScript
|
||||
LBActionURLScript
|
||||
LBDescription
|
||||
LBAuthor
|
||||
LBWebsite
|
||||
LBEmail
|
||||
LBTwitter
|
||||
LBSummary
|
||||
LBArgument
|
||||
LBResult
|
||||
LBRequirements
|
62
dict/php-mode
Executable file
62
dict/php-mode
Executable file
|
@ -0,0 +1,62 @@
|
|||
and
|
||||
array
|
||||
as
|
||||
break
|
||||
case
|
||||
catch
|
||||
cfunction
|
||||
class
|
||||
clone
|
||||
const
|
||||
continue
|
||||
declare
|
||||
default
|
||||
die
|
||||
do
|
||||
echo
|
||||
else
|
||||
elseif
|
||||
empty
|
||||
enddeclare
|
||||
endfor
|
||||
endforeach
|
||||
endif
|
||||
endswitch
|
||||
endwhile
|
||||
eval
|
||||
exit
|
||||
extends
|
||||
final
|
||||
for
|
||||
foreach
|
||||
function
|
||||
global
|
||||
goto
|
||||
if
|
||||
implements
|
||||
include
|
||||
include_once
|
||||
instanceof
|
||||
interface
|
||||
isset
|
||||
list
|
||||
namespace
|
||||
new
|
||||
old_function
|
||||
or
|
||||
print
|
||||
private
|
||||
protected
|
||||
public
|
||||
require
|
||||
require_once
|
||||
return
|
||||
static
|
||||
switch
|
||||
throw
|
||||
try
|
||||
unset
|
||||
use
|
||||
var
|
||||
while
|
||||
xor
|
181
dict/ruby-mode
Executable file
181
dict/ruby-mode
Executable file
|
@ -0,0 +1,181 @@
|
|||
$!
|
||||
$"
|
||||
$$
|
||||
$&
|
||||
$'
|
||||
$*
|
||||
$+
|
||||
$,
|
||||
$-0
|
||||
$-F
|
||||
$-I
|
||||
$-K
|
||||
$-a
|
||||
$-d
|
||||
$-i
|
||||
$-l
|
||||
$-p
|
||||
$-v
|
||||
$-w
|
||||
$.
|
||||
$/
|
||||
$0
|
||||
$1
|
||||
$10
|
||||
$11
|
||||
$2
|
||||
$3
|
||||
$4
|
||||
$5
|
||||
$6
|
||||
$7
|
||||
$8
|
||||
$9
|
||||
$:
|
||||
$;
|
||||
$<
|
||||
$=
|
||||
$>
|
||||
$?
|
||||
$@
|
||||
$DEBUG
|
||||
$FILENAME
|
||||
$KCODE
|
||||
$LOADED_FEATURES
|
||||
$LOAD_PATH
|
||||
$PROGRAM_NAME
|
||||
$SAFE
|
||||
$VERBOSE
|
||||
$\
|
||||
$_
|
||||
$`
|
||||
$deferr
|
||||
$defout
|
||||
$stderr
|
||||
$stdin
|
||||
$stdout
|
||||
$~
|
||||
ARGF
|
||||
ARGV
|
||||
Array
|
||||
BEGIN
|
||||
DATA
|
||||
END
|
||||
ENV
|
||||
FALSE
|
||||
Float
|
||||
Integer
|
||||
NIL
|
||||
PLATFORM
|
||||
RELEASE_DATE
|
||||
RUBY_COPYRIGHT
|
||||
RUBY_DESCRIPTION
|
||||
RUBY_PATCHLEVEL
|
||||
RUBY_PLATFORM
|
||||
RUBY_RELEASE_DATE
|
||||
RUBY_VERSION
|
||||
SCRIPT_LINES__
|
||||
STDERR
|
||||
STDIN
|
||||
STDOUT
|
||||
String
|
||||
TOPLEVEL_BINDING
|
||||
TRUE
|
||||
VERSION
|
||||
__method__
|
||||
`
|
||||
abort
|
||||
alias
|
||||
and
|
||||
at_exit
|
||||
autoload
|
||||
autoload?
|
||||
begin
|
||||
binding
|
||||
block_given
|
||||
break
|
||||
callcc
|
||||
caller
|
||||
case
|
||||
catch
|
||||
chomp
|
||||
chomp!
|
||||
chop
|
||||
chop
|
||||
class
|
||||
def
|
||||
defined?
|
||||
do
|
||||
else
|
||||
elsif
|
||||
end
|
||||
ensure
|
||||
eval
|
||||
exec
|
||||
exit
|
||||
exit!
|
||||
fail
|
||||
false
|
||||
for
|
||||
fork
|
||||
format
|
||||
getc
|
||||
gets
|
||||
global_variables
|
||||
gsub
|
||||
gsub!
|
||||
if
|
||||
in
|
||||
iterator?
|
||||
lambda
|
||||
load
|
||||
local_varaibles
|
||||
loop
|
||||
module
|
||||
next
|
||||
nil
|
||||
not
|
||||
open
|
||||
or
|
||||
p
|
||||
printf
|
||||
proc
|
||||
putc
|
||||
puts
|
||||
raise
|
||||
rand
|
||||
readline
|
||||
readlines
|
||||
redo
|
||||
require
|
||||
require_relative
|
||||
rescue
|
||||
retry
|
||||
return
|
||||
scan
|
||||
select
|
||||
self
|
||||
set_trace_func
|
||||
sleep
|
||||
split
|
||||
sprintf
|
||||
srand
|
||||
sub
|
||||
sub!
|
||||
super
|
||||
syscall
|
||||
system
|
||||
test
|
||||
then
|
||||
throw
|
||||
trace_var
|
||||
trap
|
||||
true
|
||||
undef
|
||||
unless
|
||||
until
|
||||
untrace_var
|
||||
warn
|
||||
when
|
||||
while
|
||||
yield
|
680
dict/scss-mode
Executable file
680
dict/scss-mode
Executable file
|
@ -0,0 +1,680 @@
|
|||
@import
|
||||
@mixin
|
||||
@extend
|
||||
!important
|
||||
_azimuth
|
||||
_background
|
||||
_background-position-x
|
||||
_background-position-y
|
||||
_border
|
||||
_bottom
|
||||
_caption
|
||||
_clear
|
||||
_clip
|
||||
_color
|
||||
_content
|
||||
_counter
|
||||
_cue
|
||||
_cursor
|
||||
_direction
|
||||
_display
|
||||
_elevation
|
||||
_empty
|
||||
_filter
|
||||
_filter:progid:DXImageTransform.Microsoft
|
||||
_float
|
||||
_font
|
||||
_height
|
||||
_ime
|
||||
_ime-mode
|
||||
_layout
|
||||
_layout-flow
|
||||
_layout-grid
|
||||
_layout-grid-char
|
||||
_layout-grid-line
|
||||
_layout-grid-mode
|
||||
_layout-grid-type
|
||||
_left
|
||||
_letter
|
||||
_line
|
||||
_line-break
|
||||
_list
|
||||
_margin
|
||||
_orphans
|
||||
_outline
|
||||
_overflow
|
||||
_overflow-x
|
||||
_overflow-y
|
||||
_padding
|
||||
_page
|
||||
_pause
|
||||
_pitch
|
||||
_play
|
||||
_position
|
||||
_quotes
|
||||
_richness
|
||||
_right
|
||||
_ruby
|
||||
_ruby-align
|
||||
_ruby-overhang
|
||||
_ruby-position
|
||||
_scrollbar
|
||||
_scrollbar-3dlight-color
|
||||
_scrollbar-arrow-color
|
||||
_scrollbar-base-color
|
||||
_scrollbar-darkshadow-color
|
||||
_scrollbar-face-color
|
||||
_scrollbar-highlight-color
|
||||
_scrollbar-track-color
|
||||
_speak
|
||||
_speech
|
||||
_stress
|
||||
_table
|
||||
_text
|
||||
_text-align-last
|
||||
_text-autospace
|
||||
_text-justify
|
||||
_text-kashida-space
|
||||
_text-overflow
|
||||
_text-underline-position
|
||||
_top
|
||||
_unicode
|
||||
_vertical
|
||||
_visibility
|
||||
_voice
|
||||
_volume
|
||||
_white
|
||||
_widows
|
||||
_width
|
||||
_word
|
||||
_word-break
|
||||
_word-wrap
|
||||
_writing
|
||||
_writing-mode
|
||||
_z
|
||||
_zoom
|
||||
above
|
||||
active
|
||||
adjust
|
||||
after
|
||||
aliceblue
|
||||
align
|
||||
always
|
||||
antiquewhite
|
||||
aqua
|
||||
aquamarine
|
||||
armenian
|
||||
arrow
|
||||
attachment
|
||||
auto
|
||||
autospace
|
||||
avoid
|
||||
azimuth
|
||||
azure
|
||||
background
|
||||
background-attachment
|
||||
background-color
|
||||
background-image
|
||||
background-position
|
||||
background-repeat
|
||||
bar
|
||||
base
|
||||
baseline
|
||||
before
|
||||
behind
|
||||
beige
|
||||
below
|
||||
bidi
|
||||
bidi-override
|
||||
bisque
|
||||
black
|
||||
blanchedalmond
|
||||
blink
|
||||
block
|
||||
blue
|
||||
blueviolet
|
||||
bold
|
||||
bolder
|
||||
border
|
||||
border-bottom
|
||||
border-bottom-color
|
||||
border-bottom-style
|
||||
border-bottom-width
|
||||
border-collapse
|
||||
border-color
|
||||
border-left
|
||||
border-left-color
|
||||
border-left-style
|
||||
border-left-width
|
||||
border-right
|
||||
border-right-color
|
||||
border-right-style
|
||||
border-right-width
|
||||
border-spacing
|
||||
border-style
|
||||
border-top
|
||||
border-top-color
|
||||
border-top-style
|
||||
border-top-width
|
||||
border-width
|
||||
both
|
||||
bottom
|
||||
box
|
||||
break
|
||||
brown
|
||||
burlwood
|
||||
cadetblue
|
||||
capitalize
|
||||
caps
|
||||
caption
|
||||
caption-side
|
||||
cell
|
||||
cells
|
||||
center
|
||||
center-left
|
||||
center-right
|
||||
char
|
||||
chartreuse
|
||||
chocolate
|
||||
circle
|
||||
cjk
|
||||
cjk-ideographic
|
||||
clear
|
||||
clip
|
||||
close
|
||||
close-quote
|
||||
cm
|
||||
code
|
||||
collapse
|
||||
color
|
||||
column
|
||||
compact
|
||||
condensed
|
||||
content
|
||||
continuous
|
||||
coral
|
||||
cornflowerblue
|
||||
cornsilk
|
||||
counter
|
||||
counter-increment
|
||||
counter-reset
|
||||
crimson
|
||||
crop
|
||||
cross
|
||||
crosshair
|
||||
cue
|
||||
cue-after
|
||||
cue-before
|
||||
cursive
|
||||
cursor
|
||||
cyan
|
||||
darkblue
|
||||
darkcyan
|
||||
darkgoldenrod
|
||||
darkgray
|
||||
darkgreen
|
||||
darkkhaki
|
||||
darkmagenta
|
||||
darkolivegreen
|
||||
darkorange
|
||||
darkorchid
|
||||
darkred
|
||||
darksalmon
|
||||
darkseagreen
|
||||
darkshadow
|
||||
darkslateblue
|
||||
darkslategray
|
||||
darkturquoise
|
||||
darkviolet
|
||||
dashed
|
||||
decimal
|
||||
decimal-leading-zero
|
||||
decoration
|
||||
deeppink
|
||||
deepskyblue
|
||||
default
|
||||
deg
|
||||
digits
|
||||
dimgray
|
||||
direction
|
||||
disc
|
||||
display
|
||||
dodgerblue
|
||||
dotted
|
||||
double
|
||||
during
|
||||
e
|
||||
e-resize
|
||||
elevation
|
||||
em
|
||||
embed
|
||||
empty
|
||||
empty-cells
|
||||
ex
|
||||
expanded
|
||||
extra
|
||||
extra-condensed
|
||||
extra-expanded
|
||||
face
|
||||
family
|
||||
fantasy
|
||||
far
|
||||
far-left
|
||||
far-right
|
||||
fast
|
||||
faster
|
||||
firebrick
|
||||
first
|
||||
first-child
|
||||
first-letter
|
||||
first-line
|
||||
fixed
|
||||
float
|
||||
floralwhite
|
||||
flow
|
||||
focus
|
||||
font
|
||||
font-family
|
||||
font-size
|
||||
font-size-adjust
|
||||
font-stretch
|
||||
font-style
|
||||
font-variant
|
||||
font-weight
|
||||
footer
|
||||
forestgreen
|
||||
fuchsia
|
||||
gainsboro
|
||||
georgian
|
||||
ghostwhite
|
||||
gold
|
||||
goldenrod
|
||||
gray
|
||||
greek
|
||||
green
|
||||
greenyellow
|
||||
grid
|
||||
groove
|
||||
group
|
||||
header
|
||||
hebrew
|
||||
height
|
||||
help
|
||||
hidden
|
||||
hide
|
||||
high
|
||||
higher
|
||||
hiragana
|
||||
hiragana-iroha
|
||||
honeydew
|
||||
hotpink
|
||||
hover
|
||||
icon
|
||||
ideographic
|
||||
image
|
||||
in
|
||||
increment
|
||||
indent
|
||||
index
|
||||
indianred
|
||||
indigo
|
||||
inherit
|
||||
inline
|
||||
inline-block
|
||||
inline-table
|
||||
inset
|
||||
inside
|
||||
iroha
|
||||
italic
|
||||
item
|
||||
ivory
|
||||
justify
|
||||
kHz
|
||||
kashida
|
||||
katakana
|
||||
katakana-iroha
|
||||
khaki
|
||||
landscape
|
||||
lang()
|
||||
large
|
||||
larger
|
||||
last
|
||||
latin
|
||||
lavender
|
||||
lavenderblush
|
||||
lawngreen
|
||||
layout
|
||||
leading
|
||||
left
|
||||
left-side
|
||||
leftwards
|
||||
lenonchiffon
|
||||
letter
|
||||
letter-spacing
|
||||
level
|
||||
lightblue
|
||||
lightcoral
|
||||
lightcyan
|
||||
lighter
|
||||
lightgoldenrodyellow
|
||||
lightgray
|
||||
lightgreen
|
||||
lightgrey
|
||||
lightpink
|
||||
lightsalmon
|
||||
lightseagreen
|
||||
lightskyblue
|
||||
lightslategray
|
||||
lightsteelblue
|
||||
lightyellow
|
||||
lime
|
||||
limegreen
|
||||
line
|
||||
line-height
|
||||
line-through
|
||||
linen
|
||||
link
|
||||
list
|
||||
list-item
|
||||
list-style
|
||||
list-style-image
|
||||
list-style-position
|
||||
list-style-type
|
||||
loud
|
||||
low
|
||||
lower
|
||||
lower-alpha
|
||||
lower-greek
|
||||
lower-latin
|
||||
lower-roman
|
||||
lowercase
|
||||
ltr
|
||||
magenta
|
||||
margin
|
||||
margin-bottom
|
||||
margin-left
|
||||
margin-right
|
||||
margin-top
|
||||
marker
|
||||
marker-offset
|
||||
marks
|
||||
maroon
|
||||
max
|
||||
max-height
|
||||
max-width
|
||||
medium
|
||||
mediumaquamarine
|
||||
mediumblue
|
||||
mediumorchid
|
||||
mediumpurple
|
||||
mediumseagreen
|
||||
mediumslateblue
|
||||
mediumspringgreen
|
||||
mediumturquoise
|
||||
mediumvioletred
|
||||
menu
|
||||
message
|
||||
message-box
|
||||
middle
|
||||
midnightblue
|
||||
min
|
||||
min-height
|
||||
min-width
|
||||
mintcream
|
||||
mistyrose
|
||||
mix
|
||||
mm
|
||||
moccasin
|
||||
mode
|
||||
monospace
|
||||
move
|
||||
ms
|
||||
n
|
||||
n-resize
|
||||
naby
|
||||
narrower
|
||||
navajowhite
|
||||
ne
|
||||
ne-resize
|
||||
no
|
||||
no-close-quote
|
||||
no-open-quote
|
||||
no-repeat
|
||||
none
|
||||
normal
|
||||
nowrap
|
||||
number
|
||||
numeral
|
||||
nw
|
||||
nw-resize
|
||||
oblique
|
||||
offset
|
||||
oldlace
|
||||
olive
|
||||
olivedrab
|
||||
once
|
||||
open
|
||||
open-quote
|
||||
orange
|
||||
orangered
|
||||
orchid
|
||||
orphans
|
||||
out
|
||||
outline
|
||||
outline-color
|
||||
outline-style
|
||||
outline-width
|
||||
outset
|
||||
outside
|
||||
overflow
|
||||
overhang
|
||||
overline
|
||||
override
|
||||
padding
|
||||
padding-bottom
|
||||
padding-left
|
||||
padding-right
|
||||
padding-top
|
||||
page
|
||||
page-break-after
|
||||
page-break-before
|
||||
page-break-inside
|
||||
palegoldenrod
|
||||
palegreen
|
||||
paleturquoise
|
||||
palevioletred
|
||||
papayawhip
|
||||
pause
|
||||
pause-after
|
||||
pause-before
|
||||
pc
|
||||
peachpuff
|
||||
peru
|
||||
pink
|
||||
pitch
|
||||
pitch-range
|
||||
play
|
||||
play-during
|
||||
plum
|
||||
pointer
|
||||
portarait
|
||||
position
|
||||
powderblue
|
||||
pre
|
||||
pre-line
|
||||
pre-wrap
|
||||
progid
|
||||
progress
|
||||
pt
|
||||
punctuation
|
||||
purple
|
||||
px
|
||||
quote
|
||||
quotes
|
||||
rad
|
||||
range
|
||||
rate
|
||||
red
|
||||
relative
|
||||
repeat
|
||||
repeat-x
|
||||
repeat-y
|
||||
reset
|
||||
resize
|
||||
richness
|
||||
ridge
|
||||
right
|
||||
right-side
|
||||
rightwards
|
||||
roman
|
||||
rosybrown
|
||||
row
|
||||
royalblue
|
||||
rtl
|
||||
run
|
||||
run-in
|
||||
s
|
||||
s-resize
|
||||
saddlebrown
|
||||
salmon
|
||||
sandybrown
|
||||
sans-serif
|
||||
scroll
|
||||
se
|
||||
se-resize
|
||||
seagreen
|
||||
seashell
|
||||
semi
|
||||
semi-condensed
|
||||
semi-expanded
|
||||
separate
|
||||
serif
|
||||
shadow
|
||||
show
|
||||
side
|
||||
sienna
|
||||
silent
|
||||
silever
|
||||
silver
|
||||
size
|
||||
skyblue
|
||||
slateblue
|
||||
slategray
|
||||
slow
|
||||
slower
|
||||
small
|
||||
small-caps
|
||||
small-caption
|
||||
smaller
|
||||
snow
|
||||
soft
|
||||
solid
|
||||
space
|
||||
spacing
|
||||
speak
|
||||
speak-header
|
||||
speak-numeral
|
||||
speak-punctuation
|
||||
specific
|
||||
specific-voice
|
||||
speech
|
||||
speech-rate
|
||||
spell
|
||||
spell-out
|
||||
springgreen
|
||||
square
|
||||
static
|
||||
status
|
||||
status-bar
|
||||
steelblue
|
||||
stress
|
||||
stretch
|
||||
style
|
||||
sub
|
||||
super
|
||||
sw
|
||||
sw-resize
|
||||
table
|
||||
table-caption
|
||||
table-cell
|
||||
table-column
|
||||
table-column-group
|
||||
table-footer-group
|
||||
table-header-group
|
||||
table-layout
|
||||
table-row
|
||||
table-row-group
|
||||
tan
|
||||
teal
|
||||
text
|
||||
text-align
|
||||
text-bottom
|
||||
text-decoration
|
||||
text-indent
|
||||
text-shadow
|
||||
text-top
|
||||
text-transform
|
||||
thick
|
||||
thin
|
||||
thistle
|
||||
through
|
||||
tomato
|
||||
top
|
||||
track
|
||||
transform
|
||||
transparent
|
||||
turquoise
|
||||
type
|
||||
ultra
|
||||
ultra-condensed
|
||||
ultra-expanded
|
||||
underline
|
||||
unicode
|
||||
unicode-bidi
|
||||
upper
|
||||
upper-alpha
|
||||
upper-latin
|
||||
upper-roman
|
||||
uppercase
|
||||
variant
|
||||
vertical
|
||||
vertical-align
|
||||
violet
|
||||
visibility
|
||||
visible
|
||||
visited
|
||||
voice
|
||||
voice-family
|
||||
volume
|
||||
w
|
||||
w-resize
|
||||
wait
|
||||
weight
|
||||
wheat
|
||||
white
|
||||
white-space
|
||||
whitesmoke
|
||||
wider
|
||||
widows
|
||||
width
|
||||
word
|
||||
word-spacing
|
||||
wrap
|
||||
x
|
||||
x-fast
|
||||
x-high
|
||||
x-large
|
||||
x-loud
|
||||
x-low
|
||||
x-slow
|
||||
x-small
|
||||
x-soft
|
||||
xx
|
||||
xx-large
|
||||
xx-small
|
||||
y
|
||||
yellow
|
||||
yellowgreen
|
||||
z
|
||||
z-index
|
||||
zero
|
162
dict/sh-mode
Executable file
162
dict/sh-mode
Executable file
|
@ -0,0 +1,162 @@
|
|||
alias
|
||||
bg
|
||||
bind
|
||||
break
|
||||
builtin
|
||||
caller
|
||||
cd
|
||||
command
|
||||
compgen
|
||||
complete
|
||||
compopt
|
||||
continue
|
||||
declare
|
||||
dirs
|
||||
disown
|
||||
echo
|
||||
enable
|
||||
eval
|
||||
exec
|
||||
exit
|
||||
export
|
||||
fc
|
||||
fg
|
||||
getopts
|
||||
hash
|
||||
help
|
||||
history
|
||||
jobs
|
||||
kill
|
||||
let
|
||||
local
|
||||
logout
|
||||
mapfile
|
||||
popd
|
||||
printf
|
||||
pushd
|
||||
pwd
|
||||
read
|
||||
readarray
|
||||
readonly
|
||||
return
|
||||
set
|
||||
shift
|
||||
shopt
|
||||
source
|
||||
suspend
|
||||
test
|
||||
times
|
||||
trap
|
||||
type
|
||||
typeset
|
||||
ulimit
|
||||
umask
|
||||
unalias
|
||||
unset
|
||||
wait
|
||||
case
|
||||
do
|
||||
done
|
||||
elif
|
||||
else
|
||||
esac
|
||||
fi
|
||||
for
|
||||
function
|
||||
if
|
||||
in
|
||||
select
|
||||
then
|
||||
time
|
||||
until
|
||||
while
|
||||
BASH
|
||||
BASH_ALIASES
|
||||
BASH_ARGC
|
||||
BASH_ARGV
|
||||
BASH_CMDS
|
||||
BASH_COMMAND
|
||||
BASH_ENV
|
||||
BASH_EXECUTION_STRING
|
||||
BASH_LINENO
|
||||
BASH_REMATCH
|
||||
BASH_SOURCE
|
||||
BASH_SUBSHELL
|
||||
BASH_VERSINFO
|
||||
BASH_VERSION
|
||||
BASH_XTRACEFD
|
||||
BASHOPTS
|
||||
BASHPID
|
||||
CDPATH
|
||||
COLUMNS
|
||||
COMP_CWORD
|
||||
COMP_KEY
|
||||
COMP_LINE
|
||||
COMP_POINT
|
||||
COMP_TYPE
|
||||
COMP_WORDBREAKS
|
||||
COMP_WORDS
|
||||
COMPREPLY
|
||||
DIRSTACK
|
||||
EMACS
|
||||
EUID
|
||||
FCEDIT
|
||||
FIGNORE
|
||||
FUNCNAME
|
||||
GLOBIGNORE
|
||||
GROUPS
|
||||
HISTCMD
|
||||
HISTCONTROL
|
||||
HISTFILE
|
||||
HISTFILESIZE
|
||||
HISTIGNORE
|
||||
HISTSIZE
|
||||
HISTTIMEFORMAT
|
||||
HOME
|
||||
HOSTFILE
|
||||
HOSTNAME
|
||||
HOSTTYPE
|
||||
IFS
|
||||
IGNOREEOF
|
||||
INPUTRC
|
||||
LANG
|
||||
LC_ALL
|
||||
LC_COLLATE
|
||||
LC_CTYPE
|
||||
LC_MESSAGES
|
||||
LC_MESSAGES
|
||||
LC_NUMERIC
|
||||
LINENO
|
||||
LINES
|
||||
MACHTYPE
|
||||
MAIL
|
||||
MAILCHECK
|
||||
MAILPATH
|
||||
OLDPWD
|
||||
OPTARG
|
||||
OPTERR
|
||||
OPTIND
|
||||
OSTYPE
|
||||
PATH
|
||||
PIPESTATUS
|
||||
POSIXLY_CORRECT
|
||||
PPID
|
||||
PROMPT_COMMAND
|
||||
PROMPT_DIRTRIM
|
||||
PS1
|
||||
PS2
|
||||
PS3
|
||||
PS4
|
||||
PWD
|
||||
RANDOM
|
||||
REPLY
|
||||
SECONDS
|
||||
SHELL
|
||||
SHELLOPTS
|
||||
SHLVL
|
||||
TEXTDOMAIN
|
||||
TEXTDOMAINDIR
|
||||
TIMEFORMAT
|
||||
TMOUT
|
||||
TMPDIR
|
||||
UID
|
65
init.el
65
init.el
|
@ -3,30 +3,29 @@
|
|||
;; Author: Henrik Lissner <henrik@lissner>
|
||||
;; URL: https://github.com/hlissner/emacs.d
|
||||
;;
|
||||
;;; Description:
|
||||
;;
|
||||
;; My emacs.d, which sets out to rustle emacs users' jimmies by making
|
||||
;; emacs as vim-like as possible.
|
||||
;;
|
||||
;;; Description:
|
||||
;;
|
||||
;; Naming conventions:
|
||||
;; * my--<defun-name> ; interal defuns, meant for use via elisp
|
||||
;; * my-<defun-name> ; interactive command, can be used via M-x
|
||||
;; * my.<defun-name> ; commands with buffer side-effects (for keybinds)
|
||||
;; * my:<defun-name> ; defuns meant to be used from Ex mode
|
||||
;; * my/<defun-name> ; defuns meant to be used from Ex mode
|
||||
;; * *<defun/var-name> ; for altering the visual state
|
||||
;;
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(defconst *debug-mode nil)
|
||||
|
||||
(defconst my-dir user-emacs-directory)
|
||||
(defconst my-init-dir (concat my-dir "init/"))
|
||||
(defconst my-elisp-dir (concat my-dir "elisp/"))
|
||||
(defconst my-core-dir (concat my-dir "core/"))
|
||||
(defconst my-modules-dir (concat my-dir "modules/"))
|
||||
(defconst my-personal-dir (concat my-dir "my/"))
|
||||
(defconst my-elisp-dir (concat my-dir "lib/"))
|
||||
(defconst my-themes-dir (concat my-dir "themes/"))
|
||||
(defconst my-snippets-dir (concat my-dir "snippets/"))
|
||||
(defconst my-ac-dicts-dir (concat my-dir "ac-dict/"))
|
||||
(defconst my-tmp-dir (concat my-dir ".cache/"))
|
||||
|
||||
(defconst *dark-theme 'brin)
|
||||
|
@ -38,7 +37,9 @@
|
|||
(defconst *presentation-font *default-font)
|
||||
(defconst *presentation-font-size 18)
|
||||
|
||||
(add-to-list 'load-path my-init-dir)
|
||||
(add-to-list 'load-path my-core-dir)
|
||||
(add-to-list 'load-path my-modules-dir)
|
||||
(add-to-list 'load-path my-personal-dir)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Just the... bear necessities...
|
||||
|
@ -47,33 +48,37 @@
|
|||
'(core
|
||||
|
||||
;; init-auto-complete
|
||||
init-company
|
||||
init-auto-insert
|
||||
;; init-cpp
|
||||
init-auto-insert ; for the lazy typis
|
||||
init-company ; see above
|
||||
init-cc ; C/C++/Obj-C madness
|
||||
;; init-cscope
|
||||
;; init-csharp
|
||||
init-dev
|
||||
init-elisp
|
||||
init-dev ; general dev tools/settings
|
||||
init-elisp ; emacs lisp
|
||||
;; init-eshell
|
||||
init-fly
|
||||
init-git
|
||||
init-floobits ; when I'm feeling lonely
|
||||
init-fly ; fly(check|spell)
|
||||
init-git ; git-gutter + modes
|
||||
;; init-go
|
||||
init-helm
|
||||
init-ido
|
||||
init-java
|
||||
init-lua
|
||||
init-org
|
||||
init-project ; project management settings & tools
|
||||
init-projectile
|
||||
init-python
|
||||
init-regex
|
||||
init-ruby
|
||||
init-sh
|
||||
;; init-swift
|
||||
init-text
|
||||
init-helm ; when you forget where you put your constellation
|
||||
init-ido ; when you forget where you put your keys
|
||||
init-java ; the mascot language of carpal tunnel syndome
|
||||
init-js ; alert("Oh, sure dude, I know java")
|
||||
init-lua ; zero-based indices? Zero-based indices.
|
||||
init-org ; for fearless leader (who is organized)
|
||||
init-php ; making php less painful to work with
|
||||
init-project ; project tools - dired, perspective, neotree
|
||||
init-projectile ; when you forget where you put your house
|
||||
init-python ; beautiful is better than ugly
|
||||
init-regex ; /^[^\s](meaning)[^\n]*life/
|
||||
init-ruby ; I frakking love ruby
|
||||
init-scss ; @include magic;
|
||||
init-sh ; #!/bin/bash_your_head_in
|
||||
init-swift ; ever wanted to name a variable an emoticon?
|
||||
init-text ; I got nothing...
|
||||
init-tmux
|
||||
init-webdev
|
||||
init-yasnippet
|
||||
init-web
|
||||
init-yasnippet ; type for me
|
||||
|
||||
my-bindings
|
||||
my-settings
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
(provide 'init-auto-complete)
|
||||
|
||||
(setq tags-case-fold-search nil)
|
||||
|
||||
(use-package auto-complete
|
||||
:disabled t
|
||||
:init
|
||||
(progn
|
||||
(require 'auto-complete-config)
|
||||
|
||||
(setq ac-auto-start nil
|
||||
ac-auto-show-menu t ; Suggestions box must be invoked manually (see core-keymaps.el)
|
||||
ac-use-menu-map t ; Enable ac-menu-map map when menu is open
|
||||
ac-use-quick-help t ; Don't show tooltips unless invoked (see core-keymaps.el)
|
||||
ac-use-fuzzy t
|
||||
ac-candidate-limit 25)
|
||||
(setq ac-comphist-file (concat my-tmp-dir "ac-comphist.dat"))
|
||||
|
||||
(setq-default ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup)
|
||||
(add-hook 'css-mode-hook 'ac-css-mode-setup)
|
||||
(add-hook 'shell-script-mode-hook 'ac-add-files)
|
||||
;; (add-hook 'auto-complete-mode-hook 'ac-common-setup)
|
||||
)
|
||||
:config
|
||||
(progn
|
||||
;; Redefine this function so auto-complete is available [almost] everywhere
|
||||
(defun auto-complete-mode-maybe ()
|
||||
(unless (minibufferp (current-buffer))
|
||||
(auto-complete-mode 1)))
|
||||
|
||||
(global-auto-complete-mode t)
|
||||
|
||||
(add-to-list 'ac-dictionary-files (expand-file-name "global" my-ac-dicts-dir))
|
||||
(add-to-list 'ac-dictionary-directories my-ac-dicts-dir)
|
||||
|
||||
(push '("*Popup Help*" :position bottom :height 0.35 :noselect t) popwin:special-display-config)
|
||||
|
||||
;; Tell ido not to care about case
|
||||
;; (setq completion-ignore-case t)
|
||||
|
||||
(bind 'insert ac-mode-map
|
||||
(kbd "C-x C-k") 'ac-complete-dictionary
|
||||
(kbd "C-x C-f") 'ac-complete-filename
|
||||
(kbd "C-x C-]") 'ac-complete-etags
|
||||
(kbd "C-x s") 'ac-complete-ispell
|
||||
(kbd "C-x C-s") 'ac-complete-ispell-fuzzy
|
||||
(kbd "C-x C-y") 'ac-complete-yasnippet
|
||||
(kbd "C-x C-o") 'auto-complete
|
||||
(kbd "C-SPC") 'auto-complete)
|
||||
|
||||
(bind ac-completing-map
|
||||
(kbd "<tab>") 'ac-complete
|
||||
(kbd "C-n") 'ac-next
|
||||
(kbd "C-p") 'ac-previous
|
||||
(kbd "S-C-<SPC>") 'ac-quick-help
|
||||
(kbd "C-<SPC>") 'ac-help
|
||||
(kbd "<ESC>") 'ac-stop
|
||||
(kbd "<RET>") 'ac-complete)
|
||||
|
||||
(use-package ac-etags
|
||||
:commands (ac-complete-etags)
|
||||
:config (ac-etags-setup))
|
||||
|
||||
(use-package ac-ispell
|
||||
:commands (ac-complete-ispell ac-complete-ispell-fuzzy)
|
||||
:config
|
||||
(progn (ac-ispell-setup)
|
||||
(setq ac-ispell-requires 1
|
||||
ac-ispell-fuzzy-limit 25)))))
|
129
init/init-cpp.el
129
init/init-cpp.el
|
@ -1,129 +0,0 @@
|
|||
(provide 'init-cpp)
|
||||
|
||||
(use-package cmake-mode
|
||||
:mode "CMakeLists\\.txt$"
|
||||
:config (add-to-list 'ac-modes 'cmake-mode))
|
||||
|
||||
(setq-default c-basic-offset 4
|
||||
c-default-style "linux"
|
||||
c-tab-always-indent nil)
|
||||
|
||||
;; Setting proper includes on OSX
|
||||
(when is-mac
|
||||
(setq my/clang-includes
|
||||
'("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1"
|
||||
"/usr/local/include"
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include"
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include"
|
||||
"/usr/include"
|
||||
"/System/Library/Frameworks"
|
||||
"/Library/Frameworks"))
|
||||
|
||||
(after "flycheck" (setq flycheck-clang-include-path my/clang-includes))
|
||||
(after "auto-complete"
|
||||
(setq ac-clang-flags (mapcar (lambda (item) (concat "-I" item)) my/clang-includes)))
|
||||
)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
|
||||
(add-hook! 'c-mode-common-hook
|
||||
(use-package auto-complete-clang)
|
||||
(use-package auto-complete-c-headers)
|
||||
(setq ac-sources
|
||||
'(ac-source-clang
|
||||
ac-source-c-headers
|
||||
ac-source-yasnippet
|
||||
ac-source-words-in-same-mode-buffers))
|
||||
|
||||
(c-toggle-electric-state -1)
|
||||
(c-toggle-auto-newline -1)
|
||||
|
||||
;; DEL mapping interferes with smartparens and my.deflate-maybe
|
||||
(bind c-mode-map (kbd "DEL") nil)
|
||||
|
||||
(c-set-offset 'substatement-open '0) ; brackets should be at same indentation level as the statements they open
|
||||
(c-set-offset 'inline-open '+)
|
||||
(c-set-offset 'block-open '+)
|
||||
(c-set-offset 'brace-list-open '+) ; all "opens" should be indented by the c-indent-level
|
||||
(c-set-offset 'case-label '+) ; indent case labels by c-indent-level, too
|
||||
|
||||
;; C++11 support on mac
|
||||
(when (and is-mac (eq major-mode 'c++-mode))
|
||||
(setq flycheck-clang-language-standard "c++11"
|
||||
flycheck-clang-standard-library "libc++"
|
||||
flycheck-c/c++-clang-executable "clang++")))
|
||||
|
||||
;; C++11 syntax support (until cc-mode is updated)
|
||||
(require 'font-lock)
|
||||
(defun --copy-face (new-face face)
|
||||
"Define NEW-FACE from existing FACE."
|
||||
(copy-face face new-face)
|
||||
(eval `(defvar ,new-face nil))
|
||||
(set new-face new-face))
|
||||
|
||||
(--copy-face 'font-lock-label-face ; labels, case, public, private, proteced, namespace-tags
|
||||
'font-lock-keyword-face)
|
||||
(--copy-face 'font-lock-doc-markup-face ; comment markups such as Javadoc-tags
|
||||
'font-lock-doc-face)
|
||||
(--copy-face 'font-lock-doc-string-face ; comment markups
|
||||
'font-lock-comment-face)
|
||||
(global-font-lock-mode t)
|
||||
(setq font-lock-maximum-decoration t)
|
||||
|
||||
(add-hook 'c++-mode-hook
|
||||
'(lambda()
|
||||
;; We could place some regexes into `c-mode-common-hook', but note that their evaluation order
|
||||
;; matters.
|
||||
(font-lock-add-keywords
|
||||
nil '(;; complete some fundamental keywords
|
||||
("\\<\\(void\\|unsigned\\|signed\\|char\\|short\\|bool\\|int\\|long\\|float\\|double\\)\\>" . font-lock-keyword-face)
|
||||
;; namespace names and tags - these are rendered as constants by cc-mode
|
||||
("\\<\\(\\w+::\\)" . font-lock-function-name-face)
|
||||
;; new C++11 keywords
|
||||
("\\<\\(alignof\\|alignas\\|constexpr\\|decltype\\|noexcept\\|nullptr\\|static_assert\\|thread_local\\|override\\|final\\)\\>" . font-lock-keyword-face)
|
||||
("\\<\\(char16_t\\|char32_t\\)\\>" . font-lock-keyword-face)
|
||||
;; PREPROCESSOR_CONSTANT, PREPROCESSORCONSTANT
|
||||
("\\<[A-Z]*_[A-Z_]+\\>" . font-lock-constant-face)
|
||||
("\\<[A-Z]\\{3,\\}\\>" . font-lock-constant-face)
|
||||
;; hexadecimal numbers
|
||||
("\\<0[xX][0-9A-Fa-f]+\\>" . font-lock-constant-face)
|
||||
;; integer/float/scientific numbers
|
||||
("\\<[\\-+]*[0-9]*\\.?[0-9]+\\([ulUL]+\\|[eE][\\-+]?[0-9]+\\)?\\>" . font-lock-constant-face)
|
||||
;; c++11 string literals
|
||||
;; L"wide string"
|
||||
;; L"wide string with UNICODE codepoint: \u2018"
|
||||
;; u8"UTF-8 string", u"UTF-16 string", U"UTF-32 string"
|
||||
("\\<\\([LuU8]+\\)\".*?\"" 1 font-lock-keyword-face)
|
||||
;; R"(user-defined literal)"
|
||||
;; R"( a "quot'd" string )"
|
||||
;; R"delimiter(The String Data" )delimiter"
|
||||
;; R"delimiter((a-z))delimiter" is equivalent to "(a-z)"
|
||||
("\\(\\<[uU8]*R\"[^\\s-\\\\()]\\{0,16\\}(\\)" 1 font-lock-keyword-face t) ; start delimiter
|
||||
( "\\<[uU8]*R\"[^\\s-\\\\()]\\{0,16\\}(\\(.*?\\))[^\\s-\\\\()]\\{0,16\\}\"" 1 font-lock-string-face t) ; actual string
|
||||
( "\\<[uU8]*R\"[^\\s-\\\\()]\\{0,16\\}(.*?\\()[^\\s-\\\\()]\\{0,16\\}\"\\)" 1 font-lock-keyword-face t) ; end delimiter
|
||||
|
||||
;; user-defined types (rather project-specific)
|
||||
("\\<[A-Za-z_]+[A-Za-z_0-9]*_\\(type\\|ptr\\)\\>" . font-lock-type-face)
|
||||
("\\<\\(xstring\\|xchar\\)\\>" . font-lock-type-face)
|
||||
))
|
||||
) t)
|
||||
|
||||
;; Fix enum and C++11 lambda indentation
|
||||
(defadvice c-lineup-arglist (around my activate)
|
||||
"Improve indentation of continued C++11 lambda function opened as argument."
|
||||
(setq ad-return-value
|
||||
(if (and (equal major-mode 'c++-mode)
|
||||
(ignore-errors
|
||||
(save-excursion
|
||||
(goto-char (c-langelem-pos langelem))
|
||||
;; Detect "[...](" or "[...]{". preceded by "," or "(",
|
||||
;; and with unclosed brace.
|
||||
(looking-at ".*[(,][ \t]*\\[[^]]*\\][ \t]*[({][^}]*$"))))
|
||||
0 ; no additional indent
|
||||
ad-do-it))) ; default behavior
|
||||
|
||||
;; Shaders
|
||||
(use-package glsl-mode
|
||||
:mode (("\\.glsl\\'" . glsl-mode)
|
||||
("\\.vert\\'" . glsl-mode)
|
||||
("\\.frag\\'" . glsl-mode)
|
||||
("\\.geom\\'" . glsl-mode)))
|
106
init/init-dev.el
106
init/init-dev.el
|
@ -1,106 +0,0 @@
|
|||
(provide 'init-dev)
|
||||
|
||||
(add-hook 'find-file-hook 'hl-todo-mode)
|
||||
|
||||
(use-package dash-at-point
|
||||
:commands (dash-at-point dash-at-point-with-docset)
|
||||
:if is-mac)
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:commands rainbow-delimiters-mode
|
||||
:init (add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode))
|
||||
|
||||
;;; Config modes
|
||||
(use-package yaml-mode
|
||||
:defer t
|
||||
:config (add-hook 'yaml-mode-hook 'enable-tab-width-2))
|
||||
|
||||
(use-package json-mode
|
||||
:mode (("\\.json\\'" . json-mode)
|
||||
("\\.jshintrc\\'" . json-mode)))
|
||||
|
||||
(use-package emr
|
||||
:commands (emr-initialize emr-show-refactor-menu)
|
||||
:init (add-hook 'prog-mode-hook 'emr-initialize)
|
||||
:config
|
||||
(progn
|
||||
(bind 'normal "gR" 'emr-show-refactor-menu)
|
||||
|
||||
(after "evil" (evil-ex-define-cmd "ref[actor]" 'emr-show-refactor-menu))))
|
||||
|
||||
|
||||
;; Variables
|
||||
(defvar-local my-run-code-interpreter nil)
|
||||
(defvar-local my-run-code-func 'my--run-code-shell)
|
||||
(defvar-local my-run-code-region-func 'my--run-code-region-shell)
|
||||
(defvar-local my-switch-to-repl-func nil)
|
||||
(defvar-local my-send-region-to-repl-func nil)
|
||||
(defvar-local my-build-func nil)
|
||||
|
||||
;; usage
|
||||
(defvar-local my-test-single-func nil)
|
||||
(defvar-local my-test-fixture-func nil)
|
||||
(defvar-local my-test-all-func nil)
|
||||
|
||||
(defun my--run-code-shell (file-path)
|
||||
(if (stringp my-run-code-interpreter)
|
||||
(message (concat my-run-code-interpreter " " file-path))
|
||||
(error "No interpreter set for %s. See `my-run-code-interpreter'"
|
||||
(symbol-name major-mode))))
|
||||
|
||||
(defun my--run-code-region-shell (beg end)
|
||||
(if (stringp my-run-code-interpreter)
|
||||
(shell-command-on-region beg end my-run-code-interpreter)
|
||||
(error "No interpreter set for %s. See `my-run-code-interpreter'"
|
||||
(symbol-name major-mode))))
|
||||
|
||||
(defun my-switch-to-repl ()
|
||||
(interactive)
|
||||
(if (functionp my-switch-to-repl-func)
|
||||
(funcall my-switch-to-repl-func)
|
||||
(error "No REPL was set for %s. See `my-switch-to-repl-func'"
|
||||
(symbol-name major-mode))))
|
||||
|
||||
(defun my-send-region-to-repl (beg end)
|
||||
(interactive "r")
|
||||
(if (functionp my-send-region-to-repl-func)
|
||||
(funcall my-send-region-to-repl-func beg end)
|
||||
(error "No region runner set for %s. See `my-send-region-to-repl-func'"
|
||||
(symbol-name major-mode))))
|
||||
|
||||
(defun my-run-code-buffer ()
|
||||
(interactive)
|
||||
(let ((mode-name (symbol-name major-mode)))
|
||||
(if (or (buffer-modified-p)
|
||||
(not (f-exists? buffer-file-name)))
|
||||
(my:run-code-region (point-min) (point-max))
|
||||
(if (functionp my-run-code-func)
|
||||
(funcall my-run-code-func buffer-file-name)
|
||||
(error "No runner set for %s. See `my-run-code-func'" mode-name)))))
|
||||
|
||||
(defun my-run-code-region (beg end)
|
||||
(interactive "r")
|
||||
(if (functionp my-run-code-region-func)
|
||||
(funcall my-run-code-region-func beg end)
|
||||
(error "No region runner set for %s. See `my-run-code-region-func'"
|
||||
(symbol-name major-mode))))
|
||||
|
||||
(defun my-build (&optional arguments)
|
||||
(interactive)
|
||||
(if (functionp my-build-func)
|
||||
(funcall my-build-func arguments)
|
||||
(error "No build function set for %s. See `my-build-func'"
|
||||
(symbol-name major-mode))))
|
||||
|
||||
|
||||
|
||||
(after "evil"
|
||||
;; (evil-ex-define-cmd "test[s]" 'my-test-single-func)
|
||||
;; (evil-ex-define-cmd "testf[ixture]" 'my-test-fixture-func)
|
||||
;; (evil-ex-define-cmd "testa[ll]" 'my-test-all-func)
|
||||
|
||||
(require 'evil-snipe)
|
||||
(global-evil-snipe-mode 1)
|
||||
|
||||
(evil-snipe-surround-compatibility)
|
||||
(evil-define-key 'visual evil-surround-mode-map (kbd "S") 'evil-surround-region))
|
|
@ -1,5 +0,0 @@
|
|||
(provide 'init-swift)
|
||||
|
||||
;; (use-package swift-mode)
|
||||
|
||||
;; TODO: Set up emacs task runners for fruitstrap
|
|
@ -1,124 +0,0 @@
|
|||
(provide 'init-webdev)
|
||||
|
||||
(use-package rainbow-mode
|
||||
:defer t
|
||||
:init (add-hook 'scss-mode-hook 'rainbow-mode))
|
||||
|
||||
(use-package scss-mode
|
||||
:mode "\\.scss$"
|
||||
:config
|
||||
(progn
|
||||
(add-hook 'scss-mode-hook 'enable-tab-width-2)
|
||||
(add-hook 'scss-mode-hook 'ac-css-mode-setup)
|
||||
|
||||
(setq-default css-indent-offset 2)
|
||||
(setq scss-compile-at-save nil)
|
||||
|
||||
(bind '(normal visual) scss-mode-map "gQ" 'web-beautify-css)))
|
||||
|
||||
;;; HTML/Markup
|
||||
(use-package haml-mode :mode "\\.haml$")
|
||||
|
||||
(use-package web-mode
|
||||
:mode (("\\.\\(p\\)?htm\\(l\\)?$" . web-mode)
|
||||
("\\.tpl\\(\\.php\\)?$" . web-mode)
|
||||
("\\.erb$" . web-mode)
|
||||
("wp-content/themes/.+/.+\\.php$" . web-mode))
|
||||
:config
|
||||
(progn
|
||||
(add-hook 'web-mode-hook 'enable-tab-width-2)
|
||||
|
||||
(setq web-mode-ac-sources-alist '(("css" . (ac-source-css-property)))
|
||||
web-mode-markup-indent-offset 2
|
||||
web-mode-code-indent-offset 2
|
||||
web-mode-css-indent-offset 2
|
||||
web-mode-style-padding 2
|
||||
web-mode-script-padding 2
|
||||
web-mode-block-padding 2)
|
||||
|
||||
(bind web-mode-map (kbd "s-/") 'web-mode-comment-or-uncomment)
|
||||
(bind 'normal web-mode-map
|
||||
"zf" 'web-mode-fold-or-unfold
|
||||
",t" 'web-mode-element-rename)
|
||||
(bind '(normal visual) web-mode-map
|
||||
"gQ" 'web-beautify-html
|
||||
"]a" 'web-mode-attribute-next
|
||||
"]t" 'web-mode-tag-next
|
||||
"[t" 'web-mode-tag-previous
|
||||
"]T" 'web-mode-element-child
|
||||
"[T" 'web-mode-element-parent)))
|
||||
|
||||
(use-package emmet-mode
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(add-hook 'scss-mode-hook 'emmet-mode)
|
||||
(add-hook 'web-mode-hook 'emmet-mode)
|
||||
(add-hook 'html-mode-hook 'emmet-mode)
|
||||
(add-hook 'haml-mode-hook 'emmet-mode)
|
||||
(add-hook 'nxml-mode-hook 'emmet-mode))
|
||||
:config
|
||||
(progn
|
||||
(setq emmet-move-cursor-between-quotes t)
|
||||
|
||||
(bind 'insert emmet-mode-keymap
|
||||
(kbd "s-e") 'emmet-expand-yas
|
||||
(kbd "s-E") 'emmet-expand-line)))
|
||||
|
||||
(use-package php-mode
|
||||
:mode "\\.\\(php\\|inc\\)$"
|
||||
:config
|
||||
(progn
|
||||
(add-hook! 'php-mode-hook (setq my-run-code-interpreter "php"))
|
||||
(setq php-template-compatibility nil)))
|
||||
|
||||
(use-package js2-mode :mode "\\.js$"
|
||||
:config
|
||||
(progn
|
||||
(setq-default js2-show-parse-errors nil)
|
||||
(setq-default js2-global-externs '("module" "require" "buster" "sinon" "assert"
|
||||
"refute" "setTimeout" "clearTimeout"
|
||||
"setInterval" "clearInterval" "location"
|
||||
"__dirname" "console" "JSON" "jQuery" "$"
|
||||
;; Launchbar API
|
||||
"LaunchBar" "File" "Action" "HTTP" "include"))
|
||||
|
||||
(bind '(normal visual) js2-mode-map "gQ" 'web-beautify-js)
|
||||
|
||||
(use-package js2-refactor
|
||||
;; :config
|
||||
;; TODO Set up keymaps
|
||||
)
|
||||
|
||||
(use-package tern
|
||||
:commands tern-mode
|
||||
;; replace auto-complete with tern-ac-complete only in js-mode
|
||||
:init (add-hook! 'js2-mode-hook
|
||||
(tern-mode t)
|
||||
(tern-ac-setup)
|
||||
(setq my-run-code-interpreter "node"))
|
||||
:config
|
||||
(progn
|
||||
(after "auto-complete"
|
||||
(require 'tern-auto-complete)
|
||||
(setq tern-ac-on-dot nil)
|
||||
(bind 'insert js2-mode-map
|
||||
[remap auto-complete] 'tern-ac-complete)
|
||||
(bind 'motion js2-mode-map
|
||||
"gd" 'tern-find-definition))
|
||||
|
||||
(after "company-tern"
|
||||
(add-to-list 'company-backends 'company-tern)
|
||||
;; (setq company-tern-meta-as-single-line t)
|
||||
;; (setq company-tern-property-marker "")
|
||||
;; (setq company-tooltip-align-annotations t)
|
||||
)))))
|
||||
|
||||
|
||||
(use-package web-beautify
|
||||
:commands (web-beautify-js web-beautify-css web-beautify-html)
|
||||
:config
|
||||
(progn
|
||||
(add-hook! 'scss-mode-hook (setenv "jsbeautify_indent_size" "2"))
|
||||
(add-hook! 'web-mode-hook (setenv "jsbeautify_indent_size" "4"))
|
||||
(add-hook! 'js2-mode-hook (setenv "jsbeautify_indent_size" "4"))))
|
168
lib/flycheck-objc.el
Normal file
168
lib/flycheck-objc.el
Normal file
|
@ -0,0 +1,168 @@
|
|||
;;; flycheck-objc.el --- Flycheck for objc-mode. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2014 Rafal Kowalski
|
||||
|
||||
;; Author: Rafal Kowalski <rafal.kowalski@mac.com>
|
||||
;; Keywords: c, tools
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Flycheck settings for objc-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'flycheck)
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-definitions nil objc-clang
|
||||
"Additional preprocessor definitions for Clang.
|
||||
|
||||
The value of this variable is a list of strings, where each
|
||||
string is an additional definition to pass to Clang, via the `-D'
|
||||
option."
|
||||
:type '(repeat (string :tag "Definition"))
|
||||
:safe #'flycheck-string-list-p
|
||||
:package-version '(flycheck . "0.15"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-include-path nil objc-clang
|
||||
"A list of include directories for Clang.
|
||||
|
||||
Thae value of this variable is a list of strings, where each
|
||||
string is a directory to add to the include path of Clang.
|
||||
Relative paths are relative to the file being checked."
|
||||
:type '(repeat (directory :tag "Include directory"))
|
||||
:safe #'flycheck-string-list-p
|
||||
:package-version '(flycheck . "0.14"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-framework-path nil objc-clang
|
||||
"A list of frameworks for Clang.
|
||||
|
||||
Thae value of this variable is a list of strings, where each
|
||||
string is a path to a frameworks directory to add to the frameworks
|
||||
path of Clang. Relative paths are relative to the file being
|
||||
checked."
|
||||
:type '(repeat (directory :tag "Framework directory"))
|
||||
:safe #'flycheck-string-list-p
|
||||
:package-version '(flycheck . "0.14"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-includes nil objc-clang
|
||||
"A list of additional include files for Clang.
|
||||
|
||||
The value of this variable is a list of strings, where each
|
||||
string is a file to include before syntax checking. Relative
|
||||
paths are relative to the file being checked."
|
||||
:type '(repeat (file :tag "Include file"))
|
||||
:safe #'flycheck-string-list-p
|
||||
:package-version '(flycheck . "0.15"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-language-standard nil objc-clang
|
||||
"The language standard to use in Clang.
|
||||
|
||||
The value of this variable is either a string denoting a language
|
||||
standard, or nil, to use the default standard. When non-nil,
|
||||
pass the language standard via the `-std' option."
|
||||
:type '(choice (const :tag "Default standard" nil)
|
||||
(string :tag "Language standard"))
|
||||
:safe #'stringp
|
||||
:package-version '(flycheck . "0.15"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-standard-library nil objc-clang
|
||||
"The standard library to use for Clang.
|
||||
|
||||
The value of this variable is the name of a standard library as
|
||||
string, or nil to use the default standard library.
|
||||
|
||||
Refer to the Clang manual at URL
|
||||
`http://clang.llvm.org/docs/UsersManual.html' for more
|
||||
information about the standard library."
|
||||
:type '(choice (const "libc++")
|
||||
(const :tag "GNU libstdc++" "libstdc++")
|
||||
(string :tag "Library name"))
|
||||
:safe #'stringp
|
||||
:package-version '(flycheck . "0.15"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-archs nil objc-clang
|
||||
"What architectures to use for clang.
|
||||
|
||||
When non-nil, set the architectures, via `-arch'."
|
||||
:type '(repeat (file :tag "Architecture"))
|
||||
:safe #'flycheck-string-list-p
|
||||
:package-version '(flycheck . "0.15"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-sysroot nil objc-clang
|
||||
"The system root to use in clang.
|
||||
|
||||
When non-nil,pass the language standard via the `-isysroot' option."
|
||||
:type '(choice (const :tag "Default sysroot" nil)
|
||||
(string :tag "Sysroot"))
|
||||
:safe #'stringp
|
||||
:package-version '(flycheck . "0.15"))
|
||||
|
||||
(flycheck-def-option-var flycheck-objc-clang-warnings '("all" "extra") objc-clang
|
||||
"A list of additional warnings to enable in Clang.
|
||||
|
||||
The value of this variable is a list of strings, where each string
|
||||
is the name of a warning category to enable. By default, all
|
||||
recommended warnings and some extra warnings are enabled (as by
|
||||
`-Wall' and `-Wextra' respectively).
|
||||
|
||||
Refer to the Clang manual at URL
|
||||
`http://clang.llvm.org/docs/UsersManual.html' for more
|
||||
information about warnings."
|
||||
:type '(choice (const :tag "No additional warnings" nil)
|
||||
(repeat :tag "Additional warnings"
|
||||
(string :tag "Warning name")))
|
||||
:safe #'flycheck-string-list-p
|
||||
:package-version '(flycheck . "0.14"))
|
||||
|
||||
(flycheck-define-checker objc-clang
|
||||
"A objc syntax checker using Clang.
|
||||
|
||||
See URL `http://clang.llvm.org/'."
|
||||
:command ("clang"
|
||||
"-fsyntax-only"
|
||||
"-fno-color-diagnostics" ; Do not include color codes in output
|
||||
"-fno-caret-diagnostics" ; Do not visually indicate the source
|
||||
; location
|
||||
"-fno-diagnostics-show-option" ; Do not show the corresponding
|
||||
; warning group
|
||||
(option "-isysroot" flycheck-objc-clang-sysroot)
|
||||
(option-list "-arch" flycheck-objc-clang-archs)
|
||||
(option "-std=" flycheck-objc-clang-language-standard)
|
||||
(option "-stdlib=" flycheck-objc-clang-standard-library)
|
||||
(option-list "-include" flycheck-objc-clang-includes)
|
||||
(option-list "-W" flycheck-objc-clang-warnings s-prepend)
|
||||
(option-list "-D" flycheck-objc-clang-definitions s-prepend)
|
||||
(option-list "-I" flycheck-objc-clang-include-path)
|
||||
(option-list "-F" flycheck-objc-clang-framework-path)
|
||||
"-x" (eval
|
||||
(cl-case major-mode
|
||||
(objc-mode "objective-c")
|
||||
(c-mode "c")))
|
||||
;; We must stay in the same directory, to properly resolve #include
|
||||
;; with quotes
|
||||
source-inplace)
|
||||
:error-patterns
|
||||
((info line-start (file-name) ":" line ":" column
|
||||
": note: " (message) line-end)
|
||||
(warning line-start (file-name) ":" line ":" column
|
||||
": warning: " (message) line-end)
|
||||
(error line-start (file-name) ":" line ":" column
|
||||
": " (or "fatal error" "error") ": " (message) line-end))
|
||||
:modes (c-mode objc-mode)
|
||||
:next-checkers ((warnings-only . objc-cppcheck)))
|
||||
|
||||
(provide 'flycheck-objc)
|
||||
;;; objc-flycheck.el ends here
|
45
lib/helm-todo.el
Normal file
45
lib/helm-todo.el
Normal file
|
@ -0,0 +1,45 @@
|
|||
(require 'helm)
|
||||
(require 'helm-ag)
|
||||
|
||||
(defun helm-todo--candidate-transformer (candidate)
|
||||
(when (string-match "\\`\\([^:]+\\):\\([^:]+\\):\\(.+\\)" candidate)
|
||||
(format "%s %s %s"
|
||||
(propertize (match-string 1 candidate) 'face 'helm-moccur-buffer)
|
||||
(propertize "TODO" 'face 'helm-grep-lineno)
|
||||
(helm-ag--highlight-candidate
|
||||
(replace-regexp-in-string "^\\( *\\(/\\**\\|/+\\|[;#]+\\) *\\)+TODO ?" ""
|
||||
(match-string 3 candidate))))))
|
||||
|
||||
(defvar helm-todo-source
|
||||
'((name . "TODOs")
|
||||
(init . helm-ag-init)
|
||||
(candidates-in-buffer)
|
||||
(persistent-action . helm-ag-persistent-action)
|
||||
(real-to-display . helm-todo--candidate-transformer)
|
||||
(action . (("Open file" . helm-ag--action-find-file)
|
||||
("Open file other window" . helm-ag--action--find-file-other-window)))))
|
||||
|
||||
;;;###autoload (autoload 'my:helm-todo "helm-todo")
|
||||
(evil-define-operator my:helm-todo (beg end &optional bang input)
|
||||
:motion nil
|
||||
:move-point nil
|
||||
:type inclusive
|
||||
:repeat nil
|
||||
(interactive "<r><!><a>")
|
||||
(let* ((helm-ag-default-directory (my--project-root bang))
|
||||
(input (or input ""))
|
||||
(helm-ag--last-input ""))
|
||||
(helm-attrset 'search-this-file nil helm-ag-source)
|
||||
(setq helm-ag--last-query
|
||||
"ag --nogroup --nocolor --ignore '*.md' -- '(/\\*\\*?|//|[;#]) *TODO'")
|
||||
(helm-attrset 'name
|
||||
(format "TODOs in %s" helm-ag-default-directory)
|
||||
helm-ag-source)
|
||||
(helm :sources 'helm-todo-source
|
||||
:buffer "*helm-ag*"
|
||||
:input input
|
||||
:prompt helm-global-prompt)))
|
||||
|
||||
|
||||
(provide 'helm-todo)
|
||||
;;; helm-todo.el ends here
|
89
modules/init-auto-complete.el
Normal file
89
modules/init-auto-complete.el
Normal file
|
@ -0,0 +1,89 @@
|
|||
(provide 'init-auto-complete)
|
||||
|
||||
(defconst my-dicts-dir (concat my-dir "dict/"))
|
||||
|
||||
(setq tags-case-fold-search nil)
|
||||
|
||||
(use-package pos-tip)
|
||||
|
||||
(use-package auto-complete
|
||||
:init
|
||||
(progn
|
||||
(require 'auto-complete-config)
|
||||
|
||||
(setq ac-auto-start nil
|
||||
ac-auto-show-menu t ; Suggestions box must be invoked manually (see core-keymaps.el)
|
||||
ac-use-menu-map t ; Enable ac-menu-map map when menu is open
|
||||
ac-use-quick-help nil ; Don't show tooltips unless invoked (see core-keymaps.el)
|
||||
ac-use-fuzzy nil
|
||||
ac-use-comphist t
|
||||
ac-candidate-limit 25)
|
||||
(setq ac-comphist-file (concat my-tmp-dir "ac-comphist.dat"))
|
||||
|
||||
(setq-default ac-sources '(ac-source-yasnippet)))
|
||||
:config
|
||||
(progn
|
||||
;; Redefine this function so auto-complete is available [almost] everywhere
|
||||
(defun auto-complete-mode-maybe ()
|
||||
(unless (minibufferp (current-buffer))
|
||||
(auto-complete-mode 1)))
|
||||
|
||||
(defun auto-complete--backend (hook &rest backends)
|
||||
(add-hook hook
|
||||
`(lambda()
|
||||
(set (make-local-variable 'ac-sources) (append '(,@backends) ac-sources)))))
|
||||
|
||||
(global-auto-complete-mode t)
|
||||
|
||||
(let ((bg (face-attribute 'default :background)))
|
||||
(require 'color)
|
||||
(custom-set-faces
|
||||
;; `(company-scrollbar-bg ((t (:background ,(color-lighten-name bg 15)))))
|
||||
;; `(company-scrollbar-fg ((t (:background ,(color-lighten-name bg 5)))))
|
||||
`(ac-yasnippet-candidate-face ((t (:inherit ac-candidate-face :background ,(color-lighten-name bg 5)))))
|
||||
`(ac-yasnippet-selection-face ((t (:inherit ac-selection-face :background ,(color-lighten-name bg 10)))))
|
||||
`(ac-completion-face ((t (:background ,(color-lighten-name bg 15)))))
|
||||
`(ac-candidate-face ((t (:inherit font-lock-function-name-face :background ,(color-lighten-name bg 4)))))
|
||||
`(ac-selection-face ((t (:background ,(color-lighten-name bg 9)))))))
|
||||
|
||||
(add-to-list 'ac-dictionary-directories my-dicts-dir)
|
||||
|
||||
(auto-complete--backend 'emacs-lisp-mode-hook 'ac-source-features 'ac-source-functions 'ac-source-variables 'ac-source-symbols)
|
||||
(auto-complete--backend 'scss-mode-hook 'ac-source-css-property)
|
||||
|
||||
(push '("*Popup Help*" :position bottom :height 0.35 :noselect t) popwin:special-display-config)
|
||||
|
||||
;; Tell ido not to care about case
|
||||
;; (setq completion-ignore-case t)
|
||||
|
||||
(bind 'insert ac-mode-map
|
||||
(kbd "C-x C-k") 'ac-complete-dictionary
|
||||
(kbd "C-x C-f") (λ (let ((ac-sources '(ac-source-filename ac-source-files-in-current-dir)))
|
||||
(auto-complete)))
|
||||
(kbd "C-x C-]") 'ac-complete-etags
|
||||
(kbd "C-x s") 'ac-complete-ispell
|
||||
(kbd "C-x C-s") 'ac-complete-yasnippet
|
||||
(kbd "C-x C-n") 'ac-complete-words-in-all-buffer
|
||||
(kbd "C-x C-p") 'ac-complete-words-in-same-mode-buffers
|
||||
(kbd "C-x C-o") 'auto-complete
|
||||
(kbd "C-SPC") 'auto-complete)
|
||||
|
||||
(bind ac-completing-map
|
||||
(kbd "<tab>") 'ac-complete
|
||||
(kbd "C-n") 'ac-next
|
||||
(kbd "C-p") 'ac-previous
|
||||
(kbd "C-h") 'ac-quick-help
|
||||
(kbd "C-S-h") 'ac-help
|
||||
(kbd "<ESC>") 'ac-stop
|
||||
(kbd "<RET>") 'ac-complete)
|
||||
|
||||
(use-package ac-etags
|
||||
:commands (ac-complete-etags)
|
||||
:config (ac-etags-setup))
|
||||
|
||||
(use-package ac-ispell
|
||||
:commands (ac-complete-ispell ac-complete-ispell-fuzzy)
|
||||
:config
|
||||
(progn (ac-ispell-setup)
|
||||
(setq ac-ispell-requires 1
|
||||
ac-ispell-fuzzy-limit 25)))))
|
|
@ -1,5 +1,3 @@
|
|||
(provide 'init-auto-insert)
|
||||
|
||||
(use-package autoinsert
|
||||
:init (auto-insert-mode 1)
|
||||
:config
|
||||
|
@ -81,5 +79,9 @@
|
|||
;; ;; (template "\\.gradle$" "%%" 'groovy-mode)
|
||||
|
||||
;; ;; ;; Elisp
|
||||
(template "\\.emacs\\.d/init/.+\\.el$" "%initfile%" 'emacs-lisp-mode)
|
||||
(template "\\.emacs\\.d/.+\\.el$" "%initfile%" 'emacs-lisp-mode)
|
||||
(template "\\.emacs\\.d/snippets/.+$" "%%" 'snippet-mode))
|
||||
|
||||
|
||||
(provide 'init-auto-insert)
|
||||
;;; init-auto-insert.el ends here
|
174
modules/init-cc.el
Normal file
174
modules/init-cc.el
Normal file
|
@ -0,0 +1,174 @@
|
|||
(use-package cmake-mode
|
||||
:disabled t
|
||||
:mode "CMakeLists\\.txt$"
|
||||
:config
|
||||
(progn
|
||||
(after "auto-complete" (add-to-list 'ac-modes 'cmake-mode))
|
||||
(after "company"
|
||||
(use-package company-cmake
|
||||
:config (company--backend-on 'cmake-mode-hook 'company-cmake)))))
|
||||
|
||||
;; Shaders
|
||||
(use-package glsl-mode
|
||||
:mode (("\\.glsl\\'" . glsl-mode)
|
||||
("\\.vert\\'" . glsl-mode)
|
||||
("\\.frag\\'" . glsl-mode)
|
||||
("\\.geom\\'" . glsl-mode)))
|
||||
|
||||
(use-package cc-mode
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(associate-minor-mode "\\.h$" 'c++-mode)
|
||||
(associate-minor-mode "\\.mm$" 'objc-mode))
|
||||
|
||||
;; (add-hook 'c-mode-hook 'irony-mode)
|
||||
;; (add-hook 'c++-mode-hook 'irony-mode)
|
||||
;; (add-hook 'objc-mode-hook 'irony-mode)
|
||||
|
||||
;; (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
|
||||
:config
|
||||
(progn
|
||||
(setq-default c-basic-offset 4
|
||||
c-default-style "linux"
|
||||
c-tab-always-indent nil)
|
||||
|
||||
(when is-mac
|
||||
(setq my--clang-includes
|
||||
'("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1"
|
||||
"/usr/local/include"
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include"
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include"
|
||||
"/usr/include"
|
||||
"/System/Library/Frameworks"
|
||||
"/Library/Frameworks"))
|
||||
|
||||
(defun my--clang-includes () my--clang-includes)
|
||||
(defun my--clang-includes-flags ()
|
||||
(mapcar (lambda (item) (concat "-I" item)) my--clang-includes)))
|
||||
|
||||
(progn ; C++
|
||||
(defun my--setup-c++-mode-flycheck ()
|
||||
(setq flycheck-clang-language-standard "c++11"
|
||||
flycheck-clang-standard-library "libc++"
|
||||
flycheck-c/c++-clang-executable "clang++"
|
||||
;; flycheck-clang-include-path (my--clang-includes)
|
||||
))
|
||||
(after "flycheck"
|
||||
(add-hook 'c++-mode-hook 'my--setup-c++-mode-flycheck)))
|
||||
|
||||
(progn ; Obj-C
|
||||
(add-to-list 'magic-mode-alist
|
||||
`(,(lambda ()
|
||||
(and (string= (file-name-extension buffer-file-name) "h")
|
||||
(re-search-forward "@\\<interface\\>"
|
||||
magic-mode-regexp-match-limit t)))
|
||||
. objc-mode))
|
||||
(after "flycheck" (add-hook! 'objc-mode-hook (use-package flycheck-objc))))
|
||||
|
||||
(after "auto-complete"
|
||||
(when is-mac (setq ac-clang-flags (my--clang-includes-flags)))
|
||||
(add-hook! 'c-mode-common-hook
|
||||
(use-package auto-complete-clang)
|
||||
(use-package auto-complete-c-headers)
|
||||
(setq ac-sources
|
||||
'(ac-source-clang
|
||||
ac-source-c-headers
|
||||
ac-source-yasnippet
|
||||
ac-source-words-in-same-mode-buffers))))
|
||||
|
||||
(after "company"
|
||||
(use-package company-irony
|
||||
:config
|
||||
(progn
|
||||
(use-package company-c-headers
|
||||
:config (setq company-c-headers-path-system (my--clang-includes)))
|
||||
(company--backend-on 'c-mode-hook 'company-clang 'company-c-headers)
|
||||
(company--backend-on 'c++-mode-hook 'company-clang 'company-c-headers)
|
||||
(company--backend-on 'objc-mode-hook 'company-xcode 'company-c-headers))))
|
||||
|
||||
(add-hook! 'c-mode-common-hook
|
||||
(c-toggle-electric-state -1)
|
||||
(c-toggle-auto-newline -1)
|
||||
(c-set-offset 'substatement-open '0) ; brackets should be at same indentation level as the statements they open
|
||||
(c-set-offset 'inline-open '+)
|
||||
(c-set-offset 'block-open '+)
|
||||
(c-set-offset 'brace-list-open '+) ; all "opens" should be indented by the c-indent-level
|
||||
(c-set-offset 'case-label '+) ; indent case labels by c-indent-level, too
|
||||
|
||||
;; DEL mapping interferes with smartparens and my.deflate-maybe
|
||||
(bind c-mode-map (kbd "DEL") nil))
|
||||
|
||||
;; C++11 syntax support (until cc-mode is updated)
|
||||
(require 'font-lock)
|
||||
(defun --copy-face (new-face face)
|
||||
"Define NEW-FACE from existing FACE."
|
||||
(copy-face face new-face)
|
||||
(eval `(defvar ,new-face nil))
|
||||
(set new-face new-face))
|
||||
|
||||
(--copy-face 'font-lock-label-face ; labels, case, public, private, proteced, namespace-tags
|
||||
'font-lock-keyword-face)
|
||||
(--copy-face 'font-lock-doc-markup-face ; comment markups such as Javadoc-tags
|
||||
'font-lock-doc-face)
|
||||
(--copy-face 'font-lock-doc-string-face ; comment markups
|
||||
'font-lock-comment-face)
|
||||
(global-font-lock-mode t)
|
||||
(setq font-lock-maximum-decoration t)
|
||||
|
||||
(add-hook 'c++-mode-hook
|
||||
'(lambda()
|
||||
;; We could place some regexes into `c-mode-common-hook', but
|
||||
;; note that their evaluation order matters.
|
||||
(font-lock-add-keywords
|
||||
nil '(;; complete some fundamental keywords
|
||||
("\\<\\(void\\|unsigned\\|signed\\|char\\|short\\|bool\\|int\\|long\\|float\\|double\\)\\>" . font-lock-keyword-face)
|
||||
;; namespace names and tags - these are rendered as constants by cc-mode
|
||||
("\\<\\(\\w+::\\)" . font-lock-function-name-face)
|
||||
;; new C++11 keywords
|
||||
("\\<\\(alignof\\|alignas\\|constexpr\\|decltype\\|noexcept\\|nullptr\\|static_assert\\|thread_local\\|override\\|final\\)\\>" . font-lock-keyword-face)
|
||||
("\\<\\(char16_t\\|char32_t\\)\\>" . font-lock-keyword-face)
|
||||
;; PREPROCESSOR_CONSTANT, PREPROCESSORCONSTANT
|
||||
("\\<[A-Z]*_[A-Z_]+\\>" . font-lock-constant-face)
|
||||
("\\<[A-Z]\\{3,\\}\\>" . font-lock-constant-face)
|
||||
;; hexadecimal numbers
|
||||
("\\<0[xX][0-9A-Fa-f]+\\>" . font-lock-constant-face)
|
||||
;; integer/float/scientific numbers
|
||||
("\\<[\\-+]*[0-9]*\\.?[0-9]+\\([ulUL]+\\|[eE][\\-+]?[0-9]+\\)?\\>" . font-lock-constant-face)
|
||||
;; c++11 string literals
|
||||
;; L"wide string"
|
||||
;; L"wide string with UNICODE codepoint: \u2018"
|
||||
;; u8"UTF-8 string", u"UTF-16 string", U"UTF-32 string"
|
||||
("\\<\\([LuU8]+\\)\".*?\"" 1 font-lock-keyword-face)
|
||||
;; R"(user-defined literal)"
|
||||
;; R"( a "quot'd" string )"
|
||||
;; R"delimiter(The String Data" )delimiter"
|
||||
;; R"delimiter((a-z))delimiter" is equivalent to "(a-z)"
|
||||
("\\(\\<[uU8]*R\"[^\\s-\\\\()]\\{0,16\\}(\\)" 1 font-lock-keyword-face t) ; start delimiter
|
||||
( "\\<[uU8]*R\"[^\\s-\\\\()]\\{0,16\\}(\\(.*?\\))[^\\s-\\\\()]\\{0,16\\}\"" 1 font-lock-string-face t) ; actual string
|
||||
( "\\<[uU8]*R\"[^\\s-\\\\()]\\{0,16\\}(.*?\\()[^\\s-\\\\()]\\{0,16\\}\"\\)" 1 font-lock-keyword-face t) ; end delimiter
|
||||
|
||||
;; user-defined types (rather project-specific)
|
||||
("\\<[A-Za-z_]+[A-Za-z_0-9]*_\\(type\\|ptr\\)\\>" . font-lock-type-face)
|
||||
("\\<\\(xstring\\|xchar\\)\\>" . font-lock-type-face)
|
||||
))
|
||||
) t)
|
||||
|
||||
;; Fix enum and C++11 lambda indentation
|
||||
(defadvice c-lineup-arglist (around my activate)
|
||||
"Improve indentation of continued C++11 lambda function opened as argument."
|
||||
(setq ad-return-value
|
||||
(if (and (equal major-mode 'c++-mode)
|
||||
(ignore-errors
|
||||
(save-excursion
|
||||
(goto-char (c-langelem-pos langelem))
|
||||
;; Detect "[...](" or "[...]{". preceded by "," or "(",
|
||||
;; and with unclosed brace.
|
||||
(looking-at ".*[(,][ \t]*\\[[^]]*\\][ \t]*[({][^}]*$"))))
|
||||
0 ; no additional indent
|
||||
ad-do-it))) ; default behavior
|
||||
))
|
||||
|
||||
|
||||
(provide 'init-cc)
|
||||
;;; init-cc.el ends here
|
|
@ -38,14 +38,13 @@
|
|||
company-preview-if-just-one-frontend)))
|
||||
|
||||
(progn ; backends
|
||||
(setq-default company-backends '(company-capf (company-yasnippet company-keywords)))
|
||||
(make-variable-buffer-local 'company-backends)
|
||||
(setq-default company-backends '((company-capf company-yasnippet) (company-dictionary company-keywords)))
|
||||
|
||||
(defun company--backend-on (hook &rest backends)
|
||||
(add-hook hook
|
||||
`(lambda()
|
||||
(setq company-backends
|
||||
(append '((,@backends company-yasnippet)) company-backends)))))
|
||||
(set (make-local-variable 'company-backends)
|
||||
(append '((,@backends company-yasnippet)) company-backends)))))
|
||||
|
||||
(company--backend-on 'nxml-mode-hook 'company-nxml)
|
||||
(company--backend-on 'emacs-lisp-mode-hook 'company-elisp)
|
||||
|
@ -56,20 +55,44 @@
|
|||
|
||||
(setq evil-complete-next-func
|
||||
(lambda(arg)
|
||||
(if company-candidates
|
||||
(call-interactively 'company-select-next)
|
||||
(call-interactively 'company-dabbrev))))
|
||||
(call-interactively 'company-dabbrev)
|
||||
(if (eq company-candidates-length 1)
|
||||
(company-complete))))
|
||||
|
||||
(setq evil-complete-previous-func
|
||||
(lambda (arg)
|
||||
(let ((company-selection-wrap-around t))
|
||||
(call-interactively 'company-dabbrev)
|
||||
(call-interactively 'company-select-previous))))
|
||||
(if (eq company-candidates-length 1)
|
||||
(company-complete)
|
||||
(call-interactively 'company-select-previous)))))
|
||||
|
||||
;; Simulates ac-source-dictionary (without global dictionary)
|
||||
(defconst my-dicts-dir (concat my-dir "dict/"))
|
||||
(defvar company-dictionary-alist '())
|
||||
|
||||
(defun company-dictionary (command &optional arg &rest ignored)
|
||||
"`company-mode' back-end for programming language keywords."
|
||||
(interactive (list 'interactive))
|
||||
(unless company-dictionary-alist
|
||||
(dolist (file (f-files my-dicts-dir))
|
||||
(add-to-list 'company-dictionary-alist `(,(intern (f-base file)) ,@(s-split "\n" (f-read file) t)))))
|
||||
(cl-case command
|
||||
(interactive (company-begin-backend 'company-dictionary))
|
||||
(prefix (and (assq major-mode company-dictionary-alist)
|
||||
(or (company-grab-symbol) 'stop)))
|
||||
(candidates
|
||||
(let ((completion-ignore-case nil)
|
||||
(symbols (cdr (assq major-mode company-dictionary-alist))))
|
||||
(all-completions arg (if (consp symbols)
|
||||
symbols
|
||||
(cdr (assq symbols company-dictionary-alist))))))
|
||||
(sorted t)))
|
||||
|
||||
(progn ; keybinds
|
||||
(bind 'insert company-mode-map
|
||||
"C-SPC" 'company-complete-common
|
||||
"C-x C-k" 'company-keywords
|
||||
"C-x C-k" 'company-dictionary
|
||||
"C-x C-f" 'company-files
|
||||
"C-x C-]" 'company-etags
|
||||
"C-x s" 'company-ispell
|
42
modules/init-dev.el
Normal file
42
modules/init-dev.el
Normal file
|
@ -0,0 +1,42 @@
|
|||
(use-package dash-at-point
|
||||
:if is-mac
|
||||
:commands (dash-at-point dash-at-point-with-docset))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:commands rainbow-delimiters-mode
|
||||
:config
|
||||
(progn
|
||||
(setq rainbow-delimiters-outermost-only-face-count 1)
|
||||
(set-face-attribute 'rainbow-delimiters-depth-1-face nil
|
||||
:foreground 'unspecified
|
||||
:inherit 'my-outermost-paren-face))
|
||||
:init
|
||||
(progn
|
||||
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)
|
||||
(add-hook 'js2-mode-hook 'rainbow-delimiters-mode)
|
||||
(add-hook 'scss-mode-hook 'rainbow-delimiters-mode)
|
||||
(add-hook 'ruby-mode-hook 'rainbow-delimiters-mode)))
|
||||
|
||||
;;; Config modes
|
||||
(use-package yaml-mode
|
||||
:defer t
|
||||
:config (add-hook 'yaml-mode-hook 'enable-tab-width-2))
|
||||
|
||||
(use-package emr
|
||||
:commands (emr-initialize emr-show-refactor-menu)
|
||||
:init (add-hook 'prog-mode-hook 'emr-initialize)
|
||||
:config
|
||||
(progn
|
||||
(bind 'normal "gR" 'emr-show-refactor-menu)
|
||||
(bind popup-menu-keymap [escape] 'keyboard-quit)
|
||||
|
||||
(after "evil" (evil-ex-define-cmd "ref[actor]" 'emr-show-refactor-menu))))
|
||||
|
||||
;; todo's
|
||||
(use-package hl-todo :init (add-hook 'find-file-hook 'hl-todo-mode))
|
||||
(use-package helm-todo :commands my:helm-todo-search)
|
||||
(evil-ex-define-cmd "todo" 'my:helm-todo)
|
||||
|
||||
|
||||
(provide 'init-dev)
|
||||
;;; init-dev.el ends here
|
12
modules/init-floobits.el
Normal file
12
modules/init-floobits.el
Normal file
|
@ -0,0 +1,12 @@
|
|||
(use-package floobits
|
||||
:commands (floobits-join-workspace
|
||||
floobits-share-dir-public
|
||||
floobits-share-dir-private
|
||||
floobits-leave-workspace
|
||||
floobits-summon
|
||||
floobits-follow-mode-toggle
|
||||
floobits-clear-highlights))
|
||||
|
||||
|
||||
(provide 'init-floobits)
|
||||
;;; init-floobits.el ends here
|
|
@ -42,8 +42,8 @@
|
|||
(progn
|
||||
(helm-attrset 'search-this-file nil helm-ag-source)
|
||||
(setq helm-ag--last-query
|
||||
(concat "ag " (unless bang "-Q") " --nogroup --nocolor -- '"
|
||||
(s-replace "'" "" search) "'")))
|
||||
(concat "ag " (unless bang "-Q") " --nogroup --nocolor -- "
|
||||
(shell-quote-argument search))))
|
||||
(helm-ag-save-current-context)
|
||||
(if (and beg end)
|
||||
(setq input (buffer-substring-no-properties beg end))))
|
|
@ -36,3 +36,8 @@
|
|||
(use-package groovy-mode
|
||||
:mode "\\.gradle$"
|
||||
:config (after "auto-complete" (add-to-list 'ac-modes 'groovy-mode)))
|
||||
|
||||
(use-package java-mode
|
||||
:config
|
||||
(sp-with-modes '(java-mode)
|
||||
(sp-local-pair "/**" "*/" :post-handlers '(("* ||\n[i]" "RET")))))
|
49
modules/init-js.el
Normal file
49
modules/init-js.el
Normal file
|
@ -0,0 +1,49 @@
|
|||
(use-package js2-mode
|
||||
:mode "\\.js$"
|
||||
:interpreter "node"
|
||||
:config
|
||||
(progn
|
||||
(setq-default js2-show-parse-errors nil)
|
||||
(setq-default js2-global-externs '("module" "require" "buster" "sinon" "assert"
|
||||
"refute" "setTimeout" "clearTimeout"
|
||||
"setInterval" "clearInterval" "location"
|
||||
"__dirname" "console" "JSON" "jQuery" "$"
|
||||
;; Launchbar API
|
||||
"LaunchBar" "File" "Action" "HTTP" "include"))
|
||||
|
||||
(after "emr" (use-package js2-refactor))
|
||||
|
||||
(use-package tern
|
||||
:commands tern-mode
|
||||
;; replace auto-complete with tern-ac-complete only in js-mode
|
||||
:init
|
||||
(progn
|
||||
(add-hook 'js2-mode-hook 'tern-mode)
|
||||
(after "auto-complete" (add-hook 'js2-mode-hook 'tern-ac-setup)))
|
||||
:config
|
||||
(progn
|
||||
(after "auto-complete"
|
||||
(use-package tern-auto-complete
|
||||
:config
|
||||
(progn
|
||||
(setq tern-ac-on-dot nil)
|
||||
(bind 'insert js2-mode-map [remap auto-complete] 'tern-ac-complete)
|
||||
(bind 'motion js2-mode-map "gd" 'tern-find-definition))))
|
||||
|
||||
(after "company"
|
||||
(use-package company-tern
|
||||
:config
|
||||
(company--backend-on 'js2-mode-hook 'company-tern)
|
||||
;; (setq company-tern-meta-as-single-line t)
|
||||
;; (setq company-tern-property-marker "")
|
||||
;; (setq company-tooltip-align-annotations t)
|
||||
))))))
|
||||
|
||||
(use-package json-mode
|
||||
:mode (("\\.json\\'" . json-mode)
|
||||
("\\.jshintrc\\'" . json-mode)))
|
||||
|
||||
|
||||
|
||||
(provide 'init-js)
|
||||
;;; init-js.el ends here
|
|
@ -12,8 +12,10 @@
|
|||
:keymap (make-sparse-keymap))
|
||||
(associate-minor-mode "[\\.-]love/.+\\.lua$" 'love-mode)
|
||||
|
||||
(add-hook 'lua-mode-hook 'enable-tab-width-2)
|
||||
(add-hook! 'lua-mode-hook (setq lua-indent-level tab-width))
|
||||
|
||||
|
||||
(defun my--build-love ()
|
||||
(shell-command (format "open -a love.app %s" (my--project-root))))
|
||||
|
||||
(add-hook! 'lua-mode-hook (setq my-run-code-interpreter "lua"))
|
||||
(add-hook! 'love-mode-hook (setq my-build-func 'my/build-love))))
|
||||
))
|
10
modules/init-php.el
Normal file
10
modules/init-php.el
Normal file
|
@ -0,0 +1,10 @@
|
|||
(use-package php-mode
|
||||
:mode "\\.\\(php\\|inc\\)$"
|
||||
:config
|
||||
(progn
|
||||
(add-hook! 'php-mode-hook (setq my-run-code-interpreter "php"))
|
||||
(setq php-template-compatibility nil)))
|
||||
|
||||
|
||||
(provide 'init-php)
|
||||
;;; init-php.el ends here
|
|
@ -1,25 +1,57 @@
|
|||
(provide 'init-ruby)
|
||||
|
||||
(use-package enh-ruby-mode
|
||||
:mode (("\\.rb$" . enh-ruby-mode)
|
||||
("\\.ru$" . enh-ruby-mode)
|
||||
("\\.rake$" . enh-ruby-mode)
|
||||
("\\.gemspec$" . enh-ruby-mode)
|
||||
("\\.?pryrc$" . enh-ruby-mode)
|
||||
("Gemfile$" . enh-ruby-mode)
|
||||
("Capfile$" . enh-ruby-mode)
|
||||
("Vagrantfile$" . enh-ruby-mode)
|
||||
("Rakefile$" . enh-ruby-mode))
|
||||
(use-package ruby-mode
|
||||
:mode (("\\.rb$" . ruby-mode)
|
||||
("\\.ru$" . ruby-mode)
|
||||
("\\.rake$" . ruby-mode)
|
||||
("\\.gemspec$" . ruby-mode)
|
||||
("\\.?pryrc$" . ruby-mode)
|
||||
("Gemfile$" . ruby-mode)
|
||||
("Capfile$" . ruby-mode)
|
||||
("Vagrantfile$" . ruby-mode)
|
||||
("Rakefile$" . ruby-mode))
|
||||
:interpreter "ruby"
|
||||
:init
|
||||
(progn
|
||||
(associate-minor-mode "\\(/spec_helper\\|_spec\\)\\.rb$" 'rspec-mode)
|
||||
(associate-minor-mode "/\\.rspec$" 'rspec-mode)
|
||||
(associate-minor-mode "/\\.rake$" 'rake-mode)
|
||||
(associate-mode "/\\.rspec$" 'text-mode))
|
||||
:config
|
||||
(progn
|
||||
;;; Formatting
|
||||
(setq ruby-indent-level 2)
|
||||
(setq ruby-deep-indent-paren t)
|
||||
|
||||
(add-hook 'enh-ruby-mode-hook 'enable-tab-width-2)
|
||||
(add-hook 'ruby-mode-hook 'enable-tab-width-2)
|
||||
|
||||
(after "emr" (use-package ruby-refactor))
|
||||
(define-key ruby-mode-map [?\n] nil)
|
||||
|
||||
(after "emr"
|
||||
(use-package ruby-refactor)
|
||||
(emr-declare-command 'ruby-refactor-extract-to-method
|
||||
:title "extract method"
|
||||
:modes 'ruby-mode
|
||||
:predicate (lambda () (use-region-p)))
|
||||
|
||||
(emr-declare-command 'ruby-refactor-extract-local-variable
|
||||
:title "extract local variable"
|
||||
:modes 'ruby-mode
|
||||
:predicate (lambda () (use-region-p)))
|
||||
|
||||
(emr-declare-command 'ruby-refactor-extract-constant
|
||||
:title "extract constant"
|
||||
:modes 'ruby-mode
|
||||
:predicate (lambda () (use-region-p)))
|
||||
|
||||
(emr-declare-command 'ruby-refactor-add-parameter
|
||||
:title "add parameter"
|
||||
:modes 'ruby-mode)
|
||||
|
||||
(emr-declare-command 'ruby-refactor-extract-to-let
|
||||
:title "extract to let"
|
||||
:modes 'ruby-mode
|
||||
:predicate (lambda () (use-region-p))))
|
||||
|
||||
(define-minor-mode rake-mode
|
||||
"Buffer local minor mode for rake files"
|
||||
|
@ -48,12 +80,6 @@
|
|||
(("class" "def" "while" "do" "module" "for" "until") () "end")
|
||||
;; Rake
|
||||
(("task" "namespace") () "end"))))
|
||||
:init
|
||||
(progn
|
||||
(associate-minor-mode "\\(/spec_helper\\|_spec\\)\\.rb$" 'rspec-mode)
|
||||
(associate-minor-mode "/\\.rspec$" 'rspec-mode)
|
||||
(associate-minor-mode "/\\.rake$" 'rake-mode)
|
||||
(associate-mode "/\\.rspec$" 'text-mode))
|
||||
:config
|
||||
(bind 'normal
|
||||
",tr" 'rspec-rerun
|
||||
|
@ -66,17 +92,17 @@
|
|||
(progn
|
||||
(after "company"
|
||||
(use-package company-robe
|
||||
:config (company--backend-on 'enh-ruby-mode-hook 'company-robe)))
|
||||
:config (company--backend-on 'ruby-mode-hook 'company-robe)))
|
||||
|
||||
(add-hook! 'enh-ruby-mode-hook
|
||||
(add-hook! 'ruby-mode-hook
|
||||
(robe-mode 1)
|
||||
(after "auto-complete" (ac-robe-setup))
|
||||
;; (after "auto-complete" (ac-robe-setup))
|
||||
(unless robe-running (robe-start 1))
|
||||
(my--ruby-load-file buffer-file-name))
|
||||
|
||||
(defun my--ruby-load-file (&optional file)
|
||||
(let ((file (or file buffer-file-name)))
|
||||
(when (and (eq major-mode 'enh-ruby-mode)
|
||||
(when (and (eq major-mode 'ruby-mode)
|
||||
(bound-and-true-p robe-running)
|
||||
(file-exists-p buffer-file-name))
|
||||
(ruby-load-file file))))
|
20
modules/init-scss.el
Normal file
20
modules/init-scss.el
Normal file
|
@ -0,0 +1,20 @@
|
|||
(use-package scss-mode
|
||||
:mode "\\.scss$"
|
||||
:config
|
||||
(progn
|
||||
(add-hook 'scss-mode-hook 'enable-tab-width-2)
|
||||
(add-hook 'scss-mode-hook 'ac-css-mode-setup)
|
||||
|
||||
(setq-default css-indent-offset 2)
|
||||
(setq scss-compile-at-save nil)
|
||||
|
||||
(after "company"
|
||||
(company--backend-on 'scss-mode-hook 'company-css))))
|
||||
|
||||
(use-package rainbow-mode
|
||||
:defer t
|
||||
:init (add-hook 'scss-mode-hook 'rainbow-mode))
|
||||
|
||||
|
||||
(provide 'init-scss)
|
||||
;;; init-scss.el ends here
|
10
modules/init-swift.el
Normal file
10
modules/init-swift.el
Normal file
|
@ -0,0 +1,10 @@
|
|||
(provide 'init-swift)
|
||||
|
||||
(use-package swift-mode
|
||||
:mode "\\.swift$"
|
||||
:config
|
||||
(progn
|
||||
(after "flycheck" (add-to-list 'flycheck-cehckers 'swift))
|
||||
(after "company" (company--backend-on 'swift-mode-hook 'company-xcode))))
|
||||
|
||||
;; TODO: Set up emacs task runners for fruitstrap
|
|
@ -13,9 +13,8 @@
|
|||
(evil-define-command ex:tmux-run (&optional command bang)
|
||||
"Sends input to tmux. Use `bang' to append to tmux"
|
||||
(interactive "<tmux><!>")
|
||||
(my--tmux-send (concat (unless bang "C-u ")
|
||||
(shell-quote-argument command)
|
||||
(unless bang " Enter")))
|
||||
(my--tmux-send (format (if bang "C-u %s Enter" "%s")
|
||||
(shell-quote-argument command)))
|
||||
(when (evil-ex-p)
|
||||
(message "[Tmux] %s" command)))
|
||||
|
64
modules/init-web.el
Normal file
64
modules/init-web.el
Normal file
|
@ -0,0 +1,64 @@
|
|||
(use-package web-mode
|
||||
:mode (("\\.\\(p\\)?htm\\(l\\)?$" . web-mode)
|
||||
("\\.tpl\\(\\.php\\)?$" . web-mode)
|
||||
("\\.erb$" . web-mode)
|
||||
("wp-content/themes/.+/.+\\.php$" . web-mode))
|
||||
:config
|
||||
(progn
|
||||
(add-hook 'web-mode-hook 'enable-tab-width-2)
|
||||
|
||||
(setq web-mode-ac-sources-alist '(("css" . (ac-source-css-property)))
|
||||
web-mode-markup-indent-offset 2
|
||||
web-mode-code-indent-offset 2
|
||||
web-mode-css-indent-offset 2
|
||||
web-mode-style-padding 2
|
||||
web-mode-script-padding 2
|
||||
web-mode-block-padding 2)
|
||||
|
||||
(bind web-mode-map (kbd "s-/") 'web-mode-comment-or-uncomment)
|
||||
(bind 'normal web-mode-map
|
||||
"zf" 'web-mode-fold-or-unfold
|
||||
",t" 'web-mode-element-rename)
|
||||
(bind '(normal visual) web-mode-map
|
||||
"]a" 'web-mode-attribute-next
|
||||
"]t" 'web-mode-tag-next
|
||||
"[t" 'web-mode-tag-previous
|
||||
"]T" 'web-mode-element-child
|
||||
"[T" 'web-mode-element-parent)))
|
||||
|
||||
(use-package emmet-mode
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(add-hook 'scss-mode-hook 'emmet-mode)
|
||||
(add-hook 'web-mode-hook 'emmet-mode)
|
||||
(add-hook 'html-mode-hook 'emmet-mode)
|
||||
(add-hook 'haml-mode-hook 'emmet-mode)
|
||||
(add-hook 'nxml-mode-hook 'emmet-mode))
|
||||
:config
|
||||
(progn
|
||||
(setq emmet-move-cursor-between-quotes t)
|
||||
|
||||
(bind 'insert emmet-mode-keymap
|
||||
(kbd "s-e") 'emmet-expand-yas
|
||||
(kbd "s-E") 'emmet-expand-line)))
|
||||
|
||||
(use-package web-beautify
|
||||
:commands (web-beautify-js web-beautify-css web-beautify-html)
|
||||
:config
|
||||
(progn
|
||||
(after "scss-mode"
|
||||
(add-hook! 'scss-mode-hook (setenv "jsbeautify_indent_size" "2"))
|
||||
(bind 'motion scss-mode-map "gQ" 'web-beautify-css))
|
||||
|
||||
(after "web-mode"
|
||||
(add-hook! 'web-mode-hook (setenv "jsbeautify_indent_size" "4"))
|
||||
(bind 'motion web-mode-map "gQ" 'web-beautify-html))
|
||||
|
||||
(after "js2-mode"
|
||||
(add-hook! 'js2-mode-hook (setenv "jsbeautify_indent_size" "4"))
|
||||
(bind 'motion js2-mode-map "gQ" 'web-beautify-js))))
|
||||
|
||||
|
||||
(provide 'init-web)
|
||||
;;; init-web.el ends here
|
|
@ -1,7 +1,7 @@
|
|||
(provide 'init-yasnippet)
|
||||
|
||||
(use-package yasnippet
|
||||
:mode (("emacs\\.d/.+/snippets/" . snippet-mode))
|
||||
:mode (("emacs\\.d/snippets/.+$" . snippet-mode))
|
||||
:pre-load
|
||||
(defvar yas-minor-mode-map
|
||||
;; Fix yasnippet keymaps so they only work in insert mode
|
||||
|
@ -81,6 +81,12 @@
|
|||
|
||||
;; Snippet helpers
|
||||
(defvaralias '% 'yas-selected-text)
|
||||
;; Shorthand defun to surround text with newlines if more than one line.
|
||||
(defun !%! ()
|
||||
(when %
|
||||
(if (> (s-count-lines %) 1)
|
||||
(concat "\n" % "\n")
|
||||
(s-trim %))))
|
||||
;; Shorthand defun for snippets: prepends a newline to `yas-selected-text'
|
||||
;; IF it contains more than one line.
|
||||
(defun !% ()
|
||||
|
@ -116,7 +122,8 @@
|
|||
(cond ((and field
|
||||
(not (yas--field-modified-p field))
|
||||
(eq (point) (marker-position (yas--field-start field))))
|
||||
(yas--skip-and-clear field))
|
||||
(yas--skip-and-clear field)
|
||||
(yas-next-field 1))
|
||||
(t (delete-char -1)))))
|
||||
|
||||
;; keybinds
|
||||
|
@ -125,4 +132,4 @@
|
|||
"C-a" 'my/yas-goto-start-of-field
|
||||
"<s-right>" 'my/yas-goto-end-of-field
|
||||
"<s-left>" 'my/yas-goto-start-of-field
|
||||
"DEL" 'my/yas-clear-field)))
|
||||
[backspace] 'my/yas-clear-field)))
|
|
@ -154,6 +154,8 @@
|
|||
;; Easy escape from insert mode (more responsive than using key-chord-define)
|
||||
(bind 'insert "j" #'my--maybe-exit-insert-mode)
|
||||
|
||||
(bind 'insert "C-g" 'evil-normal-state)
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Plugin/mode keymaps ;;
|
Loading…
Add table
Add a link
Reference in a new issue