Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
my8bird committed Jun 10, 2016
1 parent 49b6a64 commit adac67a
Show file tree
Hide file tree
Showing 1,535 changed files with 129,906 additions and 240 deletions.
18 changes: 0 additions & 18 deletions .gitmodules

This file was deleted.

9 changes: 0 additions & 9 deletions README.md

This file was deleted.

131 changes: 131 additions & 0 deletions after_package.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
; (load-theme 'gruvbox t)
(load-theme 'darktooth t)

; Always have auto complete running
(global-auto-complete-mode t)
; Start auto-completion after 2 characters of a word
(setq ac-auto-start 2)

;; Set the whitespace rules I must follow
;; - Do this before loading other things encase they cash them
(setq-default py-indent-offset 3)
(setq-default indent-tabs-mode nil)
(setq js-indent-level 3)
(setq-default indent-tabs-mode nil) ; always replace tabs with spaces
(setq-default tab-width 3) ; set tab width to 3 for all buffers
(setq-default c-basic-offset 3)
(setq-default css-indent-offset 3)

(add-hook 'python-mode-hook '(lambda ()
(setq python-indent 3)
(flymake-python-pyflakes-load)))

(add-to-list 'auto-mode-alist (cons (rx ".js" eos) 'js2-mode))

(setq js2-highlight-level 3)


(defun wg/ido-for-this-mode
()
(interactive)
(let
((the-mode major-mode))
(switch-to-buffer
(ido-completing-read
(format "Buffers of %s: " the-mode)
(save-excursion
(delq
nil
(mapcar
(lambda
(buf)
(when
(buffer-live-p buf)
(with-current-buffer buf
(and
(eq major-mode the-mode)
(buffer-name buf)))))
(buffer-list))))))))

(global-set-key (kbd "H-t") 'wg/ido-for-this-mode)
(global-set-key (kbd "C-c t") 'wg/ido-for-this-mode)

(defun json-format ()
(interactive)
(save-excursion
(shell-command-on-region (mark) (point) "python -m json.tool" (buffer-name) t)
)
)

(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)

(push "~/.emacs.d/helm-cmd-t" load-path)
(require 'helm-config)

(require 'helm-cmd-t)
(global-set-key (kbd "M-t") 'helm-cmd-t)
;;(setq helm-cmd-t-cache-threshhold
(require 'helm-ls-git)

(require 'helm-grep)
(require 'helm-files)
(require 'helm-locate)

(setq helm-idle-delay 0.1)
(setq helm-input-idle-delay 0.1)
(setq helm-locate-command "es !~ !# %s %s")

; The default "C-x c" is quite close to "C-x C-c", which quits Emacs.
; Changed to "C-c h". Note: We must set "C-c h" globally, because we
; cannot change `helm-command-prefix-key' once `helm-config' is loaded.
(global-set-key (kbd "C-c h") 'helm-command-prefix)
(global-unset-key (kbd "C-x c"))

(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z

(when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t))

(setq helm-quick-update t ; do not display invisible candidates
helm-split-window-in-side-p t ; open helm buffer inside current window, not occupy whole other window
helm-buffers-fuzzy-matching t ; fuzzy matching buffer names when non--nil
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source.
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp.
helm-scroll-amount 8 ; scroll 8 lines other window using M-<next>/M-<prior>
helm-ff-file-name-history-use-recentf t)
(helm-mode 1)

;(require 'epc)
;(add-hook 'python-mode-hook 'jedi:setup)
;(setq jedi:complete-on-dot t)

(require 'multi-term)

;(elpy-enable)
;(define-key elpy-mode-map (kbd "<C-up>") nil)
;(define-key elpy-mode-map (kbd "<C-down>") nil)
;(define-key elpy-mode-map (kbd "<C-left>") nil)
;(define-key elpy-mode-map (kbd "<C-right>") nil)


(require 'mmm-mode)
(setq mmm-global-mode 'maybe)

(defun my-mmm-markdown-auto-class (lang &optional submode)
"Define a mmm-mode class for LANG in `markdown-mode' using SUBMODE.
If SUBMODE is not provided, use `LANG-mode' by default."
(let ((class (intern (concat "markdown-" lang)))
(submode (or submode (intern (concat lang "-mode"))))
(front (concat "^```" lang "[\n\r]+"))
(back "^```"))
(mmm-add-classes (list (list class :submode submode :front front :back back)))
(mmm-add-mode-ext-class 'markdown-mode nil class)))

;; Mode names that derive directly from the language name
(mapc 'my-mmm-markdown-auto-class
'("css" "html" "python" "xml" "sh"))
(my-mmm-markdown-auto-class "javascript" 'js-mode)
1 change: 0 additions & 1 deletion coffee-mode
Submodule coffee-mode deleted from c58da1
1 change: 0 additions & 1 deletion color-theme
Submodule color-theme deleted from 538303
50 changes: 50 additions & 0 deletions elpa/ac-js2-20140906.442/ac-js2-autoloads.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
;;; ac-js2-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))

;;;### (autoloads nil "ac-js2" "ac-js2.el" (22215 23004 0 0))
;;; Generated autoloads from ac-js2.el

(autoload 'ac-js2-expand-function "ac-js2" "\
Expand the function definition left of point.
Expansion will only occur for candidates whose documentation
string contain a function prototype.
\(fn)" t nil)

(autoload 'ac-js2-completion-function "ac-js2" "\
Function for `completions-at-point'.
\(fn)" nil nil)

(autoload 'ac-js2-company "ac-js2" "\
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)

(autoload 'ac-js2-jump-to-definition "ac-js2" "\
Jump to the definition of an object's property, variable or function.
Navigation to a property definend in an Object literal isn't
implemented.
\(fn)" t nil)

(autoload 'ac-js2-mode "ac-js2" "\
A minor mode that provides auto-completion and navigation for Js2-mode.
\(fn &optional ARG)" t nil)

;;;***

;;;### (autoloads nil nil ("ac-js2-pkg.el" "ac-js2-tests.el") (22215
;;;;;; 23004 0 0))

;;;***

;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; ac-js2-autoloads.el ends here
7 changes: 7 additions & 0 deletions elpa/ac-js2-20140906.442/ac-js2-pkg.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(define-package "ac-js2" "20140906.442" "Auto-complete source for Js2-mode, with navigation"
'((js2-mode "20090723")
(skewer-mode "1.4"))
:url "https://github.com/ScottyB/ac-js2")
;; Local Variables:
;; no-byte-compile: t
;; End:
76 changes: 76 additions & 0 deletions elpa/ac-js2-20140906.442/ac-js2-tests.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
;;; Tests for ac-js2

(require 'ert)
(require 'skewer-mode)
(require 'js2-mode)
(require 'ac-js2)

;;; Must have a skewer client connected before running the tests
;; Need to call httpd-stop from main Emacs if running tests in batch mode
(unless skewer-clients
(run-skewer))

(ert-deftest ac-js2-candidates-test ()
"Test the major function that returns candidates for all frontends."
(let (property
property-dot
func-call
var)
(with-temp-buffer
(insert "
var temp = function(param1, param2) {
var localParam = 15;
return param1 + param2;
};
var look;
temp.aFun = function(lolParam) {};
temp.anotherFunction = function() { return {about: 3};}")
(setq ac-js2-evaluate-calls t)
(setq ac-js2-external-libraries nil)

(js2-mode)
(ac-js2-mode t)
(js2-parse)

(insert "tem")
(ac-js2-candidates)
(setq var ac-js2-skewer-candidates)
(delete-char -3)

(insert "temp.")
(js2-parse)
(ac-js2-candidates)
(setq property-dot ac-js2-skewer-candidates)
(delete-char -5)

(insert "temp.aF")
(js2-parse)
(ac-js2-candidates)
(setq property ac-js2-skewer-candidates))

(should (assoc 'anotherFunction property-dot))
(print property)
(should (assoc 'aFun property))
(should (assoc 'temp var))))

(defmacro completion-frontend-test (test-name completion-function)
"Utility for testing completion front ends.
TODO: cover more cases"
`(ert-deftest ,test-name ()
(let (var)
(with-temp-buffer
(insert "var testComplete = function(param1, param2) {};")

(js2-mode)
(ac-js2-mode t)
(js2-parse)

(insert "testComplet")
(funcall ',completion-function)
(setq var (thing-at-point 'word)))
(should (string= var "testComplete")))))

(completion-frontend-test auto-complete-test auto-complete)
(completion-frontend-test completion-at-point-test completion-at-point)
Binary file added elpa/ac-js2-20140906.442/ac-js2-tests.elc
Binary file not shown.
Loading

0 comments on commit adac67a

Please sign in to comment.