Several functions added to manage personal todos
This commit is contained in:
parent
0b8909d8fb
commit
0d3a402dba
|
@ -21,7 +21,25 @@
|
|||
'ruby
|
||||
)
|
||||
|
||||
;; Load user config file in ~/.fg42
|
||||
(load-user-config "~/.fg42")
|
||||
;; Load user config file in ~/.fg42.el
|
||||
(load-user-config "~/.fg42.el")
|
||||
;; NOTE: It's important to use ~/.fg42.el instead of this file
|
||||
;; because updating fg42 will discard your changes in
|
||||
;; this file.
|
||||
|
||||
;; Example of things you can do in your ~/.fg42 config file:
|
||||
;;
|
||||
;; Setting your TODO file path:
|
||||
;; (setq fg42-todo-file "~/.TODO.org")
|
||||
;; or you can open a remote TODO file
|
||||
;; (setq fg42-todo-file "/ssh:user@host:/home/USER/.TODO.org")
|
||||
;;
|
||||
;; Set some environment variables for your fg42 to use
|
||||
;; (setenv "http_proxy" "localhost:8118")
|
||||
;; (setenv "https_proxy" "localhost:8118")
|
||||
;;
|
||||
;; Alwasy open a your TODO file as your first buffer
|
||||
;; (add-hook 'fg42-after-initialize-hook 'fg42-open-todo)
|
||||
;;
|
||||
|
||||
(fg42-initialize)
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
;; Functions -------------------------------------------------
|
||||
;;;###autoload
|
||||
(defun disable-projectile ()
|
||||
(interactive)
|
||||
(projectile-global-mode nil))
|
||||
|
||||
;; Quick fix for company-mode and yasnippet clashing
|
||||
(defun company-yasnippet-or-completion ()
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
(depends-on 'seq)
|
||||
(depends-on 'ov)
|
||||
(depends-on 'cheatsheet)
|
||||
(with-ability tramp
|
||||
(depends-on 'tramp))
|
||||
|
||||
(with-ability ivy
|
||||
(depends-on 'ivy))
|
||||
|
|
|
@ -1,10 +1,26 @@
|
|||
;; Functions -------------------------------------------------
|
||||
;; Customizations --------------------------------------------
|
||||
(defcustom fg42-todo-file "~/.TODO.org"
|
||||
"Path to your TODO file. You can use a tramp address here as well."
|
||||
:type 'string
|
||||
:group 'fg42)
|
||||
|
||||
;; Hooks -----------------------------------------------------
|
||||
(defvar fg42-before-open-todo-hook nil)
|
||||
(defvar fg42-after-open-todo-hook nil)
|
||||
|
||||
;; Functions -------------------------------------------------
|
||||
(defun fg42-reload ()
|
||||
"Reload the entire FG42."
|
||||
(interactive)
|
||||
(load-file (concat (getenv "FG42_HOME") "/fg42-config.el")))
|
||||
|
||||
;;;###autoload
|
||||
(defun fg42-open-todo ()
|
||||
(interactive)
|
||||
(run-hooks 'fg42-before-open-todo-hook)
|
||||
(find-file fg42-todo-file)
|
||||
(run-hooks 'fg42-after-open-todo-hook))
|
||||
|
||||
;;;###autoload
|
||||
(defun extensions/editor-initialize ()
|
||||
"Base plugin initialization."
|
||||
|
@ -26,8 +42,11 @@
|
|||
(setq initial-scratch-message nil)
|
||||
|
||||
|
||||
|
||||
;; Tramp configuration -------------------------------------
|
||||
(ability tramp ()
|
||||
(setq tramp-default-method "ssh")
|
||||
(global-set-key [f9] 'fg42-open-todo))
|
||||
|
||||
;; replace strings
|
||||
(global-set-key (kbd "C-c M-s") 'replace-string)
|
||||
|
|
10
lib/fg42.el
10
lib/fg42.el
|
@ -31,10 +31,18 @@
|
|||
(defvar fg42-home (getenv "FG42_HOME")
|
||||
"The pass to fg42-home")
|
||||
|
||||
(defvar fg42-before-initialize-hook nil
|
||||
"This hook will be called before FG42 initilization process.")
|
||||
|
||||
(defvar fg42-after-initialize-hook nil
|
||||
"This hook will be called after FG42 initilization process.")
|
||||
|
||||
(defun fg42-initialize ()
|
||||
"Initialize FG42 editor."
|
||||
(run-hooks 'fg42-before-initialize-hook)
|
||||
(setq package-user-dir (concat fg42-home "/packages"))
|
||||
(fpkg-initialize)
|
||||
(initialize-extensions))
|
||||
(initialize-extensions)
|
||||
(run-hooks 'fg42-after-initialize-hook))
|
||||
|
||||
(provide 'fg42)
|
||||
|
|
Loading…
Reference in New Issue