[submodule "git-wip"]
path = git-wip
url = https://github.com/bartman/git-wip.git
+[submodule "emacs-window-toggle"]
+ path = emacs-window-toggle
+ url = https://gist.github.com/3383607.git
+[submodule "org-mode"]
+ path = org-mode
+ url = git://orgmode.org/org-mode.git
'(nxml-child-indent 4)
'(nxml-where-global-mode nil)
'(nxml-where-header nil)
+ '(org-startup-indented t)
'(pop-up-windows nil)
'(rng-validate-chunk-size 2000)
'(rng-validate-delay 3)
--- /dev/null
+Subproject commit 1c87f56e5d457655a6d8acd4da693f6f96be7d6f
--- /dev/null
+Subproject commit 0461101fbbb75c4e7942306ce66032122cf3ab0b
"Couldn't enable flymake; permission denied on %s" flymake-filename)))))
(add-hook 'find-file-hook 'safer-flymake-find-file-hook)
+(defun py-skip-few-lines (&optional count)
+ (if (null count) (setq count 3))
+ (let ((blanks 0))
+ (while
+ (and (or (when (eolp) (setq count 0) (incf blanks) t)
+ (when (> count 0) (decf count) t))
+ (< (forward-line 1) 1)))
+ (> blanks 0)))
+
(defun py-imports-region ()
(save-excursion
(goto-char (point-min))
(looking-at "__future__")))
(beginning-of-line)
(setq beg (point))
+ (while (and (py-skip-few-lines)
+ (looking-at "import\\s-+\\|from\\s-+"))
+ (setq beg (point)))
(if (not (looking-at "\\(import\\s-+\\|from\\s-+\\)"))
(cons beg beg)
(while (looking-at "\\(import\\s-+\\|from\\s-+\\)")
--- /dev/null
+(let ((dir (concat (file-name-directory
+ (directory-file-name
+ (file-name-directory
+ (or load-file-name
+ (when (boundp 'bytecomp-filename) bytecomp-filename)
+ buffer-file-name))))
+ "emacs-window-toggle/")))
+ (load (concat dir "emacs-window-toggle.el"))
+ (global-set-key "\C-c\C-\\" 'toggle-windows-split))
--- /dev/null
+(let ((base (file-name-directory
+ (directory-file-name
+ (file-name-directory
+ (or load-file-name
+ (when (boundp 'bytecomp-filename) bytecomp-filename) buffer-file-name))))))
+
+ (add-to-list 'load-path (concat base "org-mode/lisp"))
+ (add-to-list 'load-path (concat base "org-mode/contrib"))
+
+ (require 'flyspell)
+ (if (not (boundp 'flyspell-delayed-commands))
+ (setq flyspell-delayed-commands '()))
+
+ (require 'org)
+ (require 'org-version)
+
+ (setq org-odt-data-dir (concat base "org-mode/etc")))
\ No newline at end of file
(grep (format "git ls-files -z | xargs -r0 grep -nwHF %s | cat -" symbol)))))
(global-set-key "\C-cGF" 'git-files-find-symbol)
+
(defun dired-git-files ()
(interactive)
- (let ((default-directory (magit-get-top-dir default-directory))
+ (let ((default-directory (magit-get-top-dir default-directory))\
(ls-lisp-use-insert-directory-program t)
files)
- (setq files (shell-command-to-string "git ls-files"))
- (dired (cons default-directory (split-string files "\n")))))
+ (setq files (delete-if '(lambda (file) (string= file ""))
+ (split-string (shell-command-to-string "git ls-files") "\n")))
+ (dired (cons default-directory files))))
(global-set-key "\C-cGD" 'dired-git-files)
+(defun dired-grep-git-files (regexp &optional words-only)
+ (interactive "sRegexp: \nP")
+ (let ((default-directory (magit-get-top-dir default-directory))
+ (cmd (format "git ls-files -z | xargs -r0 grep -l -E%s -- %s | cat -"
+ (if words-only " -w" "") (shell-quote-argument regexp))))
+ (if (not default-directory)
+ (error "not in Git repository"))
+ (setq files (delete-if '(lambda (file) (string= file ""))
+ (split-string (shell-command-to-string cmd) "\n")))
+ (dired (cons default-directory files))))
+
+(global-set-key "\C-cGH" 'dired-grep-git-files)
+
(defun magit-svn-fetch ()
(interactive)
(magit-run-git-async "svn" "fetch"))
(shrink-window-horizontally (- (- width (window-width) (* window-min-width (1- count)))))))
(global-set-key "\C-x=" 'safe-max-window-horizontally)
+(global-set-key "\C-x-" 'maximize-window-15)
\ No newline at end of file