Skip to content

Commit

Permalink
minor changes, added some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisKyriakoudis committed Jun 26, 2018
1 parent 0874d25 commit 77b1057
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
11 changes: 10 additions & 1 deletion setup.org
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,21 @@
**** Yasnippets
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
:config (yas-global-mode 1))
:init (yas-global-mode 1))

(define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "TAB") nil)

(define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)
#+END_SRC
**** PDF
#+BEGIN_SRC emacs-lisp
(use-package pdf-tools)
(use-package org-pdfview)


(use-package scroll-restore
:config (scroll-restore-mode 1))
#+END_SRC
*** Navigation
**** Smartparens
Expand Down
24 changes: 22 additions & 2 deletions timelines.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
(apply 'make-comint "timelines" timelines-interpreter nil)
(delete-other-windows)
(timelines-show-output))
(timelines-send-string ":l Context.hs")
(timelines-send-string ":m Sound.TimeLines.Context")
(timelines-send-string ":set prompt \"TimeLines> \"")
)
)

(defun timelines-show-output ()
"Show haskell output."
Expand All @@ -38,6 +38,10 @@
(set-window-point window (point-max)))))))



(set-window-start (get-buffer-window) 100)


(defun timelines-chunk-string (n s)
"Split a string S into chunks of N characters."
(let* ((l (length s))
Expand Down Expand Up @@ -111,12 +115,28 @@

;;(global-set-key (kbd "C-t") nil)

(defun timelines-reset-server ()
(interactive)
(timelines-send-string "reset"))


(defun timelines-set-window ()
(interactive)
(let ((s (read-from-minibuffer "Start: "))
(e (read-from-minibuffer "End: ")))
(print (list s e))
;;(timeLines-send-string "window 0 1"))
))


(defun timelines-mode-keybindings (map)
"Haskell Timelines keybindings."
(define-key map (kbd "C-c C-s") 'timelines-start)
(define-key map (kbd "C-t C-t") 'timelines-show-output)
(define-key map (kbd "C-t C-q") 'timelines-quit-haskell)
(define-key map (kbd "<C-return>") 'timelines-eval-region)
(define-key map (kbd "C-c C-r") 'timelines-reset-server)
(define-key map (kbd "C-c C-w") 'timelines-set-window)
)

(defun timelines-turn-on-keybindings ()
Expand Down

0 comments on commit 77b1057

Please sign in to comment.