Skip to content

Instantly share code, notes, and snippets.

@atejeda
Created January 5, 2020 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atejeda/1c313f6fe7e63966ba0edfa00e35dcbb to your computer and use it in GitHub Desktop.
Save atejeda/1c313f6fe7e63966ba0edfa00e35dcbb to your computer and use it in GitHub Desktop.
;; packages ...
;; doom
;; doom-themes
;; multiple-cursors
;; autopair
;; M-x all-the-icons-install-fonts
;; melpa stuff
(require 'package)
(add-to-list 'package-archives
(cons "mel pa" "https://melpa.org/packages/") t)
(package-initialize)
;; look and feel
(display-time)
(menu-bar-mode -1)
(tool-bar-mode -1)
(toggle-scroll-bar -1)
(column-number-mode 1)
(line-number-mode 1)
(global-linum-mode -1)
(setq inhibit-startup-screen t)
(setq ring-bell-function 'ignore)
(savehist-mode 1)
(define-key read-expression-map (kbd "TAB") #'lisp-complete-symbol)
;; doom-themes
(require 'doom-themes)
(load-theme 'doom-one t)
;; font
(set-face-attribute 'default nil :height 110)
;; bindings
(global-set-key "\C-l" 'goto-line)
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <left>") 'windmove-left)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x C-b") 'ibuffer)
;; parens
(show-paren-mode 1)
(setq show-paren-delay 0)
;; tabs and identation
(setq-default indent-tabs-mode nil)
(setq-default c-basic-offset 4)
(setq-default py-indent-offset 4)
(setq standard-indent 4)
(setq c-default-style "linux" c-basic-offset 4)
(setq scroll-step 1)
(setq make-backup-files nil)
(setq auto-fill-mode 1)
(setq next-line-add-newlines nil)
;; multiple cursors
(require 'multiple-cursors)
(global-set-key (kbd "C-c m c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-word-like-this)
;; powerline
(require 'powerline)
(powerline-default-theme)
(setq powerline-arrow-shape 'arrow)
;; (setq powerline-color1 "grey22")
;; (setq powerline-color2 "grey40")
;; neotree
(require 'neotree)
(global-set-key [f8] 'neotree-toggle)
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
;; Fixes: https://github.com/jaypei/emacs-neotree/issues/262
(eval-after-load "neotree"
'(add-to-list 'window-size-change-functions
(lambda (frame)
(let ((neo-window (neo-global--get-window)))
(unless (null neo-window)
(setq neo-window-width (window-width neo-window)))))))
(setq neo-window-fixed-size nil)
;; autopair
(require 'autopair)
(autopair-global-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment