2016-08-18 20:01:20 +00:00
|
|
|
|
(package-initialize)
|
|
|
|
|
|
2016-09-15 14:08:54 +00:00
|
|
|
|
(add-to-list 'load-path (concat
|
|
|
|
|
user-emacs-directory
|
|
|
|
|
(convert-standard-filename "lisp/")))
|
2016-09-15 14:21:17 +00:00
|
|
|
|
(require 'xdg-paths)
|
2016-09-15 14:08:54 +00:00
|
|
|
|
|
2014-10-05 12:57:41 +00:00
|
|
|
|
(custom-set-variables
|
|
|
|
|
;; custom-set-variables was added by Custom.
|
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
|
;; If there is more than one, they won't work right.
|
|
|
|
|
'(background-color "#7f7f7f")
|
|
|
|
|
'(background-mode dark)
|
|
|
|
|
'(blink-cursor-mode t)
|
|
|
|
|
'(column-number-mode t)
|
|
|
|
|
'(cursor-color "#5c5cff")
|
2015-05-04 09:45:55 +00:00
|
|
|
|
'(cursor-type (quote bar))
|
2014-10-05 12:57:41 +00:00
|
|
|
|
'(custom-enabled-themes (quote (tango-dark)))
|
2015-05-04 09:45:55 +00:00
|
|
|
|
'(custom-safe-themes
|
|
|
|
|
(quote
|
2016-09-22 16:41:19 +00:00
|
|
|
|
("c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
|
2014-10-05 12:57:41 +00:00
|
|
|
|
'(ediff-merge-split-window-function (quote split-window-horizontally))
|
|
|
|
|
'(ediff-split-window-function (quote split-window-vertically))
|
2015-08-24 06:21:44 +00:00
|
|
|
|
'(fiplr-ignored-globs
|
|
|
|
|
(quote
|
|
|
|
|
((directories
|
|
|
|
|
(".git" ".svn" ".hg" ".bzr"))
|
|
|
|
|
(files
|
|
|
|
|
(".#*" "*.so" "*~")))))
|
2014-10-05 12:57:41 +00:00
|
|
|
|
'(foreground-color "#5c5cff")
|
2014-10-05 20:56:23 +00:00
|
|
|
|
'(global-hl-line-mode t)
|
2014-10-06 08:26:22 +00:00
|
|
|
|
'(global-whitespace-mode t)
|
2014-10-05 12:57:41 +00:00
|
|
|
|
'(helm-gtags-auto-update t)
|
|
|
|
|
'(helm-gtags-ignore-case t)
|
|
|
|
|
'(helm-gtags-path-style (quote relative))
|
|
|
|
|
'(inhibit-startup-screen t)
|
2016-04-21 22:34:54 +00:00
|
|
|
|
'(jekyll-directory "~/Projektek/jekyll/gergely.polonkai.eu")
|
2014-10-05 12:57:41 +00:00
|
|
|
|
'(nxml-attribute-indent 4)
|
|
|
|
|
'(nxml-child-indent 2)
|
|
|
|
|
'(nxml-outline-child-indent 4)
|
2014-10-05 20:56:23 +00:00
|
|
|
|
'(nyan-wavy-trail t)
|
2016-09-15 14:06:52 +00:00
|
|
|
|
'(org-crypt-key "B0740C4C")
|
2016-09-16 14:36:22 +00:00
|
|
|
|
'(org-default-notes-file
|
|
|
|
|
(concat user-documents-directory
|
|
|
|
|
(convert-standard-filename "/orgmode/notes.org")))
|
|
|
|
|
'(org-directory
|
|
|
|
|
(concat user-documents-directory
|
|
|
|
|
(convert-standard-filename "/orgmode/")))
|
2016-09-15 14:06:52 +00:00
|
|
|
|
'(org-ellipsis "…#")
|
2016-09-16 14:36:22 +00:00
|
|
|
|
'(org-mobile-directory
|
|
|
|
|
(concat user-documents-directory
|
|
|
|
|
(convert-standard-filename "/orgmode/")))
|
|
|
|
|
'(org-mobile-inbox-for-pull
|
|
|
|
|
(concat user-documents-directory
|
|
|
|
|
(convert-standard-filename "/orgmode/from-mobile.org")))
|
2016-09-15 14:06:52 +00:00
|
|
|
|
'(org-startup-folded (quote content))
|
2015-05-04 09:45:55 +00:00
|
|
|
|
'(package-archives
|
|
|
|
|
(quote
|
|
|
|
|
(("gnu" . "http://elpa.gnu.org/packages/")
|
2016-02-24 17:52:06 +00:00
|
|
|
|
("melpa" . "https://melpa.org/packages/")
|
2015-05-04 09:45:55 +00:00
|
|
|
|
("e6h" . "http://www.e6h.org/packages/"))))
|
2016-08-18 20:01:20 +00:00
|
|
|
|
'(package-selected-packages
|
|
|
|
|
(quote
|
2016-09-20 12:16:43 +00:00
|
|
|
|
(yaml-mode xlicense wakatime-mode vala-mode sass-mode nyan-mode muse markdown-mode mark magit-gh-pulls magit-gerrit json-mode js2-mode jinja2-mode helm-make helm-gtags helm-flyspell helm-ag go-mode gitignore-mode gitconfig-mode git-gutter ggtags fiplr erlang django-mode company-shell company-quickhelp company-c-headers coffee-mode buffer-move ag)))
|
2015-05-04 09:45:55 +00:00
|
|
|
|
'(safe-local-variable-values
|
|
|
|
|
(quote
|
|
|
|
|
((company-clang-arguments "-I.." "-I/home/polesz/jhbuild/install/include/atk-1.0" "-I/home/polesz/jhbuild/install/include/at-spi-2.0" "-I/home/polesz/jhbuild/install/include/at-spi2-atk/2.0" "-I/home/polesz/jhbuild/install/include/cairo" "-I/home/polesz/jhbuild/install/include/gdk-pixbuf-2.0" "-I/home/polesz/jhbuild/install/include/gio-unix-2.0/" "-I/home/polesz/jhbuild/install/include/glib-2.0" "-I/home/polesz/jhbuild/install/include/gtk-3.0" "-I/home/polesz/jhbuild/install/include/harfbuzz" "-I/home/polesz/jhbuild/install/include/libgda-5.0" "-I/home/polesz/jhbuild/install/include/libgda-5.0/libgda" "-I/home/polesz/jhbuild/install/include/librsvg-2.0" "-I/home/polesz/jhbuild/install/include/libsoup-2.4" "-I/home/polesz/jhbuild/install/include/pango-1.0" "-I/home/polesz/jhbuild/install/include/swe-glib" "-I/home/polesz/jhbuild/install/include/webkitgtk-4.0" "-I/home/polesz/jhbuild/install/lib/glib-2.0/include" "-I/usr/include/dbus-1.0" "-I/usr/include/freetype2" "-I/usr/include/libdrm" "-I/usr/include/libpng16" "-I/usr/include/libxml2" "-I/usr/include/pixman-1" "-I/usr/lib64/dbus-1.0/include")
|
|
|
|
|
(company-clang-arguments "-I.." "-I/home/polesz/jhbuild/install/include" "-I/home/polesz/jhbuild/install/include/atk-1.0" "-I/home/polesz/jhbuild/install/include/at-spi-2.0" "-I/home/polesz/jhbuild/install/include/at-spi2-atk/2.0" "-I/home/polesz/jhbuild/install/include/cairo" "-I/home/polesz/jhbuild/install/include/gdk-pixbuf-2.0" "-I/home/polesz/jhbuild/install/include/gio-unix-2.0/" "-I/home/polesz/jhbuild/install/include/glib-2.0" "-I/home/polesz/jhbuild/install/include/gtk-3.0" "-I/home/polesz/jhbuild/install/include/harfbuzz" "-I/home/polesz/jhbuild/install/include/libgda-5.0" "-I/home/polesz/jhbuild/install/include/libgda-5.0/libgda" "-I/home/polesz/jhbuild/install/include/librsvg-2.0" "-I/home/polesz/jhbuild/install/include/libsoup-2.4" "-I/home/polesz/jhbuild/install/include/pango-1.0" "-I/home/polesz/jhbuild/install/include/swe-glib" "-I/home/polesz/jhbuild/install/include/webkitgtk-4.0" "-I/home/polesz/jhbuild/install/lib/glib-2.0/include" "-I/usr/include/dbus-1.0" "-I/usr/include/freetype2" "-I/usr/include/libdrm" "-I/usr/include/libpng16" "-I/usr/include/libxml2" "-I/usr/include/pixman-1" "-I/usr/lib64/dbus-1.0/include")
|
|
|
|
|
(company-clang-arguments "-I/home/polesz/jhbuild/install/include" "-I/home/polesz/jhbuild/install/include/atk-1.0" "-I/home/polesz/jhbuild/install/include/at-spi-2.0" "-I/home/polesz/jhbuild/install/include/at-spi2-atk/2.0" "-I/home/polesz/jhbuild/install/include/cairo" "-I/home/polesz/jhbuild/install/include/gdk-pixbuf-2.0" "-I/home/polesz/jhbuild/install/include/gio-unix-2.0/" "-I/home/polesz/jhbuild/install/include/glib-2.0" "-I/home/polesz/jhbuild/install/include/gtk-3.0" "-I/home/polesz/jhbuild/install/include/harfbuzz" "-I/home/polesz/jhbuild/install/include/libgda-5.0" "-I/home/polesz/jhbuild/install/include/libgda-5.0/libgda" "-I/home/polesz/jhbuild/install/include/librsvg-2.0" "-I/home/polesz/jhbuild/install/include/libsoup-2.4" "-I/home/polesz/jhbuild/install/include/pango-1.0" "-I/home/polesz/jhbuild/install/include/swe-glib" "-I/home/polesz/jhbuild/install/include/webkitgtk-4.0" "-I/home/polesz/jhbuild/install/lib/glib-2.0/include" "-I/usr/include/dbus-1.0" "-I/usr/include/freetype2" "-I/usr/include/libdrm" "-I/usr/include/libpng16" "-I/usr/include/libxml2" "-I/usr/include/pixman-1" "-I/usr/lib64/dbus-1.0/include")
|
|
|
|
|
(company-clang-arguments "-I/usr/include/glib-2.0"))))
|
2016-09-16 14:36:22 +00:00
|
|
|
|
'(savehist-mode t)
|
2015-05-04 09:45:55 +00:00
|
|
|
|
'(sgml-basic-offset 4)
|
2014-10-06 08:26:22 +00:00
|
|
|
|
'(show-trailing-whitespace t)
|
2016-09-22 16:41:19 +00:00
|
|
|
|
'(sml/theme (quote respectful))
|
2014-11-10 15:37:48 +00:00
|
|
|
|
'(tab-width 4)
|
2016-09-23 11:50:53 +00:00
|
|
|
|
'(wakatime-api-key "3f97611e-c959-4ce3-a526-bf0241307e17")
|
|
|
|
|
'(wakatime-cli-path "/usr/local/bin/wakatime"))
|
2014-10-05 12:57:41 +00:00
|
|
|
|
|
2016-02-16 08:11:38 +00:00
|
|
|
|
(setq magit-auto-revert-mode nil)
|
|
|
|
|
(setq magit-last-seen-setup-instructions "1.4.0")
|
2016-04-26 11:42:00 +00:00
|
|
|
|
(setq-default magit-gerrit-remote "gerrit")
|
2015-10-08 11:29:02 +00:00
|
|
|
|
(set-face-attribute 'default t :font "Hack-10")
|
|
|
|
|
(set-frame-font "Hack-10" nil t)
|
2016-09-15 11:54:46 +00:00
|
|
|
|
(setq user-mail-address "gergely@polonkai.eu")
|
2016-09-15 15:49:29 +00:00
|
|
|
|
(setq helm-M-x-fuzzy-match t
|
|
|
|
|
helm-buffers-fuzzy-matching t
|
|
|
|
|
helm-recentf-fuzzy-match t)
|
2016-02-16 08:11:38 +00:00
|
|
|
|
|
2014-10-05 14:27:20 +00:00
|
|
|
|
(custom-set-faces
|
|
|
|
|
;; custom-set-faces was added by Custom.
|
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
|
;; If there is more than one, they won't work right.
|
2014-10-05 20:56:23 +00:00
|
|
|
|
'(hl-line ((t (:inherit nil :background "gray25"))))
|
2014-10-06 08:26:22 +00:00
|
|
|
|
'(trailing-whitespace ((t (:inherit nil :background "red1"))))
|
|
|
|
|
'(whitespace-line ((t (:inherit nil :background "orange")))))
|
2014-10-05 12:57:41 +00:00
|
|
|
|
|
2014-11-10 15:56:19 +00:00
|
|
|
|
(add-to-list 'load-path (concat user-emacs-directory "move-line"))
|
2016-09-15 14:08:08 +00:00
|
|
|
|
(add-to-list 'load-path (concat user-emacs-directory "gobgen"))
|
2014-10-05 14:27:20 +00:00
|
|
|
|
|
|
|
|
|
; Nyanyanyanyanya
|
2016-04-21 22:32:30 +00:00
|
|
|
|
(add-hook 'after-init-hook 'nyan-mode)
|
2016-04-21 22:34:54 +00:00
|
|
|
|
(add-hook 'after-init-hook 'global-wakatime-mode)
|
2016-04-26 11:42:00 +00:00
|
|
|
|
(add-hook 'after-init-hook (lambda () (require 'magit-gerrit)))
|
2014-10-05 14:27:20 +00:00
|
|
|
|
|
2016-09-15 14:08:54 +00:00
|
|
|
|
(add-hook 'after-init-hook (lambda () (require 'move-line)))
|
|
|
|
|
(add-hook 'after-init-hook (lambda () (require 'whitespace)))
|
|
|
|
|
(add-hook 'after-init-hook (lambda () (require 'rcirc)))
|
|
|
|
|
(add-hook 'after-init-hook (lambda () (require 'thingatpt)))
|
|
|
|
|
(add-hook 'after-init-hook (lambda () (require 'gobgen)))
|
2014-10-05 12:57:41 +00:00
|
|
|
|
|
2016-09-15 14:08:54 +00:00
|
|
|
|
(load "gnu-c-header.el")
|
|
|
|
|
(load "toggle-window-split.el")
|
|
|
|
|
(load "round-number-to-decimals.el")
|
|
|
|
|
(load "transpose-windows.el")
|
|
|
|
|
(load "zim.el")
|
|
|
|
|
(load "clearcase.el")
|
|
|
|
|
(load "jekyll.el")
|
2016-09-23 12:58:35 +00:00
|
|
|
|
(load "enclose-string.el")
|
2014-10-05 12:57:41 +00:00
|
|
|
|
|
2014-11-16 15:41:42 +00:00
|
|
|
|
(add-hook 'c-mode-hook
|
|
|
|
|
(lambda ()
|
2016-09-16 16:10:13 +00:00
|
|
|
|
(helm-gtags-mode t)
|
|
|
|
|
(ggtags-mode 1)
|
2014-11-16 15:41:42 +00:00
|
|
|
|
(which-func-mode)
|
|
|
|
|
(flyspell-prog-mode)))
|
2014-10-05 14:27:20 +00:00
|
|
|
|
(add-hook 'c-mode-common-hook
|
2016-09-16 16:10:13 +00:00
|
|
|
|
(lambda ()
|
2014-10-05 14:27:20 +00:00
|
|
|
|
(local-set-key (kbd "C-c o") 'ff-find-other-file)))
|
2014-11-16 15:41:42 +00:00
|
|
|
|
|
2014-10-05 12:57:41 +00:00
|
|
|
|
(eval-after-load "helm-gtags"
|
|
|
|
|
'(progn
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag)
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag)
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol)
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file)
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history)
|
|
|
|
|
(define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)))
|
2014-10-05 18:41:08 +00:00
|
|
|
|
(global-set-key (kbd "C-x f") 'fiplr-find-file)
|
|
|
|
|
(global-set-key (kbd "C-x _") 'maximize-window)
|
|
|
|
|
(add-hook 'c-mode-common-hook
|
|
|
|
|
(lambda()
|
|
|
|
|
(local-set-key (kbd "C-c o") 'ff-find-other-file)))
|
2014-10-05 20:56:23 +00:00
|
|
|
|
(global-set-key (kbd "M-<up>") 'move-line-up)
|
|
|
|
|
(global-set-key (kbd "M-<down>") 'move-line-down)
|
2015-08-24 06:21:44 +00:00
|
|
|
|
;; Some terminals don’t interpret Alt-Up/Down as M-<up/down>.
|
2015-07-30 13:22:44 +00:00
|
|
|
|
(global-set-key (kbd "ESC <up>") 'move-line-up)
|
|
|
|
|
(global-set-key (kbd "ESC <down>") 'move-line-down)
|
2014-10-05 12:57:41 +00:00
|
|
|
|
|
|
|
|
|
(global-whitespace-mode 1)
|
|
|
|
|
(setq-default indent-tabs-mode nil)
|
|
|
|
|
(defvaralias 'c-basic-offset 'tab-width)
|
|
|
|
|
(defvaralias 'cperl-indent-level 'tab-width)
|
2014-10-06 08:26:22 +00:00
|
|
|
|
|
2014-10-07 20:17:48 +00:00
|
|
|
|
;(c-add-style "my"
|
|
|
|
|
; '(
|
|
|
|
|
; (c-basic-offset . 4)
|
|
|
|
|
; (c-offsets-alist
|
|
|
|
|
; (arglist-cont . 0)
|
|
|
|
|
; (arglist-intro . ++)
|
|
|
|
|
; (block-close . 0)
|
|
|
|
|
; (brace-entry-open . 0)
|
|
|
|
|
; (brace-list-close . 0)
|
|
|
|
|
; (brace-list-intro . +)
|
|
|
|
|
; (case-label . +)
|
|
|
|
|
; (class-close . 0)
|
|
|
|
|
; (defun-block-intro . +)
|
|
|
|
|
; (defun-close . 0)
|
|
|
|
|
; (defun-open . 0)
|
|
|
|
|
; (inclass . +)
|
|
|
|
|
; (statement . 0)
|
|
|
|
|
; (statement-block-intro . +)
|
|
|
|
|
; (statement-case-intro . +)
|
|
|
|
|
; (statement-cont . 4)
|
|
|
|
|
; (substatement-open . 0)
|
|
|
|
|
; (topmost-intro . 0)
|
|
|
|
|
; (topmost-intro-cont . 0)
|
|
|
|
|
; (access-label . -)
|
|
|
|
|
; (annotation-top-cont . 0)
|
|
|
|
|
; (annotation-var-cont . +)
|
|
|
|
|
; (arglist-close . c-lineup-close-paren)
|
|
|
|
|
; (arglist-cont-nonempty . c-lineup-arglist)
|
|
|
|
|
; (block-open . 0)
|
|
|
|
|
; (brace-list-entry . 0)
|
|
|
|
|
; (brace-list-open . 0)
|
|
|
|
|
; (c . c-lineup-C-comments)
|
|
|
|
|
; (catch-clause . 0)
|
|
|
|
|
; (class-open . 0)
|
|
|
|
|
; (comment-intro . c-lineup-comment)
|
|
|
|
|
; (composition-close . 0)
|
|
|
|
|
; (composition-open . 0)
|
|
|
|
|
; (cpp-define-intro c-lineup-cpp-define +)
|
|
|
|
|
; (cpp-macro . -1000)
|
|
|
|
|
; (cpp-macro-cont . +)
|
|
|
|
|
; (do-while-closure . 0)
|
|
|
|
|
; (else-clause . 0)
|
|
|
|
|
; (extern-lang-close . 0)
|
|
|
|
|
; (extern-lang-open . 0)
|
|
|
|
|
; (friend . 0)
|
|
|
|
|
; (func-decl-cont . +)
|
|
|
|
|
; (incomposition . +)
|
|
|
|
|
; (inexpr-class . +)
|
|
|
|
|
; (inexpr-statement . +)
|
|
|
|
|
; (inextern-lang . +)
|
|
|
|
|
; (inher-cont . c-lineup-multi-inher)
|
|
|
|
|
; (inher-intro . +)
|
|
|
|
|
; (inlambda . c-lineup-inexpr-block)
|
|
|
|
|
; (inline-close . 0)
|
|
|
|
|
; (inline-open . +)
|
|
|
|
|
; (inmodule . +)
|
|
|
|
|
; (innamespace . +)
|
|
|
|
|
; (knr-argdecl . 0)
|
|
|
|
|
; (knr-argdecl-intro . +)
|
|
|
|
|
; (label . 2)
|
|
|
|
|
; (lambda-intro-cont . +)
|
|
|
|
|
; (member-init-cont . c-lineup-multi-inher)
|
|
|
|
|
; (member-init-intro . +)
|
|
|
|
|
; (module-close . 0)
|
|
|
|
|
; (module-open . 0)
|
|
|
|
|
; (namespace-close . 0)
|
|
|
|
|
; (namespace-open . 0)
|
|
|
|
|
; (objc-method-args-cont . c-lineup-ObjC-method-args)
|
|
|
|
|
; (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +)
|
|
|
|
|
; (objc-method-intro .
|
|
|
|
|
; [0])
|
|
|
|
|
; (statement-case-open . 0)
|
|
|
|
|
; (stream-op . c-lineup-streamop)
|
|
|
|
|
; (string . -1000)
|
|
|
|
|
; (substatement . +)
|
|
|
|
|
; (substatement-label . 2)
|
|
|
|
|
; (template-args-cont c-lineup-template-args +))))
|
|
|
|
|
|
|
|
|
|
(defun my-c-initialization-hook ()
|
|
|
|
|
(define-key c-mode-base-map (kbd "C-m") 'c-context-line-break))
|
|
|
|
|
(add-hook 'c-initialization-hook 'my-c-initialization-hook)
|
|
|
|
|
(setq c-offset-alist '((member-init-intro . ++)))
|
|
|
|
|
|
|
|
|
|
(defconst my-c-style
|
|
|
|
|
'((c-tab-always-indent . t)
|
|
|
|
|
(c-comment-only-line-offset . 4)
|
|
|
|
|
(c-hanging-braces-alist . ((substatement-open after)
|
|
|
|
|
(brace-list-open)))
|
|
|
|
|
(c-hanging-colons-alist . ((member-init-intro before)
|
|
|
|
|
(inher-intro)
|
|
|
|
|
(case-label after)
|
|
|
|
|
(label after)
|
|
|
|
|
(access-label after)))
|
|
|
|
|
(c-cleanup-list . (scope-operator
|
|
|
|
|
empty-defun-braces
|
|
|
|
|
defun-close-semi))
|
|
|
|
|
(c-offsets-alist . ((arglist-close . +)
|
|
|
|
|
(arglist-intro . ++)
|
|
|
|
|
(substatement-open . 0)
|
|
|
|
|
(case-label . 4)
|
|
|
|
|
(block-open . 0)
|
2014-11-16 15:42:08 +00:00
|
|
|
|
(knr-argdecl-intro . -)
|
|
|
|
|
(comment-intro . 0)))
|
2014-10-07 20:17:48 +00:00
|
|
|
|
(c-echo-syntactic-information-p . t))
|
|
|
|
|
"My C Programming Style")
|
|
|
|
|
(c-add-style "PERSONAL" my-c-style)
|
|
|
|
|
(defun my-c-mode-common-hook ()
|
|
|
|
|
(c-set-style "PERSONAL")
|
|
|
|
|
(setq tab-width 4
|
|
|
|
|
indent-tabs-mode nil)
|
|
|
|
|
(c-toggle-auto-newline 1))
|
|
|
|
|
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
|
|
|
|
|
|
2014-10-05 12:57:41 +00:00
|
|
|
|
(add-hook 'after-init-hook 'global-company-mode)
|
2014-10-09 22:08:49 +00:00
|
|
|
|
(add-hook 'c-mode-common-hook
|
|
|
|
|
(lambda ()
|
|
|
|
|
(when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
|
|
|
|
|
(ggtags-mode 1))))
|
|
|
|
|
(add-hook 'after-init-hook 'fiplr-clear-cache)
|
|
|
|
|
|
2016-02-16 08:11:55 +00:00
|
|
|
|
(setq rcirc-default-nick "GPolonkai")
|
2014-10-05 12:57:41 +00:00
|
|
|
|
(setq rcirc-default-user-name "polesz")
|
|
|
|
|
(setq rcirc-default-full-name "Gergely Polonkai")
|
2014-10-07 21:49:44 +00:00
|
|
|
|
|
|
|
|
|
(defun delete-current-line ()
|
|
|
|
|
"Kill the whole line on which point is"
|
|
|
|
|
(interactive)
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(kill-line 1))
|
2014-10-09 22:00:58 +00:00
|
|
|
|
|
|
|
|
|
(defun copy-func-prototype ()
|
|
|
|
|
"Copy the current function's prototype to the kill-ring"
|
|
|
|
|
|
|
|
|
|
(interactive)
|
|
|
|
|
|
|
|
|
|
(save-excursion (beginning-of-defun)
|
|
|
|
|
(setq protocopy-begin (point))
|
|
|
|
|
(forward-list)
|
|
|
|
|
(setq protocopy-end (point))
|
|
|
|
|
(kill-ring-save protocopy-begin protocopy-end)))
|
2014-11-10 15:29:59 +00:00
|
|
|
|
|
2016-02-16 08:12:19 +00:00
|
|
|
|
(defun duplicate-line()
|
|
|
|
|
(interactive)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(move-beginning-of-line 1)
|
|
|
|
|
(kill-line)
|
|
|
|
|
(yank)
|
|
|
|
|
(open-line 1)
|
|
|
|
|
(next-line 1)
|
|
|
|
|
(yank)))
|
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "C-c C-y") 'duplicate-line)
|
|
|
|
|
|
2014-11-10 15:30:19 +00:00
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.vala\\'" . vala-mode))
|
2014-11-10 15:29:59 +00:00
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.erl\\'" . erlang-mode))
|
2014-11-10 15:31:21 +00:00
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
|
2016-02-16 08:04:01 +00:00
|
|
|
|
|
|
|
|
|
(defun toggle-char-case (arg-move-point)
|
|
|
|
|
"Toggle the case of the char after point. Based on Xah's toggle letter
|
|
|
|
|
case defun version 2015-12-22
|
|
|
|
|
|
|
|
|
|
URL `http://ergoemacs.org/emacs/modernization_upcase-word.html'
|
|
|
|
|
Version 2016-02-16"
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(let ((case-fold-search nil))
|
|
|
|
|
(cond
|
|
|
|
|
((looking-at "[[:lower:]]") (upcase-region (point) (1+ (point))))
|
|
|
|
|
((looking-at "[[:upper:]]") (downcase-region (point) (1+ (point)))))
|
|
|
|
|
(cond
|
|
|
|
|
(arg-move-point (right-char)))))
|
2016-09-15 11:54:46 +00:00
|
|
|
|
|
2016-09-15 15:49:29 +00:00
|
|
|
|
(global-set-key (kbd "M-x") 'helm-M-x)
|
|
|
|
|
(global-set-key (kbd "C-x C-f") 'helm-find-files)
|
|
|
|
|
(global-set-key (kbd "C-x b") 'helm-mini)
|
|
|
|
|
|
|
|
|
|
(require 'helm-config)
|
|
|
|
|
(helm-mode 1)
|
2016-09-15 11:54:46 +00:00
|
|
|
|
(eval-after-load 'company
|
|
|
|
|
'(progn
|
|
|
|
|
(define-key company-mode-map (kbd "C-:") 'helm-company)
|
|
|
|
|
(define-key company-active-map (kbd "C-:") 'helm-company)))
|
|
|
|
|
(require 'xlicense)
|
2016-09-15 15:39:01 +00:00
|
|
|
|
|
|
|
|
|
(put 'downcase-region 'disabled nil)
|
|
|
|
|
(put 'upcase-region 'disabled nil)
|
2016-09-16 14:36:22 +00:00
|
|
|
|
(global-origami-mode t)
|
|
|
|
|
(show-paren-mode t)
|
2016-09-16 15:27:21 +00:00
|
|
|
|
(global-set-key (kbd "M-i") 'helm-swoop)
|
2016-09-16 16:10:13 +00:00
|
|
|
|
|
|
|
|
|
(projectile-global-mode)
|
|
|
|
|
(setq projectile-completion-system 'helm)
|
|
|
|
|
(helm-projectile-on)
|
2016-09-16 16:19:43 +00:00
|
|
|
|
(global-git-gutter-mode t)
|
2016-09-20 08:55:21 +00:00
|
|
|
|
(git-gutter:linum-setup)
|
2016-09-16 16:35:20 +00:00
|
|
|
|
|
|
|
|
|
(require 'multiple-cursors)
|
|
|
|
|
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
|
|
|
|
|
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
|
|
|
|
|
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
|
|
|
|
|
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
|
2016-09-21 14:09:08 +00:00
|
|
|
|
|
|
|
|
|
(sml/setup)
|
2016-09-23 11:50:53 +00:00
|
|
|
|
|
|
|
|
|
(add-hook 'org-mode-hook
|
|
|
|
|
(lambda ()
|
|
|
|
|
(if (display-graphic-p) (org-bullets-mode t))))
|
2016-09-23 12:58:35 +00:00
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "M-(") 'æ-enclose-region)
|
2016-09-23 13:21:53 +00:00
|
|
|
|
|
|
|
|
|
;; TODO: maybe add-to-list is a better way to do it
|
|
|
|
|
(setq insert-pair-alist
|
|
|
|
|
'(
|
|
|
|
|
(40 41) ; ()
|
|
|
|
|
(91 93) ; []
|
|
|
|
|
(123 125) ; {}
|
|
|
|
|
(60 62) ; <>
|
|
|
|
|
(34 34) ; ""
|
|
|
|
|
(39 39) ; ''
|
|
|
|
|
(96 39) ; `'
|
|
|
|
|
(8220 8221) ; “”
|
|
|
|
|
(8222 8221) ; „”
|
|
|
|
|
(8216 8217) ; ‘’
|
|
|
|
|
(8249 8250) ; ‹›
|
|
|
|
|
(8250 8249) ; ›‹
|
|
|
|
|
(171 187) ; «»
|
|
|
|
|
(187 171) ; »«
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;; Other parens might be added later (in no particular order):
|
2016-09-26 07:11:44 +00:00
|
|
|
|
; () [] {} ⦅⦆
|
|
|
|
|
; ⦅⦆ 〚〛 ⦃⦄ 「」 〈〉 《》 【】 〔〕 ⦗⦘
|
|
|
|
|
; 『』 〖〗 〘〙
|
|
|
|
|
; 「」
|
|
|
|
|
; ⟦⟧ ⟨⟩ ⟪⟫ ⟮⟯ ⟬⟭ ⌈⌉ ⌊⌋ ⦇⦈ ⦉⦊
|
|
|
|
|
; ❛❜ ❝❞ ❨❩ ❪❫ ❴❵ ❬❭ ❮❯ ❰❱ ❲❳
|
|
|
|
|
; ﴾﴿
|
2016-09-23 13:21:53 +00:00
|
|
|
|
;
|
2016-09-26 07:11:44 +00:00
|
|
|
|
; ⏜⏝ ⎴⎵ ⏞⏟ ⏠⏡
|
|
|
|
|
; ﹁﹂ ﹃﹄ ︹︺ ︻︼ ︗︘ ︿﹀ ︽︾ ﹇﹈ ︷︸
|
|
|
|
|
; 〈〉 ⦑⦒ ⧼⧽
|
|
|
|
|
; ﹙﹚ ﹛﹜ ﹝﹞
|
|
|
|
|
; ⁽⁾ ₍₎
|
|
|
|
|
; ⦋⦌ ⦍⦎ ⦏⦐ ⁅⁆
|
|
|
|
|
; ⸢⸣ ⸤⸥
|
|
|
|
|
; ⟅⟆ ⦓⦔ ⦕⦖ ⸦⸧ ⸨⸩ ⧘⧙ ⧚⧛; ⸜⸝ ⸌⸍ ⸂⸃ ⸄⸅ ⸉⸊
|
|
|
|
|
; ᚛᚜ ༺༻ ༼༽
|