Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
Downvoting without commenting is a poor strategy to making the post better. –  fredsbend Apr 2 at 14:36

2 Answers 2

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:

    +Enter::
      Send <br />
    

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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