Vimperator, How to hit i_i keystroke to enter Insert-mode - keyboard-shortcuts

Following is the Vimperator help about the insert mode
I have two questions in this regard
How the key combination i_i should be typed? pressing i key once brings me to ignore mode and twice pulls me out and no trace of Insert Mode.
Also I want to know what are the second series of keyboard combinations which are recomended at the end of each line such as i_< C-] for < C-i>. They show up in gray in oppose to the main shortcuts recommended in magenta.

<C-i> is the key combination. i_<C-i> simply means <C-i> while in insert mode. This is shown in the docs to make it easy to find what a particular key combination does in a given mode.
You can only enter insert mode if you are focused on a text area. Normally when you focus on a text area you are immediately put into insert mode. However, if you use :set noinsertmode then when you focus on a text area you will not initially be insert mode. You can then enter insert mode by pressing i.
If you are not focused on a text area then pressing i will take you in and out of ignore mode.

:help buffer
then you will find [count]gi is what you need.
Actually, press C-t to shift from insert mode to textArea mode, or vice versa, press i. as you know, i_i means press i in insert mode. So, textArea mode can be considered as a sub-mode of insert mode.

Related

How do I select mutliple lines using only the keyboard in a JetBrains IDE?

A very minor annoyance of mine as this is something I need to do regularly, therefore it could speed me up considerably over time. Say I have the following four lines:
File.join(root,
'setup',
'pre-suite',
'install.py'),
If my cursor was resting before 'File' I can use CMD+SHIFT+Right arrow to highlight part of the line or the full thing, I can even move this line down the list by using the down arrow instead of the right arrow. However, I want to select all four lines using the keyboard only, is this possible? If so how?
Here on Windows Shift + Up/Down expands selection to include the line above/below.
Since you are on Mac (based on Cmd in your shortcuts) ... just use Preferences | Keymap and look what shortcut you have got there for Editor Actions | Up/Down with Selection actions.
Another idea - use Edit | Extend Selection few times in a row (how many -- depends on context and caret position). Try it -- it does wonders; especially useful when invoked in the middle of such code block/statement.

How to use auto suggest text box in selenium?

Code I found on net for the same is :
driver.findElement(locator).click();
driver.findElement(locator).sendKeys(value);
driver.findElement(locator).sendKeys(Keys.TAB);
But I don't know which value I have to enter and what is Keys in 3rd line
driver.findElement(locator).click();
driver.findElement(locator).sendKeys(value);
driver.findElement(locator).sendKeys(Keys.TAB);
driver.findElement(locator).sendKeys(Keys.ENTER);
You have to enter a value to suggest from text box.
Ex: If you need to suggest your state, you can enter state name first letters.
Then the "key" mean selenium webdriver command. you can specify which key should press.
Ex: Manually you have to enter the value and press down arrow twice and press enter.Like this you can specify the keyboard keys.

intellijidea code completion not new variables

I'm using Android Studio and I have code completion enabled as in picture.
I have enabled "Autopopup code completion" and "Insert selected variant by typing dot, space, etc..".
I want to write:
Drawable d = new BitmapDrawable(....);
I write "Dr", appears the popup, I click the space bar, and it writes "Drawable". It's all ok.
Then I write "d", appears the popup with "drawable" suggested, I click the space bar, and it writes "drawable".
But I want to write "d".
Is it possible to change this option applying only to classes and methods and not to new variables?
There is not a way to have code complete only apply to classes and methods and not to new variables. You have three options:
Turn off the Insert selected variant by typing dot, space, etc." options. You will then need to use Enter (to insert) or Tab (To overwrite) when you want to select an item from auto complete. The . (period/dot) key will still work when completing classes if you want to invoke a static member. (This is likely the best of the three choices and is the default behavior.)
After you type d for the variable name, hit Esc to close the auto complete popup before you hit the Space.
Turn off "Autopopup code completion" so that you have to manually activate it each time via Ctrl+Space

how to create dynamic text label autohotkey

I'm trying to create a program that will show me in a text label, the color value of the x,y positions given in Edit fields.
The problem is that it will only work once and after it will not refresh. It is not a problem about the value itself since the value is correctly updated when I use a MsgBox.
See my following code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, force
Gui, Add, Text,, X ;xpos label
Gui, Add, Edit, vxpos Number ;xpos to be entered by user
Gui, Add, Text,, Y ;ypos label
Gui, Add, Edit, vypos Number ;ypos to be entered by user
Gui, Add, Button, Default, GetColor ;to get the color
Gui, Add, Text,, vmyRGB ;color value that should be displayed
Gui, Show, AutoSize
Return
ButtonGetColor: ;called when pressing the button
Gui, Submit, NoHide ;retrieves values of my edit fields
PixelGetColor, myColor, %xpos%, %ypos% ;pixelcolor in my myColor variable
GuiControl,, vmyRGB, %myColor% ;updates my text field with the variable value, working once
MsgBox, %myColor% ;checks the value of my variable, always working
Return
Need some help on this, thank you :)
Well, after some more research using different keywords, I found out a solution:
replacing
Gui, Add, Text,, vmyRGB ;color value that should be displayed
by
Gui, Add, Text, vmyRGB, %myRGB% ;color value that should be displayed
and replacing
GuiControl,, vmyRGB, %myColor% ;updates my text field with the variable value, working once
by
GuiControl, Text, myRGB, %myColor% ;updates my text field with the variable value

Disable Fn+F4 with AutoHotKey using time

I want to use AutoHotKey to disable Alt+F4 when they are pressed within 0.05 seconds of each other. Otherwise, I'd like it to work as normal.
Explanation:
My Lenovo Yoga 2 Pro has alternate functions for the function keys.
For example: "F3" is mapped to volume+, "F4" is mapped to "close active window"
There are two modes:
Old-school mode: F3 just acts as F3, and you must hold Fn+F3 key to activate volume+
New-school mode: Pressing F3 activates volume+, and Fn+F3 will do the normal F3.
In either mode, I run the risk of closing my active window when I go to use volume+ because they are too close, which is very problematic. Note that AutoHotKey cannot detect the Fn key, thus I cannot use that to solve my issue.
The image below shows the AutoHotKey Key History tool. In New-school mode, I typed "asdf" and then pressed "F4" which is "close active window". You can see this actually simulates ALT+F4, and there is a very short duration between ALT and F4...
I'm thinking that I could disable this "close active window" function by having AutoHotKey interrupt an ALT+F4 combo when there is less than 0.05 seconds between the two keys. Can this be done?
Edit:
In response to Blauhirn's code, here is the original, edited for a shorter wait duration, (from 50 to 10). It works most of the time, though 1/10 times the window is still cosed:
~alt::
hotkey, alt, off
hotkey, !F4, doNothing, on
sleep, 10
hotkey, !F4, doNothing, off
while(getKeyState("alt"))
sleep, 1
hotkey, alt, on
return
doNothing:
return
Here is a change I thought would fix my focus issue by sending a 2nd Alt when the "close active window" was detected:
doNothing:
send {LAlt}
return
However, the 2nd Alt is not sent. It IS sent when the delay is above 40ish, however I find that is way too long, and in turn it interferes with my manual use of Alt+F4.
Have you tried using simply
F4::return
? Maybe this will override the Lenovo action for F4
Other than that, here are the two approaches I can think of:
Disabling the ALT+F4 standard win hotkey by default. Adding a custom hotkey for a delayed F4
!F4:: ; by default:
doNothing: ; this is a label (see GoSub)
return ; == do nothing
~alt:: ; alt was pressed
sleep, 50 ; wait 50 milliseconds
if(!getKeyState("alt")) ; if alt is NOT pressed down anymore, exit
return
else ; (else is actually unnecessary here)
hotkey, !F4, close ; Add new AltF4-hotkey
return
close:
winclose, A ; close the Active window
return
~alt up:: ; alt is being released
hotkey, !F4, doNothing ; remove the new AltF4 hotkey and go back to custom standard behaviour: do nothing.
return
it still triggers Alt, which usually leaves me in the menu of the active window (File, Edit, View, etc), or if typing within a textarea (such is this), it will remove typing focus.
well yes. If you decide to keep the lenovo keys, I don't think there is a way to prevent it. As you suggested, sending ALT again should solve the problem
using Input, after ALT has been pressed. Input blocks user input for a configurable time, as long as the V option is used.
(3. disabling your Lenovo Yoga 2 Pro special keys. If you need the F3 function, you can do that in AutoHotkey e.g. using send {volume_up}