Moving the caret in webkit-gtk - webkit

With the "enable-caret-browsing" option set on a WebkitWebView, is it possible to programatically move the caret with respect to lines of text as they are appear on screen? For example, move to end of visual line rather than move to end of DOM node.
This behavior is accessible through keyboard navigation (e.g. the End key goes to end of visual line), but couldn't find anything in the API for this.

Perhaps try emitting the move-cursor signal?
gboolean result;
g_signal_emit_by_name(view, "move-cursor", GTK_MOVEMENT_DISPLAY_LINE_ENDS, +1, &result);
I'm curious if this works.

Related

Fold/unfold code section back using Cntrl + Z in Intelij IDEA

When I fold some code blocks (e.g. for(){...} loop or if(){...}) I often need to unfold it back. But my cursor can be far from the original position. I would like to do it using Cntrl+Z hotkey. But it doesn't catches fold/unfold actions.
Is it possible to track folding actions so they can be canceled by Cntrl+Z
No, there is no such feature in Intellij. Folding/Unfolding are not captured as "real" actions.
Unforunately nothing is mention in their official documentation, nor the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | General | Code Folding provide such feature.
You might be able to get something similar with the code navigation keys:
Ctrl-Alt-Left = go back to previous cursor position
Ctrl-Alt-Right = go to next cursor position
Alternatively, you can use the Back and Forward buttons on your mouse to navigate through your location history.

Mid-line 'Jump to next line with indent' in IntelliJ IDE

You're typing a line of code and for whatever reason the caret isn't at the end of the line when you have finished typing it.
For example, in Python with IntelliJ's code completion.
I type:
def get_id(
and code completion automatically finishes it off to:
def get_id(self):
with the caret placed after the 'f' in 'self'.
Normally I'll press End then Enter to have the caret nicely indented for the next line. But End is an awkward key to hit—it moves around on different keyboards, it can be a long stretch or squashed in somewhere on a laptop.
IDEA's Ctrl+Enter line completion works well in some languages in some instances but not in others. The example above—it'll just push the ): down to the next line.
I've scanned through all the shortcut keys in IDEA's docs and third-party sites but can't see any shortcut to do this. Similarly, with auto quote or bracket completion when you just want to get past the closing quote/bracket to continue typing—I find myself just typing the closing quote/bracket instead of reaching for → or End.
Is there something obvious I'm overlooking?

IntelliJ equivalent to Eclipse TAB

I'm trying to migrate from Eclipse to IDEA. In Eclipse, when I hit the TAB key while typing in function parameters and in other contextual situations it will forward the cursor to the next place I can type (next parameter, end of the line for semi-colon, etc.). I use it constantly. Is there a way to get similar functionality in IDEA?
There is not direct equivalent to this action. See completion features page for the advanced features.
Regarding the semicolon insertion see Webstorm/Intellij put ";" always at the end of line.
See also Things possible in Eclipse that aren’t possible in IntelliJ?.

Alternative key combination for jumping to the end of a line to enter a semicolon

Due to automatic code completion, I regularly find myself in between parentheses, having to get to the end of a line to add the inevitable semicolon.
Then I have to get my right hand up, move it to the right, hit End, and come back to the main part of the keyboard again to enter the semicolon.
I perceive this as disturbing to my flow of typing, especially when writing on a notebook, as then those moves of my hand are very inefficient.
Is there already a key combination for reaching the end of a line, or adding a semicolon, within the main keyboard area? Or is it possible to configure PhpStorm in those regards?
(I'm using PhpStorm, but I added the IntelliJ IDEA tag to this question as I guess they would be similar regarding those basic features.)
More efficiently: invoke Edit | Complete Current Statement (Ctrl+Shift+Enter) to automatically insert semicolon at end of line and start new line.
You can assign any keyboard shortcut to the Move Caret to Line End action in Settings | Keymap.
You need to try touchcursor. I just love it.

Turn off auto-collapsing for VB.NET in Visual Studio?

The auto-collapse feature for code properties is neat AFTER you've got your properties all worked out, but while you're still editing them I find the feature to be REALLY annoying.
How can you disable it?
(I'm in VS2008 if it makes a difference)
Edit: I'm not talking about the Property Window... I'm talking about properties in code.
Private _firstName As String
Public Property FirstName() As String Implements IPerson.FirstName
Get
Return _firstName
End Get
Set(ByVal value As String)
_firstName = value
End Set
End Property
displays as
Public Property FirstName()...
From the EDIT menu, choose OUTLINING, STOP OUTLINING. You can also use the keyboard shortcut CTRL+M, CTRL+P.
This seems to be a "feature" of DevX Refactor for VB, which I also find terribly annoying. I found this thread on their forum which provides a couple of suggested solutions:
Add a key to the registry to make the DevExpress menu visible in VS and then go to the options page to disable auto-collapse or
Install a newer version of the add-in (Release 9.1.4 or above) which apparently doesn't behave this way anymore.
The stop outlining option never works for me. Also the Ctrl+M, Ctrl+M option only seems to work if I have the region collapsed highlighted. Ctrl+M, Ctrl+P does nothing for me. I went into options and unchecked the enter Outlining mode, but that didn't do anything either. At one point, when I had VS 2005 (now I have 2008), I managed to turn it off through a regedit hack. Though once I had to re-install VS 2005 and forgot the hack, so I've been living with this ever since. It's ultra annoying when you are looking for something where you are looking for a pattern of code and not the specific words of the code. I don't know why it is, but I do that a lot. Any helpwould be appreciated. Ty.
When the window is open, click on the pin in the upper right hand corner (the middle icon between the X and the down arrow). When you're done, click it again to enable auto hide again.