       "SPC 2" 'ivy-switch-buffer
       "SPC 3" 'counsel-find-file
       "SPC 4" 'zsh-terminal)
+
+(defun flycheck-mode-and-check ()
+  (interactive)
+  (flycheck-mode 'toggle)
+  (flycheck-buffer))
+(nmap "SPC 5" 'flycheck-mode-and-check)
 
 (amap
  "C-<right>" 'sp-forward-sexp

(setq company-auto-complete-chars nil)

(use-package flycheck
  :config (progn (global-flycheck-mode)
                 (setq flycheck-check-syntax-automatically '(save mode-enabled))))

(use-package yasnippet
  :config

(nmap "SPC g" 'magit-status)
(amap "C-s" 'swiper)

(setq python-shell-completion-native-enable nil)

(provide 'init)
;;; .emacs ends here
