Currently, I have projects that regularly require me to insert line breaks <br> into the code. I have been using [shift+return] then hitting [delete] to get rid of the line break that Dreamweaver also inserts into the code.

So say I have this line of code:

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt</p>

And I put the cursor after elit, then type [shift+return]. Dreamweaver makes it this:

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,<br>
sed do eiusmod tempor incididunt</p>

What I want is for Dreamweaver to not insert the line break into the code, like this:

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,<br> sed do eiusmod tempor incididunt</p>

So I only want Dreamweaver to insert the <br> and not the new line. If there is a way that it does not add the new line while using [shift+return] in both code and design view then that would be even better.

I found this on Stack Overflow, but I don't think he is asking for the same thing.

  • 1
    Downvoting without commenting is a poor strategy to making the post better. – fredsbend Apr 2 '14 at 14:36

You can do this by clicking on "Tag Libraries" button inside Code Format from the Preferences window .. From there you can navigate to the "br" tag to remove the line break by selecting "No Line Breaks" that's added when inserting the code under "Line breaks".

  • Best answer, works a treat! – Birrel Apr 20 '16 at 15:39

You can remove the internal hotkey and replace it with your own using AutoHotKey.

  1. Remove the existing hotkey. You might have to create a new shortcut set.

    enter image description here

  2. Use something like this in your AutoHotKey script:

      Send <br />

You might want to spice the script up with IfWinActive, but I couldn't get it to work right myself.


You need something to create a macro for your keyboard, basically creating a new "hotkey". Many keyboards that include multimedia keys have a program that will let you create new macros and remap the keyboard. Check in your keyboard application or go to control panel -> keyboard and you might find some options buried in there.

If you do not then you will need to find a third-party utility that will create a macro for any key stroke and turn it into a new one. I have not had the need to use a third-party utility as the keyboards I purchase always have a built-in option to do this. The following link provides several utilities. If you try one of these and have issues someone here might be able to help you with the configuration. http://www.techsupportalert.com/best-free-hotkey-macro-recorder-utility.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.