help-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Doom Emacs and Recutils Config


From: Fábio dos Santos
Subject: Doom Emacs and Recutils Config
Date: Fri, 27 Sep 2024 22:26:29 -0300

Hello everyone,

I´ve been using both Doom Emacs and learning recutils. I´m not a programmer, but I needed a better keymap to work with Doom Emacs and the recutils.

I´m not an expert in Elisp, or an expert in Emacs for that matter, but maybe this will be useful to someone, and, if deemed good enough, maybe it can be included in the recutils manual! Who knows!? 

Please let me know how this can be improved. 

For anyone who is stumbling on this message:
- The following config segment should be added to config.el.
- rec-mode package also needs to be configured in packages.el ((package! rec-mode))


;; Rec Mode for Recutils
(after! rec-mode
  (map! :map rec-mode-map
        ;; Record Navigation
        :n "j" #'rec-cmd-goto-next-rec
        :n "k" #'rec-cmd-goto-previous-rec
        ;; C-c C-t --- (rec-find-type) as in the original keymap
        :n "i" #'rec-cmd-edit-field
 
        :leader
        (:prefix ("e" . "Rec-Mode")
         :desc "Show Record Descriptor" :n "d" #'rec-cmd-show-descriptor
         :desc "Jump to Previous Record" :n "G" #'rec-cmd-jump-back

         ;; Field Navigation OK
         ;;  TAB --- (rec-cmd-goto-next-field) as in the original file
         :desc "Show Field Type" :n "t" #'rec-cmd-show-type

         ;; Field Folding
         :desc "Toggle Visibility" :n "SPC" #'rec-cmd-toggle-field-visibility

         ;; Field Edition ok
         :desc "Remove Trailing and Leading Char" :n "m" #'rec-cmd-trim-field-value

         ;; Searches
         (:prefix ("s" . "Rec-Mode Search")
          :desc "Search Fields" :n "q" #'rec-cmd-jump-to-fast
          :desc "Search RegExp" :n "s" #'rec-cmd-jump-to-sex)

         ;; Summary Mode OK
         :desc "Show Summary" :n "h" #'rec-cmd-show-summary
         :desc "Summary Mode Nxt Record" :n "n" #'rec-summary-cmd-next

         ;; Statistics  OK
         :desc "Show Number of Records" :n "I" #'rec-cmd-show-info
         :desc "Count the Number of Records" :n "#" #'rec-cmd-count
         :desc "Show Statisticsof Enum Fields" :n "%" #'rec-cmd-statistic

         ;; Selection mode OK
         (:prefix ("/" . "Selection Mode")
          :desc "Filter Selection by SEX" :n "s" #'rec-cmd-navigate-current-type-by-sex
          :desc "Filter with Fast Search" :n "q" #'rec-cmd-navigate-current-type-by-fast-string
          :desc "Exit Selection Mode" :n "/" #'rec-cmd-exit-selection)

         ;; Buffer from Selection OK
         (:prefix ("x" . "Buffer from Selection")
          :desc "Create new Buffer from SEX" :n "s" #'rec-cmd-new-buffer-from-sex
          :desc "Create new Buffer from Fast Search" :n "q" #'rec-cmd-new-buffer-from-fast-string )

         ;; Data Integrity
         :desc "Compile with Recfix" :n "c" #'rec-cmd-compile

         ;; Edition Modes OK
         :desc "Edit Record Mode" :n "R" #'rec-edit-record
         :desc "Edit Type Mode" :n "T" #'rec-edit-type
         :desc "Edit Buffer Mode" :n "B" #'rec-edit-buffer
         ))) ;; End Rec-Mode Config.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]