 (global-set-key (kbd "M-N")
 		'meain/narrow-region-dwim)
 
-;; Quick replace
-(define-key evil-normal-state-map (kbd "<SPC> ;") (lambda ()
-						    (interactive)
-						    (evil-ex "%s/")))
-(define-key evil-visual-state-map (kbd "<SPC> ;") (lambda ()
-						    (interactive)
-						    (evil-ex "'<,'>s/")))
-
-;; drdt (atuo find indend setting)
-(use-package dtrt-mode
-  :quelpa (dtrt-mode :fetcher github
-		     :repo "jscheid/dtrt-indent"):init
-  (dtrt-indent-global-mode))
-
-;; we need vterm
-(use-package vterm :ensure t)
-(use-package vterm-toggle
-  :ensure t
-  :config (progn
-	    (setq vterm-toggle-scope 'projectile)
-	    (setq vterm-toggle-projectile-root t)
-	    (setq vterm-toggle-fullscreen-p nil)
-	    ;; always open vterm in a bottom window
-	    (add-to-list 'display-buffer-alist
-			 '((lambda (bufname _)
-			     (with-current-buffer bufname
-			       (equal major-mode 'vterm-mode)))
-			   (display-buffer-reuse-window display-buffer-at-bottom)
-			   (reusable-frames . visible)
-			   (window-height . 0.5)))
-	    (evil-set-initial-state 'vterm-mode 'insert)
-	    (global-set-key (kbd "M-;")
-			    'vterm-toggle)
-	    (define-key vterm-mode-map (kbd "M-;") 'vterm-toggle)))
-
 ;; Better modeline
-(defun simple-mode-line-render (left right)
-  "Return a string of `window-width' length containing LEFT, and RIGHT aligned respectively."
-  (let* ((available-width (- (window-width)
-			     (length left)
-			     2)))
-    (format (format " %%s %%%ds " available-width)
-	    left
-	    right)))
 (setq-default mode-line-format (list '(:eval (if (eq 'emacs evil-state)
 						 "! "
 					       ": ")) ;; vim or emacs mode

	  (diminish 'eldoc-mode)
	  (diminish 'auto-revert-mode)))

;;; [Builtin packages] =================================================

;; auto-pair
(electric-pair-mode t)

		'toggle-frame-fullscreen)

;; Fullscreen current buffer
(defvar meain/window-configuration nil)
(define-minor-mode meain/monacle-mode
  "Zoom in and out of single window."
  :lighter " [M]"
  :global nil
  (if (one-window-p)
      (when meain/window-configuration
	(set-window-configuration meain/window-configuration))
    (setq meain/window-configuration (current-window-configuration))
    (delete-other-windows)))
(define-key evil-normal-state-map (kbd "``") `meain/monacle-mode)

;; vime functionality within emacs
(use-package uuid :ensure t)
