Skip to content

Instantly share code, notes, and snippets.

@41tair
Created November 3, 2019 06:02
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 41tair/3b7472a1b92b4e8923862378d0155fe8 to your computer and use it in GitHub Desktop.
Save 41tair/3b7472a1b92b4e8923862378d0155fe8 to your computer and use it in GitHub Desktop.
lisp-custom
(global-hl-line-mode t)
(require 'cc-mode)
(global-linum-mode t) ;; enable line numbers globally
(column-number-mode 1)
(setq inhibit-startup-message t) ;; hide the startup message
(display-time-mode t)
(setq display-time-24hr-format 1)
(display-battery-mode t)
;;(require 'sr-speedbar)
(tool-bar-mode -1)
(setq make-backup-files nil)
(setq initial-scratch-message ";;Talk is cheap")
(set-scroll-bar-mode nil)
(put 'downcase-region 'disabled nil)
(defun insertsshkey (string)
"Insert ssh key"
(interactive "sInsert ssh key")
(insert "mkdir -p ~/.ssh;touch ~/.ssh/authorized_keys;echo ''>> ~/.ssh/authorized_keys;chmod 600 ~/.ssh/authorized_keys")
(term-send-input))
;;----------global-key------------
(global-set-key (kbd "C->") 'other-window) ;; set hotkey change window
(global-set-key "\C-ca" 'org-agenda)
;; Magit shortcut
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
(global-set-key (kbd "C-x C-t") 'multi-term)
(global-set-key (kbd "C-SPC") nil)
(global-set-key [f12] 'goto-line)
(global-set-key [f9] 'insertsshkey)
(global-set-key [f3] 'execute-extended-command)
(global-set-key [f4] 'ag-project)
(global-set-key [f5] 'kmacro-start-macro)
(global-set-key [f6] 'kmacro-end-and-call-macro)
(fset 'yes-or-no-p 'y-or-n-p) ;; y or n instead of yes or no
(setq visible-bell 0)
(global-undo-tree-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment