This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; search commit log by anything | |
(defvar anything-c-source-log-edit-comment | |
'((name . "Log-edit Comment") | |
(candidates . anything-c-log-edit-comment-candidates) | |
(action . (("Insert" . (lambda (str) (insert str))))) | |
(migemo) | |
(multiline)) | |
"Source for browse and insert Log-edit comment.") | |
(defun anything-c-log-edit-comment-candidates () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'zencoding-mode) | |
(eval-when-compile (require 'cl)) | |
(require 'flyspell) | |
(defun my/zencoding-expand () | |
"Execute zencoding if current point is in string and | |
you can execute from minibuffer if you push C-u before this command" | |
(interactive) | |
(lexical-let* | |
((quote "['\"]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-when-compile (require 'cl)) | |
(defun* my/set-keybinds (map &rest key-and-func) | |
(loop with use-keymap = (keymapp map) | |
for i from 0 to (1- (length key-and-func)) by 2 | |
for key = (nth i key-and-func) | |
for formatted-key = (if (vectorp key) key (kbd key)) | |
for func = (nth (1+ i) key-and-func) | |
if use-keymap | |
do (define-key map formatted-key func) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-hook 'markdown-mode-hook | |
'(lambda () | |
(auto-complete-mode t) | |
(local-unset-key [tab]) | |
(setq-local yas-fallback-behavior '(apply auto-complete)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-dwim () | |
"My convinience function for `org-mode'." | |
(interactive) | |
(cond | |
((org-in-block-p '("src")) | |
;; (org-in-src-block-p) | |
(org-edit-special)) | |
((org-src-edit-buffer-p) | |
(org-edit-src-exit)) | |
((org-table-p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
fbEnum = enum | |
raw = 0 | |
fizz = "Fizz\n" # 1 | |
buzz = "Buzz\n" # 2 | |
fizzBuzz = "FizzBuzz\n" # 3 | |
template isFizz(i: typed): bool = i mod 3 == 0 | |
template isBuzz(i: typed): bool = i mod 5 == 0 | |
proc computeFizzBuzz(i: int): fbEnum = |