This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- lexical-binding: t -*- | |
;; timeline-mode minor mode records and shows a timeline of buffer | |
;; changes | |
;; | |
;; Buffer changes are stored after using complex commands and after | |
;; every save | |
;; | |
;; Changes are processed after 5 seconds of idleness, so that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Iniline refined diff | |
;; Copyright (C) 2022 | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. | |
;; This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Iniline refined git diff with live update | |
;; Copyright (C) 2022 | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. | |
;; This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl) | |
(require 'diff) | |
;; changes with less than this many characters are ignored to avoid | |
;; having too many little undos stored | |
(setq complex-undo-minimum-change-length 20) | |
;; number of complex undos stored for a file | |
(setq complex-undo-max-stored-diffs 50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://stackoverflow.com/questions/15845508/get-idle-time-of-machine | |
Add-Type @' | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
namespace PInvoke.Win32 { | |
public static class UserInput { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let* ((secs 100) | |
(hours (/ secs 3600)) | |
(minutes (/ (% secs 3600) 60)) | |
(seconds (% secs 60))) | |
(format "%s%s%s" | |
(if (> hours 0) | |
(format "%sh " hours) | |
"") | |
(if (> minutes 0) | |
(format "%sm " minutes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-expand-search-matches () | |
(interactive) | |
(let (markers) | |
(save-excursion | |
(goto-char (point-min)) | |
(while (not (eobp)) | |
(if (org-get-at-bol 'org-marker) | |
(push (org-get-at-bol 'org-marker) markers)) | |
(forward-line 1))) | |
(switch-to-buffer "*orgnotes*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-show-paren-for-line-start () | |
(interactive) | |
(add-hook 'post-command-hook 'my-show-paren-for-line-setup-overlay t t)) | |
(defun my-show-paren-for-line-stop () | |
(interactive) | |
(remove-hook 'post-command-hook 'my-show-paren-for-line-setup-overlay t)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-show-paren-for-line-start () | |
(interactive) | |
(add-hook 'post-command-hook 'my-show-paren-for-line-setup-overlay t t)) | |
(defun my-show-paren-for-line-stop () | |
(interactive) | |
(remove-hook 'post-command-hook 'my-show-paren-for-line-setup-overlay t)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |