From f84325ce474f528550bbf121de66f640695d7ccd Mon Sep 17 00:00:00 2001 From: Chizi123 <joelgrun@gmail.com> Date: Sun, 06 Jan 2019 07:33:48 +0000 Subject: [PATCH] removed custom files as they were added into config.el --- /dev/null | 1 init.el | 264 ---------------------------------------------------- 2 files changed, 0 insertions(+), 265 deletions(-) diff --git a/custom/setup-applications.el b/custom/setup-applications.el deleted file mode 100644 index 405d087..0000000 --- a/custom/setup-applications.el +++ /dev/null @@ -1,31 +0,0 @@ -(provide 'setup-applications) - -(require 'eshell) -(require 'em-alias) -(require 'cl) - -;; Advise find-file-other-window to accept more than one file -(defadvice find-file-other-window (around find-files activate) - "Also find all files within a list of files. This even works recursively." - (if (listp filename) - (loop for f in filename do (find-file-other-window f wildcards)) - ad-do-it)) - -;; In Eshell, you can run the commands in M-x -;; Here are the aliases to the commands. -;; $* means accepts all arguments. -(eshell/alias "o" "") -(eshell/alias "o" "find-file-other-window $*") -(eshell/alias "vi" "find-file-other-window $*") -(eshell/alias "vim" "find-file-other-window $*") -(eshell/alias "emacs" "find-file-other-windpow $*") -(eshell/alias "em" "find-file-other-window $*") - -(add-hook - 'eshell-mode-hook - (lambda () - (setq pcomplete-cycle-completions nil))) - -;; change listing switches based on OS -(when (not (eq system-type 'windows-nt)) - (eshell/alias "ls" "ls --color -h --group-directories-first $*")) diff --git a/custom/setup-communication.el b/custom/setup-communication.el deleted file mode 100644 index 3bbf720..0000000 --- a/custom/setup-communication.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-communication) diff --git a/custom/setup-convenience.el b/custom/setup-convenience.el deleted file mode 100644 index 59fa0c8..0000000 --- a/custom/setup-convenience.el +++ /dev/null @@ -1,50 +0,0 @@ -(provide 'setup-convenience) - -;; use ibuffer instead of default -(global-set-key (kbd "C-x C-b") 'ibuffer) - -;; GROUP: Convenience -> Revert - -;; update any change made on file to the current buffer -(global-auto-revert-mode) - -;; GROUP: Convenience -> Hippe Expand -;; hippie-expand is a better version of dabbrev-expand. -;; While dabbrev-expand searches for words you already types, in current;; buffers and other buffers, hippie-expand includes more sources, -;; such as filenames, klll ring... -(global-set-key (kbd "M-/") 'hippie-expand) ;; replace dabbrev-expand -(setq - hippie-expand-try-functions-list - '(try-expand-dabbrev ;; Try to expand word "dynamically", searching the current buffer. - try-expand-dabbrev-all-buffers ;; Try to expand word "dynamically", searching all other buffers. - try-expand-dabbrev-from-kill ;; Try to expand word "dynamically", searching the kill ring. - try-complete-file-name-partially ;; Try to complete text as a file name, as many characters as unique. - try-complete-file-name ;; Try to complete text as a file name. - try-expand-all-abbrevs ;; Try to expand word before point according to all abbrev tables. - try-expand-list ;; Try to complete the current line to an entire line in the buffer. - try-expand-line ;; Try to complete the current line to an entire line in the buffer. - try-complete-lisp-symbol-partially ;; Try to complete as an Emacs Lisp symbol, as many characters as unique. - try-complete-lisp-symbol) ;; Try to complete word as an Emacs Lisp symbol. - ) - -;; GROUP: Convenience -> HL Line -(global-hl-line-mode) - -;; GROUP: Convenience -> Ibuffer -(setq ibuffer-use-other-window t) ;; always display ibuffer in another window - -;; GROUP: Convenience -> Linum -(add-hook 'prog-mode-hook 'linum-mode) ;; enable linum only in programming modes - -;; GROUP: Convenience -> Whitespace - -;; whenever you create useless whitespace, the whitespace is highlighted -(add-hook 'prog-mode-hook (lambda () (interactive) (setq show-trailing-whitespace 1))) - -;; activate whitespace-mode to view all whitespace characters -(global-set-key (kbd "C-c w") 'whitespace-mode) - -;; GROUP: Convenience -> Windmove - -;; easier window navigation -(windmove-default-keybindings) diff --git a/custom/setup-data.el b/custom/setup-data.el deleted file mode 100644 index 19b7301..0000000 --- a/custom/setup-data.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-data) diff --git a/custom/setup-development.el b/custom/setup-development.el deleted file mode 100644 index 6402e18..0000000 --- a/custom/setup-development.el +++ /dev/null @@ -1,8 +0,0 @@ -(provide 'setup-development) - -(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) -(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode) -(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode) - -;; Start garbage collection every 100MB to improve Emacs performance -(setq gc-cons-threshold 100000000) diff --git a/custom/setup-editing.el b/custom/setup-editing.el deleted file mode 100644 index e5f89f3..0000000 --- a/custom/setup-editing.el +++ /dev/null @@ -1,226 +0,0 @@ -(provide 'setup-editing) - -;; GROUP: Editing -> Editing Basics -(setq global-mark-ring-max 5000 ; increase mark ring to contains 5000 entries - mark-ring-max 5000 ; increase kill ring to contains 5000 entries - mode-require-final-newline t ; add a newline to end of file - ) - -(setq c-default-style "linux") - -(set-terminal-coding-system 'utf-8) -(set-keyboard-coding-system 'utf-8) -(set-language-environment "UTF-8") -(prefer-coding-system 'utf-8) - -(setq-default indent-tabs-mode t) -(delete-selection-mode) -(global-set-key (kbd "RET") 'newline-and-indent) - -;; GROUP: Editing -> Killing -(setq - kill-ring-max 5000 ; increase kill-ring capacity - kill-whole-line t ; if NIL, kill whole line and move the next line up - ) - -;; display whitespace characters -(global-set-key (kbd "C-c w") 'whitespace-mode) - -;; show important whitespace in diff-mode -(add-hook 'diff-mode-hook (lambda () - (setq-local whitespace-style - '(face - tabs - tab-mark - spaces - space-mark - trailing - indentation::space - indentation::tab - newline - newline-mark)) - (whitespace-mode 1))) - - -(defun prelude-move-beginning-of-line (arg) - "Move point back to indentation of beginning of line. - -Move point to the first non-whitespace character on this line. -If point is already there, move to the beginning of the line. -Effectively toggle between the first non-whitespace character and -the beginning of the line. - -If ARG is not nil or 1, move forward ARG - 1 lines first. If -point reaches the beginning or end of the buffer, stop there." - (interactive "^p") - (setq arg (or arg 1)) - - ;; Move lines first - (when (/= arg 1) - (let ((line-move-visual nil)) - (forward-line (1- arg)))) - - (let ((orig-point (point))) - (back-to-indentation) - (when (= orig-point (point)) - (move-beginning-of-line 1)))) - -(global-set-key (kbd "C-a") 'prelude-move-beginning-of-line) - -(defadvice kill-ring-save (before slick-copy activate compile) - "When called interactively with no active region, copy a single -line instead." - (interactive - (if mark-active (list (region-beginning) (region-end)) - (message "Copied line") - (list (line-beginning-position) - (line-beginning-position 2))))) - -(defadvice kill-region (before slick-cut activate compile) - "When called interactively with no active region, kill a single - line instead." - (interactive - (if mark-active (list (region-beginning) (region-end)) - (list (line-beginning-position) - (line-beginning-position 2))))) - -;; kill a line, including whitespace characters until next non-whiepsace character -;; of next line -(defadvice kill-line (before check-position activate) - (if (member major-mode - '(emacs-lisp-mode scheme-mode lisp-mode - c-mode c++-mode objc-mode - latex-mode plain-tex-mode)) - (if (and (eolp) (not (bolp))) - (progn (forward-char 1) - (just-one-space 0) - (backward-char 1))))) - -;; taken from prelude-editor.el -;; automatically indenting yanked text if in programming-modes -(defvar yank-indent-modes - '(LaTeX-mode TeX-mode) - "Modes in which to indent regions that are yanked (or yank-popped). -Only modes that don't derive from `prog-mode' should be listed here.") - -(defvar yank-indent-blacklisted-modes - '(python-mode slim-mode haml-mode) - "Modes for which auto-indenting is suppressed.") - -(defvar yank-advised-indent-threshold 1000 - "Threshold (# chars) over which indentation does not automatically occur.") - -(defun yank-advised-indent-function (beg end) - "Do indentation, as long as the region isn't too large." - (if (<= (- end beg) yank-advised-indent-threshold) - (indent-region beg end nil))) - -(defadvice yank (after yank-indent activate) - "If current mode is one of 'yank-indent-modes, -indent yanked text (with prefix arg don't indent)." - (if (and (not (ad-get-arg 0)) - (not (member major-mode yank-indent-blacklisted-modes)) - (or (derived-mode-p 'prog-mode) - (member major-mode yank-indent-modes))) - (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) - -(defadvice yank-pop (after yank-pop-indent activate) - "If current mode is one of `yank-indent-modes', -indent yanked text (with prefix arg don't indent)." - (when (and (not (ad-get-arg 0)) - (not (member major-mode yank-indent-blacklisted-modes)) - (or (derived-mode-p 'prog-mode) - (member major-mode yank-indent-modes))) - (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) - -;; prelude-core.el -(defun prelude-duplicate-current-line-or-region (arg) - "Duplicates the current line or region ARG times. -If there's no region, the current line will be duplicated. However, if -there's a region, all lines that region covers will be duplicated." - (interactive "p") - (pcase-let* ((origin (point)) - (`(,beg . ,end) (prelude-get-positions-of-line-or-region)) - (region (buffer-substring-no-properties beg end))) - (-dotimes arg - (lambda (n) - (goto-char end) - (newline) - (insert region) - (setq end (point)))) - (goto-char (+ origin (* (length region) arg) arg)))) - -;; prelude-core.el -(defun indent-buffer () - "Indent the currently visited buffer." - (interactive) - (indent-region (point-min) (point-max))) - -;; prelude-editing.el -(defcustom prelude-indent-sensitive-modes - '(coffee-mode python-mode slim-mode haml-mode yaml-mode) - "Modes for which auto-indenting is suppressed." - :type 'list) - -(defun indent-region-or-buffer () - "Indent a region if selected, otherwise the whole buffer." - (interactive) - (unless (member major-mode prelude-indent-sensitive-modes) - (save-excursion - (if (region-active-p) - (progn - (indent-region (region-beginning) (region-end)) - (message "Indented selected region.")) - (progn - (indent-buffer) - (message "Indented buffer."))) - (whitespace-cleanup)))) - -(global-set-key (kbd "C-c i") 'indent-region-or-buffer) - -;; add duplicate line function from Prelude -;; taken from prelude-core.el -(defun prelude-get-positions-of-line-or-region () - "Return positions (beg . end) of the current line -or region." - (let (beg end) - (if (and mark-active (> (point) (mark))) - (exchange-point-and-mark)) - (setq beg (line-beginning-position)) - (if mark-active - (exchange-point-and-mark)) - (setq end (line-end-position)) - (cons beg end))) - -(defun kill-default-buffer () - "Kill the currently active buffer -- set to C-x k so that users are not asked which buffer they want to kill." - (interactive) - (let (kill-buffer-query-functions) (kill-buffer))) - -(global-set-key (kbd "C-x k") 'kill-default-buffer) - -;; smart openline -(defun prelude-smart-open-line (arg) - "Insert an empty line after the current line. -Position the cursor at its beginning, according to the current mode. -With a prefix ARG open line above the current line." - (interactive "P") - (if arg - (prelude-smart-open-line-above) - (progn - (move-end-of-line nil) - (newline-and-indent)))) - -(defun prelude-smart-open-line-above () - "Insert an empty line above the current line. -Position the cursor at it's beginning, according to the current mode." - (interactive) - (move-beginning-of-line nil) - (newline-and-indent) - (forward-line -1) - (indent-according-to-mode)) - -(global-set-key (kbd "C-o") 'prelude-smart-open-line) -(global-set-key (kbd "M-o") 'open-line) diff --git a/custom/setup-environment.el b/custom/setup-environment.el deleted file mode 100644 index 314eadd..0000000 --- a/custom/setup-environment.el +++ /dev/null @@ -1,18 +0,0 @@ -(provide 'setup-environment) - -(setq inhibit-startup-screen t) - -(setq savehist-additional-variables '(search ring regexp-search-ring) ; also save your regexp search queries - savehist-autosave-interval 60 ; save every minute - ) - -(winner-mode 1) - -(column-number-mode 1) - -;; remove backup files -(when (eq system-type 'windows-nt) - (defadvice backup-buffer (after my-backup-make-hidden activate) - (let ((backup-file-name (make-backup-file-name (buffer-file-name)))) - (when (file-exists-p backup-file-name) - (call-process "attrib.exe" nil nil nil "+I" "+H" backup-file-name))))) diff --git a/custom/setup-external.el b/custom/setup-external.el deleted file mode 100644 index 825f61e..0000000 --- a/custom/setup-external.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-external) diff --git a/custom/setup-faces.el b/custom/setup-faces.el deleted file mode 100644 index 382424f..0000000 --- a/custom/setup-faces.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-faces) diff --git a/custom/setup-files.el b/custom/setup-files.el deleted file mode 100644 index cef6243..0000000 --- a/custom/setup-files.el +++ /dev/null @@ -1,6 +0,0 @@ -(provide 'setup-files) - -;; tramp setup -(when (eq window-system 'w32) - (setq tramp-default-method "plink")) -(setq password-cache-expiry nil) diff --git a/custom/setup-help.el b/custom/setup-help.el deleted file mode 100644 index b1e2d96..0000000 --- a/custom/setup-help.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-help) diff --git a/custom/setup-local.el b/custom/setup-local.el deleted file mode 100644 index e7e1092..0000000 --- a/custom/setup-local.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-local) diff --git a/custom/setup-multimedia.el b/custom/setup-multimedia.el deleted file mode 100644 index 3481117..0000000 --- a/custom/setup-multimedia.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-multimedia) diff --git a/custom/setup-programming.el b/custom/setup-programming.el deleted file mode 100644 index 5963a0a..0000000 --- a/custom/setup-programming.el +++ /dev/null @@ -1,2 +0,0 @@ -(provide 'setup-programming) - diff --git a/custom/setup-text.el b/custom/setup-text.el deleted file mode 100644 index ad6878e..0000000 --- a/custom/setup-text.el +++ /dev/null @@ -1 +0,0 @@ -(provide 'setup-text) diff --git a/init.el b/init.el index 0e592d3..420f25d 100644 --- a/init.el +++ b/init.el @@ -1,23 +1,3 @@ -;; adding modules to load path -;; (add-to-list 'load-path "~/.emacs.d/custom/") -;; (add-to-list 'load-path "~/.emacs.d/elpa/") - -;; load your modules -;; (require 'setup-applications) -;; (require 'setup-communication) -;; (require 'setup-convenience) -;; (require 'setup-data) -;; (require 'setup-development) -;; (require 'setup-editing) -;; (require 'setup-environment) -;; (require 'setup-external) -;; (require 'setup-faces) -;; (require 'setup-files) -;; (require 'setup-help) -;; (require 'setup-programming) -;; (require 'setup-text) -;; (require 'setup-local) - ;; Repos (require 'package) (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") @@ -48,250 +28,6 @@ ;; redirect to org config file (when (file-readable-p "~/.emacs.d/config.org") (org-babel-load-file "~/.emacs.d/config.org")) - -;; CEDET -;; (use-package semantic -;; :config -;; (global-semanticdb-minor-mode 1) -;; (global-semantic-idle-scheduler-mode 1) -;; (global-semantic-idle-summary-mode 1) -;; (semantic-mode 1)) - -;; (use-package ede -;; :config -;; (global-ede-mode t)) - -;; (setq -;; ;; use gdb-many-windows by default -;; gdb-many-windows t - -;; ;; Non-nil means display source file containing the main routine at startup -;; gdb-show-main t) - -;; ;; undo-tree -;; (use-package undo-tree -;; :ensure t -;; :config -;; (global-undo-tree-mode)) - -;; ;; volatile highlights -;; (use-package volatile-highlights -;; :ensure t -;; :config -;; (volatile-highlights-mode t)) - -;; ;; yasnippet -;; (use-package yasnippet -;; :ensure t -;; :config -;; (yas-global-mode 1)) - -;; ;; ggtags -;; (use-package ggtags -;; :ensure t -;; :config -;; (add-hook 'c-mode-common-hook -;; (lambda -;; (when (derived-mode-p 'c-mode 'c++-mode 'java-mode) -;; (ggtags-mode 1))))) - -;; ;; workgroups2 -;; (use-package workgroups2 -;; :ensure t -;; :config -;; (workgroups-mode 1)) - -;; ;; smartparens -;; (use-package smartparens -;; :ensure t -;; :diminish smartparens-mode -;; :config -;; (progn -;; (require 'smartparens-config) -;; (smartparens-global-mode 1))) - -;; ;; clean-aindent-mode -;; (use-package clean-aindent-mode -;; :ensure t -;; :hook prog-mode) - -;; ;; company config -;; (use-package company -;; :ensure t -;; :init (global-company-mode) -;; :config -;; (add-hook 'c-mode-common-hook -;; (lambda () -;; (define-key c-mode-base-map [(tab)] 'company-complete)))) - -;; (use-package company-c-headers -;; :ensure t -;; :after company -;; :config -;; (add-to-list 'company-backends 'company-c-headers)) - -;; (use-package company-math -;; :ensure t -;; :after company -;; :config -;; (add-to-list 'company-backends 'company-math-symbols-unicode)) - -;; ;; projectile config -;; (use-package projectile -;; :ensure t -;; :bind (("C-c p" . projectile-command-map)) -;; :config -;; (projectile-global-mode) -;; (setq projectile-completion-system 'helm) -;; (setq projectile-indexing-method 'alien)) - -;; ;; magit config -;; (use-package magit -;; :ensure t -;; :commands magit-get-top-dir -;; :bind ("C-x g" . magit-status) -;; :init -;; (progn -;; ;; make magit status go full-screen but remember previous window -;; ;; settings -;; ;; from: http://whattheemacsd.com/setup-magit.el-01.html -;; (defadvice magit-status (around magit-fullscreen activate) -;; (window-configuration-to-register :magit-fullscreen) -;; ad-do-it -;; (delete-other-windows)) - -;; ;; Close popup when commiting - this stops the commit window -;; ;; hanging around -;; ;; From: http://git.io/rPBE0Q -;; (defadvice git-commit-commit (after delete-window activate) -;; (delete-window)) - -;; (defadvice git-commit-abort (after delete-window activate) -;; (delete-window)) - -;; :config -;; (progn -;; ;; restore previously hidden windows -;; (defadvice magit-quit-window (around magit-restore-screen activate) -;; (let ((current-mode major-mode)) -;; ad-do-it -;; ;; we only want to jump to register when the last seen buffer -;; ;; was a magit-status buffer. -;; (when (eq 'magit-status-mode current-mode) -;; (jump-to-register :magit-fullscreen))))) - -;; ;; magit settings -;; (setq -;; ;; don't put "origin-" in front of new branch names by default -;; magit-default-tracking-name-function 'magit-default-tracking-name-branch-only -;; ;; open magit status in same window as current buffer -;; magit-status-buffer-switch-function 'switch-to-buffer -;; ;; highlight word/letter changes in hunk diffs -;; magit-diff-refine-hunk t -;; ;; ask me if I want to include a revision when rewriting -;; magit-rewrite-inclusive 'ask -;; ;; ask me to save buffers -;; magit-save-some-buffers t -;; ;; pop the process buffer if we're taking a while to complete -;; magit-process-popup-time 10 -;; ;; ask me if I want a tracking upstream -;; magit-set-upstream-on-push 'askifnotset -;; ))) - -;; ;; flycheck -;; (use-package flycheck -;; :ensure t -;; :init (global-flycheck-mode)) - -;; (use-package flycheck-pos-tip -;; :ensure t -;; :after flycheck -;; :config -;; (flycheck-pos-tip-mode)) - -;; (use-package flycheck-clang-analyzer -;; :ensure t -;; :after flycheck -;; :config -;; (flycheck-clang-analyzer-setup)) - -;; ;; nyan mode -;; (use-package nyan-mode -;; :if window-system -;; :ensure t -;; :config -;; (nyan-mode)) - -;; ;; semantic refactor -;; (use-package srefactor -;; :ensure t -;; :bind (("M-RET o" . 'srefactor-lisp-one-line) -;; ("M-RET m" . 'srefactor-lisp-format-sexp) -;; ("M-RET d" . 'srefactor-lisp-format-defun) -;; ("M-RET b" . 'srefactor-lisp-format-buffer) -;; :map c-mode-base-map -;; ("M-RET" . 'srefactor-refactor-at-point) -;; :map c++-mode-map -;; ("M-RET" . 'srefactor-refactor-at-point))) - -;; ;; which-key -;; (use-package which-key -;; :ensure t -;; :config -;; (which-key-mode) -;; (which-key-setup-side-window-bottom)) - -;; ;; x86 lookup -;; (use-package x86-lookup -;; :ensure t -;; :init -;; (setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf") -;; :bind ("C-h x" . x86-lookup)) - -;; ;; org-bullets -;; (use-package org-bullets -;; :ensure t -;; :config -;; (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) - -;; ;; pdf-tools -;; (use-package pdf-tools -;; :ensure t -;; :config -;; (pdf-tools-install)) - -;; ;; org -;; (use-package org -;; :ensure t -;; :config -;; (setq org-src-tab-acts-natively t)) - -;; ;; tex/AUCTex -;; (use-package tex -;; :ensure auctex -;; :config -;; (setq TeX-auto-save t) -;; (setq TeX-parse-self t) -;; (setq doc-view-ghostscript-program "c:/msys64/mingw64/bin/gswin32c.exe") -;; (setq preview-gs-command "c:/msys64/mingw64/bin/gs.exe")) - -;; ;; latex-preview-pane -;; (use-package latex-preview-pane -;; :ensure t -;; :config -;; (latex-preview-pane-enable)) - -;; ;; plantuml -;; (use-package plantuml-mode -;; :ensure t -;; :init -;; (setq plantuml-jar-path "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar")) - -;; (use-package keyfreq -;; :ensure t -;; :config -;; (keyfreq-mode 1) -;; (keyfreq-autosave-mode 1)) (custom-set-variables ;; custom-set-variables was added by Custom. -- Gitblit v1.9.3