Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: indent on/off by comment #907

Closed
veripoolbot opened this issue Apr 13, 2015 · 1 comment
Closed

Question: indent on/off by comment #907

veripoolbot opened this issue Apr 13, 2015 · 1 comment
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Yoram Stern
Original Redmine Message: 1622 from https://www.veripool.org


Hi.
I want to run verilog-batch-indent only on a portion of my verilog file, that is to mark by comments the code portion to indent.
For example, if there was /AUTOINDENTOFF/ and /AUTOINDENTON/ - it would be glad:

$cat my_file.v

// stuff that I dont want to indent starts here
/AUTOINDENTOFF/

// stuff that I dont want to indent ends here
// stuff that I want to indent starts here
/AUTOINDENTON/

Is there a convenient way to get such behavior?

Thanks,
Yoram Stern

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-04-29T12:38:25Z


There is no such thing presently, but you can make your own function, roughly (untested)

(defun my-indent ()
    (interactive)
    (goto-char (point-min))
    (search-forward "/*AUTOINDENTON*/)
    (let ((ep (save-excursion (search-forward "/*AUTOINDENTOFF\*/)
                     (point))))
       (indent-region (point ep))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant