How can I disable shift+enter in Dreamweaver - html

So I'm curious how to disable the 'code-view' 'shift+enter' 'line break' shortcut in Dreamweaver. All I can find on the internet is 'why would you want to do that?' - so I can tell you ahead of time that won't be helpful to me in any way.
To answer the question however, because I know the first thing to run through everyone's head is 'why Does he want to do that' is a simple one; So I can parenthesis+linebreak+openbracket. If you follow the keystrokes, you'll note that if I hold shift across the whole thing ( which is required for the first and last ) - that I will end up with 's all over the place. This is becoming quite the annoyance and everyone on the internet has useless responses.
Thanks in advance.

As noted by #Carson Myers in the comments following my question:
To remove the Shift+Enter Keyboard Shortcut in Dreamweaver that inserts an HTML Line Feed, follow these steps:
In Dreamweaver;
Edit > Keyboard Shortcuts...
From the edit screen;
Click the 'Duplicate Set' button, and name your new set something relative to your reasoning for making the change, I went with 'Dreamweaver PHP Development', as it was in this environment that I encountered the necessity to make this change.
In your newly generated keyboard shortcut set, find the shortcut for a Linebreak in the following sub-'folder':
Insert > HTML > Special Characters > Linebreak
Once you have located this 'key', remove the 'Shift+Enter' shortcut from its list of shortcuts, and add another one if you feel the necessity.
Following these steps removes the automatic insertion of an HTML Linebreak when using Shift+Enter. In my scenario, this allowed me to type the following sequence; '()\n{\n}' without having to release the shift button.
Thanks to #Carson Myers for the information.

Related

VSCode How do I skip past an automatically generated end </tag>?

Say I were typing
<h2>Show Subject*</h2>
How would I jump to the end of the brackets if my cursor was at the *. Usually I would just arrow key right 4 times or use my mouse to select the next line. I see others on youtube doing this easily.
example: https://youtu.be/PlxWf493en4?t=567
Her cursor instantly jumps to the end of the . My < > also do not highlight as hers does when I autogenerate them.
The magics you're seeing in the linked video are features of Emmet. For example there's Emmet: Go to matching pair, which you can bind to something convenient using the Keyboard Shortcuts dialog (Ctrl-k Ctrl-s). Try Ctrl-Shift-p to bring up the command pallete and then type Emmet to see all of the available commands. I would suggest taking some time to read the docs and discover what functionality is available to you.
What looks like jumping to the outside of the end tag in the video is really just jumping to the end of the line, which is bound by default to the End key. Also useful is word jumping (Ctrl+RightArrow/Ctrl+LeftArrow) and word selection (Ctrl+Shift+RightArrow/Ctrl+Shift+LeftArrow). You might take a look at this wiki article for a fairly comprehensive list of common shortcuts.

PhpStorm shortcut to wrap text with function call

I'm in PhpStorm and I need to select some text, press some shortcut and have that text wrapped in a function call (that I would have defined somewhere in the settings beforehand).
For example:
"Hello World" would become input("Hello World").
$_GET["foo"] would become input($_GET["foo"]).
I don't know if this is even possible, but it could help me save so much time if so.
Applying regex to solve this problem is unfortunately not possible. Manually selecting what I need to wrap isn't an issue.
Will the function name be the same every time or different?
In any case: it can be done this way:
Make a Live Template of "surround template" type with the following content:
$FUN$($SELECTION$)$END$
The $SELECTION$ variable here tells that it's a surround template.
Apply correct Context (where this template can be used)
Give it an abbreviation (name used to locate & invoke it) and brief description.
Here is mine:
NOTE: replace $FUN$ by a fixed function name if the function will always be the same. You can have additional templates with different abbreviations (that will have different hardcoded function names).
To use it:
Make a selection and invoke Code | Surround with... action where you select the right template. On Windows keymap it's Ctrl + Alt + T
In action (NOTE: it's without hardcoding the function name hence me typing the myFunc part):
(HINT: you can select the desired entry in a few keypresses if the name is unique -- just start typing the name in the popup -- the standard Speed Search work here)
P.S. Code | Surround with... can have other (possibly irrelevant for you in this case) entries. To list Live Templates only, use the shortcut for Surround with Live Template... action (Ctrl + Alt + J here on my Windows keymap). You can check the shortcut or change it in the Settings/Preferences | Keymap:
This way the popup menu will be a bit shorter:
Less keypresses:
You may be able to use Macros functionality to record the invoking the popup and selecting the right entry. You can then assign a custom shortcut to that Macros: select the text, hit the shortcut and it will playback the recorded sequence.
Sadly I cannot 100% guarantee that Macros will always work nicely (sometimes/on some setups it can "eat" keypresses).
P.S. It would be much easier if the IDE would support assigning keyboard shortcuts to specific Live Templates .. but it's in the backlog and no ideas on when this might be implemented. Anyway: https://youtrack.jetbrains.com/issue/IDEA-67811 -- watch this ticket (star/vote/comment) to get notified on any progress.
P.S. You can also try Postfix completion. It's good for writing the code and not really suitable for your case (editing small parts of it), but who knows. You will have to make a custom postfix for this -- should not be an issue though.
https://www.jetbrains.com/help/phpstorm/2021.3/auto-completing-code.html#postfix_completion

Visual Studio Code: How to remove html tags and write to multiple lines at the same time?

How does one do this:
I found many useful tricks here Multiline editing in VSCode
I know I could use Ctrl+Alt+Shift+Up/Down
I know I could just press Shift+Up/Down to and delete the opening li tags together. But the closing li tags are not in the same line of sight.
How does one do what is being shown in the above example.
Alright, combining valuable comments by #Nick and #Strelok (thanks guys), Here is the answer:
Step 1: Select <li> using Shift+Right
Step 2: Press Ctrl+D several times till all the <li> tags are selected.
Step 3: Press Del
Step 4: Press End
Step 5: Press Backspace to delete closing </li> tags
Step 6: Press Home
Step 7: Press Left key till you are at the right spot inside <a> tag. And then type whatever you wish to.
Even though I could deduce this answer only from the comments by #Nick and #Strelok, I decided to post the answer myself because it would be unfair to mark one as answer when both the comments were equally helpful. I am going to keep the question open for now just in case someone comes up with a better way. Perhaps a way to avoid pressing Ctrl+D multiple times.
There is an emmet command that will remove a tag for you: editor.emmet.action.removeTag. It is currently unbound to any keybinding but you could easily make your own. Here is a demo without binding that command:
Select your <li>'s however you choose [I use Ctrl-Shift-L in the demo - but that selects all of them in the file which may or may not be appropriate for your use case.]
Trigger the editor.emmet.action.removeTag
Arrow over to your insertion points.
Pretty easy especially if you give that emmet command a keybinding.
You have the entire keyboard shortcut overview directly in VSC Ctrl + K or Ctrl + R or Help menu 'Keyboard Shortcuts Reference'
Mark your desired characters.
Hit Ctrl + F2 to mark all similar occurrences.
Change everything simultaneously.
Repeat for additional changes.

Atom Editor Next Line Shortcut

I added a package to the Atom code editor that closes HTML tags for me. This feature is included in many code-editors, so it isn't Atom-specific.
For example, I type
<h1>
and it conveniently changes the line to
<h1></h1>
and places my cursor between the two tags.
This is where the dilemma occurs: My cursor is placed between the words and the closing tag, and I wish to go to the next line. Moving my hand to the mouse and clicking to the end of the line and then pressing enter is out of the question, especially with long documents where this phenomenon occurs hundreds, if not thousands of times.
Is there any way, perhaps a keyboard shortcut that skips to the end of the line, to solve this?
In Atom, CmdEnter (Mac) or CtrlEnter (Windows/Linux) will make a new line and go there, skipping past whatever is presently on the line.
You can just push the end button. Mine is located above my backspace key, but it might be with the number pad if you have a separate number pad.
If you add the same element over and over again, you could copy & paste it. And for the sake of an empty element you could copy & paste something like <br /> (you can even leave out the space, I just like to add them to make self-closing tags easier to identify).
PS: empty headlines? shame on you!

Auto tab to the next fields depending upon the field type

I find it intriguing and couldn't find any special reason as to why the cursor should not advance to the next form field when the field type is "drop-down selection" or "radio button". As in both cases logically there cannot be any additional input.
Is there any attribute which can be applied so that the cursor moves on to the next field.
Consider how many forms are filled daily worldwide and how much time being wasted if there is no special reason.
STOP! What you are trying to do will break keyboard users. In fact, any change you make will break somebody's workflow.
Auto-tab should not be used for any field, ever.
Who knows your field is going to auto tab? Nobody. Why? Because that's not what fields do on the web. So, I press tab out of habit to get to the next field, what did I do? Oh no, I've tabbed past the next field, thanks to an unexpected auto-tab. Now I'll just have to tab back.
I'm editing a field, there are enough characters in the field already, I want to overwrite some characters in the field, oh no! I'm being auto-tabbed out of it before I can finish!
I'm a keyboard user, I use the up and down arrows to change the value in a select or radio. These are triggering onchange events every time I press them, even though I haven't finished changing the value to the value I want.
When I want to tab to the next field, I'll jolly well press it myself thanks.
There is a very special reason not to autotab, and this doesn't really waste any time (unless you're developing something for somebody to use constantly for several hours at a time). The special reason is you're following the principle of least astonishment.
Start with attribute tabindex="-1"
JQuery style:
$('.something').each(function(){
this.tabIndex = -1;
});
Ok, I was asking for logic and it looks like I have found a reasonable answer to myself.
The cursor stays there and doesn't auto-tab to the next field as next field type may be a radio field or again a drop-down selection field, where auto-tab cannot take any action for example selecting an option from multiple radio options.
But I still feel that there should be an option of auto-tab depending on where it can be used or where it can be omitted.
Auto tab is an important and needed feature. Why, for example, should I have to press the tab key after entering in my area code before I can type in the next 3 numbers? From a user experience perspective, that's really annoying. I would think there would be an attribute built into HTML5 or CSS3 to accomplish this. I found this thread as I'm looking for it. If anyone has an update, please share.