In NetBeans IDE, is there a key combo to select up or down many lines? - ide

I always run into this situation: cursor is on line 5 and I want to select everything down to line 16. I have to resort to shift-arrow, arrow, arrow, or use the mouse.
NetBeans has "go to line" (Control-G) but you can't hold down shift while doing that, so no good for selecting. There's also "bookmarks," but same problem.
Anyone know of a cool trick that solves this problem?
I'm open to alternate tool suggestions for OS X.

You can use Shift-PgDn or Shift-PgUp to select the next "page" of information.
The only thing that comes to mind is to create an editor macro.
Eg:
Tools > Options > Editor > Macros
Click "New" Enter a name:
Enter a name for the macro: select-5-down
For the macro code enter:
selection-down
selection-down
selection-down
selection-down
selection-down
Click "Set Shortcut" and assign a key binding. I used Alt-M.
Now each click of Alt-M extends the selection by 5 more lines.

Related

VBA - Create a menu list when you right click a listbox

I would like to have a menu with two options when user right clicks listbox.
With that menu user would do some actions on selected data, e.g. add new line, change some columns data or delete row. I think I can manage that code but I can not grasp how to create a right click custom menu.
I can not find a way to create such option. Does anyone has an idea?
Here's some code for the right click event:
Select ListBox item on rightclick in Word VBA
Replace this code with your context menu code:
Me.Caption = derivedIndex & " = " & ListBox1.List(derivedIndex)
Here's a example for the popup menu (you need skills to understand Win32 API calls...)
https://www.vbarchiv.net/api/api_createpopupmenu.html
The right click menu on the listbox that created by using only a class(without using Api or Declare function) contains the following buttons ;
Increase Font Size
Decrease Font Size
Sort A-Z
Remove List
Remove All
For VBA codes and sample file review this link

Intellij Idea - complete next parameter shortcut

Example:
Author author = new Author("Jack", "Daniels");
In Exlipce when filled "Jack" and pressed "enter" - it automatically went to second parameter and let me fill second one. In Intellij I always have to click with mouse, or use arrow keys.
Is there a shortcut in Intellij to make it quicker? I can't find one myself.
Since IntelliJ 2018.2
You can now jump outside the closing bracket or quote with Tab.
(from: https://blog.jetbrains.com/idea/2018/07/intellij-idea-2018-2-macbook-touch-bar-java-11-breakpoint-intentions-spring-boot-version-control-and-more/)
Basically it means if you have:
Author author = new Author("Jack<cursor>");
And you press Tab, the cursor is placed like this:
Author author = new Author("Jack"<cursor>);
Note: it doesn't matter where the cursor is initially, as long as you are somewhere inside the quotes when you press Tab the cursor is moved outside and placed behind it. If you want to enter the next parameter you have to manually type the comma and String.
The option can be found under: Settings -> Editor -> General -> Smart Keys and is called Jump outside closing bracket/quote with Tab
There are some other useful options there as well like insert pair quote and insert pair brackets.
If you want to go more advanced you can have a look into Live Templates.

How to change key to 'accept' intellisense 'offer' for VB.Net in Visual Studio 2015 (update 3)

When I'm coding in VB.Net in VS2015 I would like to use CTRL+SPACE to select Intellisense proposal when coding. Currently I have to use SHIFT+SPACE and I see no way to change it.
In the preceeding example screenshot it is visible that I have 3 potential options to autocomplete. I can select any of them with key up/down but in order to select the proposal I have following options:
Press 'SHIFT+SPACE' - this will accept the proposal and position the
carret right after the word enabling me to press '(' or whatever else
I want
Press 'SPACE' - this will accept the proposal but it will also
add a white space at the end which is ok for properties/fields but
not good for methods
Press '(' - this will accept the proposal but it
will also add a '(' character at thend which is ok for functions/sub
but not good for properies/fields
Press 'CTRL+SPACE' - this actually does not do anything :(, CTRL on its own makes the Intellisense menu gray-out
In the key configuration window I found the Edit.CompleteWord command:
However this command already has CTRL+SPACE assigned it but it simply does not work. In addition SHIFT+SPACE is not mentioned as one of the keybindings.
Note:
VS2015 does have a flag 'Toggle Completion Mode' but I actually see no difference if this option is checked or not.
you can Use Tab and this will accept the proposal and position the current right after Tab Use space it well show You next Complete Word .

Getting data from selected range to a field in an excel form (Visual Studio 2015)

I'm trying to implement a user form in Excel using Visual Studio 2015.
I'm looking for a way to get the value from a selected area (range), instantly when the user selects it (without clicking on a button for example).
Have you any ideas? Thank you in advance!
Or just create a shortcut key to call the subroutine in your excel macros.
once your subroutine/function is created
go to developers tab > Macros > choose your macro in the list > click options > enter a shortcut key.
Once done click ok and test your subroutine by pressing Ctrl + letter that you chose
**ATTENTION: do not use shortcut keys that already exist like:
Ctrl + A (select all)
or
Ctrl + s (save)
etc...
Thank you for answering! What I am seeking is not adding a macro in Excel but building something like a refedit control: http://ericrenaud.fr/refedit.htm
Thank you for the precious help!

Copy from Excel to Browser

How do I "paste" in Selenium/VBA to browser textfield?
I downloaded and installed this: https://code.google.com/p/selenium-vba/
I managed to start Selenium in Firefox (CTRL-ALT-S) and recorded my steps for automation. I changed the code language to VBA in there and copied it to paste it in Excel.
For those of you who want to know what to do in Excel (2013):
Right click "Start"
Customize Ribbon
Check "Developer Tools" on the right
Click OK > Click on "Developer Tools" > Click "Visual Basic" > Click "Extras" > Click "References" > Look for "SeleniumWrapper Type Library" and check it > Click OK > In Menu bar click on the top arrow beside "Paste UserForm" > Click "Module" > Now paste the VBA Code from Selenium (Firefox) Plugin in there
Everything works perfectly fine but I want it to do repetitive web browser tasks so it should copy Excel cells and paste it in Textboxes in Websites for example in the Google Searchbar.
I already found a solution for the copying part:
Range("A1").Copy
It works but I can't find any working solution for the pasting part. Tested but didn't work:
driver.findElementById("ID").SendKeys "^v" gives out "v" instead of pasting.
driver.findElementById("ID").SendKeys(Keys.chord(Keys.CONTROL, "v")); Doesn't accept ";" and also doesn't work without.
I also tried several "Wait" and "Sleep" codes but neither do I know for sure which of them actually work nor if they are necessary.
driver.action.key_down(: control) Didn't work.
driver.findElementById("ID").keyDown(Keys.CONTROL).sendKeys(String.valueOf('\u0076')).perform(); Syntax error, without ";" "Error: List Delimiter" and marks the "." between "String" and "value".
I am grateful for any advice!
The easiest way is to send the text:
Dim driver As New FirefoxDriver
driver.Get "https://en.wikipedia.org/wiki/Main_Page"
driver.FindElementById("searchInput").SendKeys [A1]
If you really need to use the clipboard:
Dim Keys As New Selenium.Keys
Dim driver As New Selenium.FirefoxDriver
driver.Get "https://en.wikipedia.org/wiki/Main_Page"
driver.SetClipBoard [A1]
driver.FindElementById("searchInput").SendKeys Keys.Control, "v"
Of course it depends on the kind of element you want to paste the text to, but how about just setting the element's value directly;
driver.findElementById("ID").text = Range("A1").value2