Ctrl-W In HTML/JSP Tag

I was working on some old HTML/JSP (I didn't write this stuff but it works) and I tried Ctrl-W expecting a certain behavior - and was disappointed.

For this code:

]]>

If the cursor is somewhere in the word MIDDLE then the first Ctrl-W should select the word middle - and it does.

The second should select the whole attribute "ALIGN=MIDDLE" - but it doesn't.

I guess that the third should select all of the attributes - doesn't do that either.

The final ctrl-W should select the entire tag - that does work.

I know it's a niggly bit but, if Ctrl-W is going to be supported, it should be implemented reasonably.

Donald

2 comments

I was going to chime in and say this was bugging me also, but it looks like Jetbrains has already improved it in 5181.

If you put cursor in MIDDLE and press CTRL+W it selects MIDDLE. Press again, and ALIGN=MIDDLE is selected. Nice!

One big thing which is broken is that CTRLSHIFTW cancels the entire selection rather than just undoing the farthest scope.

For example, CTRLW CTRLW CTRLW on MIDDLE will select the entire line. If I press CTRLSHIFT+W then, I expect to see ALIGN=MIDDLE selected, but it cancels the entire selection.

In a JSP file, the CTRLSHIFTW Unselect word is not working for java scriplet <% %> code or for HTML code. The only case I could see it working was for page directives like
<%@ page import="com.abc.api.properties.View" %>
If I CTRLW on abc several times until the entire line is selected, I can go back by pressing CTRLSHIFT+W.

One minor thing that still doesn't work in your
example is CTRLW CTRLW on the ALT. It will select
ALT="" SRC="images/1_tr.gif"

0

Hi,

Alex wrote:

One big thing which is broken is that CTRLSHIFTW cancels the entire selection rather than just undoing the farthest scope.

Works as expected for me in 4167


For example, CTRLW CTRLW CTRLW on MIDDLE will select the entire line. If I press CTRLSHIFT+W then, I expect to see ALIGN=MIDDLE selected, but it cancels the entire selection.

In a JSP file, the CTRLSHIFTW Unselect word is not working for java scriplet <% %> code or for HTML code.

Please, file JIRA items

The only case I could see it working was for page directives like

<%@ page import="com.abc.api.properties.View" %>
If I CTRLW on abc several times until the entire line is selected, I can go back by pressing CTRLSHIFT+W.

One minor thing that still doesn't work in your
example is CTRLW CTRLW on the ALT. It will select
ALT="" SRC="images/1_tr.gif"

Fixed.

--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.