veripool / verilog-mode

Verilog-Mode for Emacs with Indentation, Hightlighting and AUTOs. Master repository for pushing to GNU, verilog.com and veripool.org.
http://veripool.org/verilog-mode
GNU General Public License v3.0
247 stars 90 forks source link

Enahnce surpport of hideshow, #1705

Closed my2817 closed 3 years ago

my2817 commented 3 years ago

Add "`ifdef" into "verilog-beg-block-re-ordered" For my useage, use tab to trigger the hide/show or indent function (defun my-hideshowvis-fringe () (interactive ) (end-of-line) (if (save-excursion (end-of-line 1) (or (hs-already-hidden-p) (progn (forward-char 1) (hs-already-hidden-p)))) (hs-show-block) (hs-hide-block) ;; (beginning-of-line) ))

(defun my-verilog-indent/hs () "work around electric-verilog-tab', indent or hide/show fring. Ifbuffer-read-only' is non-nil, execute my-hideshowvis-fringe'. Ifelectric-verilog-tab' don't change position, execute `my-hideshowvis-fringe'. " (interactive) (if (or buffer-read-only (let* ((old-position (point)) (new-position (progn (electric-verilog-tab) (point)))) (= old-position new-position)) ) (my-hideshowvis-fringe)))

(define-key verilog-mode-map "\t" 'my-verilog-indent/hs)

We appreciate your contributing to Verilog-Mode.

By contributing you agree this code will be licensed under the GNU Public License.

Please check your github name is set to your real name (click on your avatar icon in upper right, then "settings" then "Name".) This should match your system's ~/.gitconfig user name.

my2817 commented 3 years ago

it seems