 (define-key global-map (kbd "<down>") 'windmove-down)
 (define-key global-map (kbd "<right>") 'windmove-right)
 (define-key global-map (kbd "<left>") 'windmove-left)
+
+(defun window-resizer ()
+  "Control window size and position."
+  (interactive)
+  (let ((window-obj (selected-window))
+        (current-width (window-width))
+        (current-height (window-height))
+        (dx (if (= (nth 0 (window-edges)) 0) 1
+              -1))
+        (dy (if (= (nth 1 (window-edges)) 0) 1
+              -1))
+        c)
+    (catch 'end-flag
+      (while t
+        (message "size[%dx%d]"
+                 (window-width) (window-height))
+        (setq c (read-char))
+        (cond ((= c ?f)
+               (enlarge-window-horizontally dx))
+              ((= c ?b)
+               (shrink-window-horizontally dx))
+              ((= c ?n)
+               (enlarge-window dy))
+              ((= c ?p)
+               (shrink-window dy))
+              ;; otherwise
+              (t
+               (message "Quit")
+               (throw 'end-flag t)))))))
 
 ;; 改行コードを表示する
 (setq eol-mnemonic-dos "(CRLF)")

(ivy-mode 1)

;;; 下記は任意で有効化
;(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "<f6>") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)

(setq-default indent-tabs-mode nil)

;;autopep：保存時に勝手にコードを綺麗にしてくれる
                                        ;(require 'py-autopep8)
                                        ;(setq py-autopep8-options '("--max-line-length=200"))
                                        ;(setq flycheck-flake8--line-length 200)
                                        ;(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)

;; ;; pyflakes：文法がただしいかを動的チェック
;; (add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
