jVi Visual Block Select - jvi

I'm trying to do a block selection using jVi in Netbeans. I cannot seem to get it working - there seems to be a lot of good info on this topic, however I'm not seeing the answer to my problem.
This is what I understand: to do a block select, you first enter visual mode and select some text. Then you hit Ctrl-V to enter block select mode? For me, Ctrl-V pastes the clipboard, so I found someone mentioned Ctrl-Q. I try that, but I cannot get text to select in a column using the arrow keys or the h,j,k,l keys. For me, it just does a regular selection grabbing the rest of the line, and the line below (if I move the cursor down) up to the cursor.
What am I missing?

jVi has options to specify which control keys are handled by jVi and which passed on to NetBeans for processing. Your description indicates that Ctrl-V is being handled by NB (not by jVi). In NetBeans look at
Tools > Options > jViConfig > Ctrl-Key Bindings
and enable/check the keys that jVi should process.

Make sure you're not in a special more before you start (just press ESC a few times). It's also possible that some of your jVi startup scripts are remapping those keys.
Ctrl-V is the default, but Ctrl-Q was introduces on gvim on Windows, to avoid confusing users who knew Ctrl-v is for pasting text. You can look at your key mappings by typing
:map
in command-mode. You can even do
:verbose map
to find out where each mapping was defined. I think that only lists user-set mappings, so it'll show you when Ctrl-V and Ctrl-Q were re-defined by a script.

This worked for me - combining both suggestions from above. In jVi settings page, enable Ctrl-Q and use it for classic Ctrl-V functionality. Do not enable Ctrl-V as it has too many side effects wrt handling of mouse selection buffer. Works nicely in this way for me with netbean 8.2.

Related

Pine script intellisense ( autocomplete ) without Ctrl + Space

I have been using the pinescript editor in tradingview.com
I could not able to configure the editor much, Not even font size.
I am executing scripts in order to make changes in the editor like below.
$('#editor').css('font-size','21px');
I want the editor to suggest me without entering Ctrl + Space.
And also is there a generic advice as a newbie for using pine-script and editor. Some hack or tools which I can use ?
If you use VS Code, have a look at the first line here. It's an add-on by RicardoSantos.
Disclosure: the link in this answer points to a PineCoders FAQ entry. I am a member of the PineCoders community and I most probably wrote that FAQ entry. PineCoders is a TradingView-supported group of volunteer Pine coders and PineCoders' website is strictly educational. Neither TradingView nor PineCoders benefits financially from sending traffic to pinecoders.com, and the site contains no affiliate/referral links.

How to disable Notepad++ Auto-open previous files without opening Notepad++?

How do I stop Notepad++ from loading all files from the past session?
I know how to do that settings in Notepad++, but the problem is that I once opened a very large file (>10GB) and made the Notepad++ hang up. Notepad++ has already marked that big file in the session and therefore hang up everytime I start the Notepad++. Is there a way I can stop it from loading the past session so it won't hang up every time?
P.S. I have received a report on possible duplicate with this question. This is obviously a different case. At least in that question the notepad++ still starts up normally while in my case I cannot even change the settings normally because the notepad++ just hang while loading the stored version. The answer to this question also provide a good way to change the settings without starting Notepad++, which will be useful in fixing problems caused by settings when the Notepad++ cannot starts normally.
Yes, you can change that setting by modifying the config file.
go to %appdata%\Notepad++
and open config.xml
You should find the following line in there:
<GUIConfig name="RememberLastSession">yes</GUIConfig>
just change it to no and that should do the trick.
Start from command line:
notepad++ -nosession
"Auto-open previous files" then should be disabled
This is for those who do not want to modify the XML config filess, and this will also work without having the Notepad++ in PATH.
As I do not have enough reputation to comment on other answers, I'll add on Jacques Hubart's comment, all credits should still be for him.
Open Windows Run (Windows + R)
Type in the full path to the Notepad++ EXE.
This would normally be C:\Program Files\Notepad++\notepad++.exe
Add the nosession parameter
Run
Preview:
If, like me, you left a huge file in the last session, you can also remove just the offending file from the session and keep the rest.
go to %appdata%\Notepad++ and open session.xml
Scroll to the right to see the filename. Be careful to keep the integrety of the XML by removing the entire "file" node. It should be on a single line.
There is also another way from GUI
In Settings/Preferences/Backup uncheck the "Remember current session for next launch"
As suggested use notepad++ -nosession from run to open notepad++. Then go to preferences --> Backup --> Uncheck Remember current session before next launch
Close notepadd++ and open it normally without run. It worked for me.
another possibility is that the window is on an other screen not visible anymore due to starting it in a new multimonitor setup.
in that case, you have to bring the windows in the visible area by:
select the window by Alt+Tab
Alt+Space opens a small menu in the top left corner
Arrow-Down and Enter selects ' Move'
Arrows brings it back

How to use MenuItemExecute() with AVDoc.OpenInWindowEx()

Is it possible to use Acrobat.MenuItemExecute('Copy'); command with
AVDoc.OpenInWindowEx(FFilename, Panel1.handle, 0, True, 0,0, 2, 0, 0, 0);
in Delphi 7 and Acrobat XI Pro?
If you help me with an example I'll be glad.
I think the answer to this is probably "no" because before calling Acrobat.MenuItemExecute('Copy'), it is necessary to call BringToFront on the window containing the text you want to copy, otherwise the call to MenuItemExecute('Copy') will fail, even when the document is hosted in one of Acrobat's own windows. I don't see how you could do that successfully when the document window is hosted in your app, rather than Acrobat.
However, there are a few things you could add to your q that might assist in getting a better answer. [...]
Update Please disregard my comments in an earlier version of this answer saying that I could not reproduce the behaviour that I could not select text in the window opened using OpenInWindowEx. In fact, I can now select text fine, what I had overlooked previously is that I had set the Enabled property of my TPanel to False.
Unfortunately, I have still not been able to successfully call Acrobat.MenuItemExecute('Copy') and I am beginning to think that there is no way to do this in a hosted window. I have not found a definitive list, but various comments by Adobe staffers that google found make it clear that many MenuItemExecute strings just to not work when using OpenInWindowEx.
However that may not be the only way to retrieve the selected text back into the Delphi app.
If you look at the hosted window using a tool like WinSpy or Window Detective you will see that contained within the panel window is a whole host of Acrobat windows, including an AVL_AVView one with the Window text "AVPageView" which I imagine is the actual window displaying the PDF text.
I think the key to a possible solution is your observation, which I've confirmed, that pressing Ctrl-C in the window copies the text to the clipboard. So far I have not been able to achieve the equivalent in code, using techniques like keybd_event calls, various Delphi "SendKeys" routines and sending a WM_COPY message to the AVPageView window. I'm sure it must be possible, but I haven't yet found a way.

Sublime text remove multy cursor selection in windows

Is there a way to remove selection when you use multy cursors. I mean when I use ctrl+d it expandes selection and ctrl+k, ctrl+d to skip selection works, but ctrl+u for removing selection is not working on windows. Is there another shortcut or some snippents to make it work?
It sounds like there is a plugin interfering with the CtrlU undo option. To find it, open the console with Ctrl` and enter the command
sublime.log_commands(True)
This shows what's going on behind the scenes when you press key combinations or use mouse buttons. Test it by making some multiple selections with CtrlD, and you should see
command: find_under_expand
in the console. Now, try to undo one of your selections by hitting CtrlU and see what comes up. If you see
command: soft_undo
then it's not another plugin issue, as that's what you'd expect to see. However, if (as I suspect) another plugin is interfering, you'll see something else there. If you do, hopefully you'll be able to trace it to the plugin it belongs to and disable it.
When you're done, enter
sublime.log_commands(False)
in the console to turn logging off, then close the console by hitting Esc or Ctrl`.

Using Toolbar to submit SAS code from Editor

When submitting SAS code via the SAS Toolbar (eg cmjohns response) the compiler knows that the code is being "DM'd" and will not run certain code (eg %window).
Is there a way to trick SAS into believing that code submitted from the Toolbar is coming from the Editor, therefore allowing interfaces (using %window) to be triggered via point and click?
It isn't super clean, but this will do it. The only downside is a program editor window will be open after it runs. There's probably a way to close it when it's done but I don't know what that is off hand.
pgm; clear;include "C:\path\code.sas"; submit;
Basically, this says to open a new program editor window and make sure no other code is in it, then include the contents of code.sas into the editor, then submit all the code that's in the program editor.
As a side note, in addition to a toolbar button, I think you could map a function key to a command like this as well. Press F9 to pull up the current mapping. There is a limit to the length of the command mapped to a key though so no long paths.

Resources