Skip to content

Instantly share code, notes, and snippets.

View suvratapte's full-sized avatar
🎵

Suvrat Apte suvratapte

🎵
View GitHub Profile
;;; org-capture-demo.el --- Org capture demo configuration.
;;; Commentary:
;;; Author: Suvrat Apte
;;; Created on: 03 May 2020
;;; Copyright (c) 2019 Suvrat Apte <suvratapte@gmail.com>
;; This file is not part of GNU Emacs.
;;; License:
@suvratapte
suvratapte / init.el
Created November 24, 2019 06:37
Basic init.el
;; Do not show the startup screen.
(setq inhibit-startup-message t)
;; Disable tool bar, menu bar, scroll bar.
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
;; Highlight current line.
(global-hl-line-mode t)
@suvratapte
suvratapte / pretty-comments.el
Last active May 14, 2019 11:44
A function to add pretty comments in Emacs
(defun insert-comment-with-description (comment-syntax comment)
"Inserts a comment with '―' (Unicode character: U+2015) on each side."
(let* ((comment-length (length comment))
(current-column-pos (current-column))
(space-on-each-side (/ (- fill-column
current-column-pos
comment-length
(length comment-syntax)
;; Single space on each side of comment
(if (> comment-length 0) 2 0)