javascript - How to automatically fix the indentations of a nested markup page? -
i got markup on emacs:
<div class ...> <div class 2 ...> <div class ="modal fade" id="contactmodal" tabindex="0" role="dialog"> <div class ="modal-dialog"> <div class ="modal-content"> <form id ="contactform" class="form-horizontal" role="form" action="/contact">
is there simple way format code in emacs hierarchy more readable?, so:
<div class ...> <div class 2 ...> <div class ="modal fade" id="contactmodal" tabindex="0" role="dialog"> <div class ="modal-dialog"> <div class ="modal-content"> <form id ="contactform" class="form-horizontal" role="form" action="/contact">
m-x indent-region
, bound <tab>
.
works on regions, need mark part of document want indent, or c-x h
mark whole buffer.
http://www.gnu.org/software/emacs/manual/html_node/elisp/indentation.html
Comments
Post a Comment