Browse Source

Dabbrev, codesearch fix indexing, fix svn-mark-face

* Added Hippie-expand settings. I'll probably do more integration later
* Fix svn-mark-face call throwing errors by requiring dsvn
* Delete the codesearch index before indexing because it seems like it
  won't update properly
master
Macoy Madson 5 years ago
parent
commit
56788a1b48
  1. 28
      Emacs/emacsConfig.txt

28
Emacs/emacsConfig.txt

@ -98,7 +98,8 @@
;; - Isearch: Always put cursor at end of search (try searching backwards; it'll put it at the front)
;; - Isearch: If you paste a thing into isearch, then go up or down a bit, then hit backspace, it returns
;; to the last search until you get to the original place, then it clears the search. This is confusing :(
;;;;
;; - Mysterious thing which deletes the last half of the buffer (c-remove-stale-state-cache-backwards?)
;;
;; Criticism improvements:
;; - [DONE] Select word at point
;; - [DONE] Reopen closed file
@ -462,16 +463,24 @@
(setq codesearch-csearch-exe "c:/Users/mmadson/go/bin/csearch.exe")
(setq codesearch-cindex-exe "c:/Users/mmadson/go/bin/cindex.exe")
(setq codesearch-dir-to-index "f:/CJUNCTIONS/src")
(setq codesearch-index-file "~/.csearchindex")
)
(when (string-equal (user-login-name) "macoy")
(setq codesearch-csearch-exe "csearch")
(setq codesearch-cindex-exe "cindex")
(setq codesearch-dir-to-index "/home/macoy/Development/code/repositories")
(setq codesearch-index-file "~/.csearchindex")
)
(defun macoy-codesearch-index-src ()
(interactive)
(message "Running Codesearch index on %s" codesearch-dir-to-index)
;; Remove the old codesearch because for some reason it doesn't actually update
;; This is okay too because having an existing index doesn't speed things up all that much
(when (file-exists-p codesearch-index-file)
(delete-file codesearch-index-file)
)
(let ((codesearch-proc (start-process "CodesearchIndex" "*Codesearch-Index*" codesearch-cindex-exe codesearch-dir-to-index)))
(set-process-sentinel codesearch-proc
(lambda (codesearch-proc _string)
@ -488,7 +497,8 @@
;; This is useful for e.g. filtering autogenerated code files
;; Note that this will also remove code lines which match this pattern, so make the regex robust to that
(setq macoy-codesearch-ignore-lines-pattern "_ast\.")
;; This should work but doesn't :( (note that you may need to add -E below)
;; (setq macoy-codesearch-ignore-lines-pattern "'_ast\.|autogen'")
(defun macoy-codesearch-search-with-filter (pattern)
(interactive
(list
@ -724,7 +734,12 @@
(if (use-region-p)
(tags-search (buffer-substring (region-beginning) (region-end)))
(tags-search (ido-completing-read "Tag: " macoy-tag-names))
))
))
;; Hippie Expand/DAbbrev settings
(setq hippie-expand-try-functions-list '(try-expand-dabbrev try-expand-dabbrev-all-buffers))
(global-set-key (kbd "M-SPC") 'set-mark-command)
(global-set-key (kbd "C-SPC") 'hippie-expand)
;; Find references
(global-set-key (kbd "C-\\") 'macoy-tags-search)
@ -1065,6 +1080,11 @@
(global-set-key (kbd "S-<return>") 'macoy-add-edit-newline-before)
(global-set-key (kbd "C-S-<return>") 'macoy-add-edit-newline-before)
;;
;; Auto Theming
;;
;;"c:/Users/mmadson/go/bin/schemer2.exe -format img::colors -in C:/Users/mmadson/Downloads/Wallpapers/32\ -\ fHFDkjY.jpg -out colors.txt && python3 AutoBase16Theme.py emacs-base16-theme-template.el c:/Users/mmadson/AppData/Roaming/.emacs.d/elpa/base16-theme-20180320.2254/base16-my-auto-theme.el"
;;
;;
;; Macoy's keybinds which require better override
@ -1406,6 +1426,7 @@ static char *gnus-pointer[] = {
(set-face-foreground 'avy-lead-face-2 (face-background 'match))
(set-face-background 'avy-lead-face-2 (face-foreground 'match))
;; Make dsvn marked face match theme
(require 'dsvn)
(set-face-foreground 'svn-mark-face (face-foreground 'region))
(set-face-background 'svn-mark-face (face-background 'region))
@ -1422,6 +1443,7 @@ static char *gnus-pointer[] = {
(diminish 'adaptive-wrap-prefix-mode)
(diminish 'wrap-region-mode)
(diminish 'auto-revert-mode)
(diminish 'org-indent-mode)
;;
;; Macoy custom overrides end

Loading…
Cancel
Save