How can I create a Notepad++ shortcut that launches Find All in All Opened Documents giving the selected text as a parameter?
In other words, after a text is selected, the shortcut should perform Ctrl+F and Alt+O, then open the Search Result Window for the selected text.
I tried to create a macro but it passes as parameter the specific text used to record the macro -> useless.
I think currently there is no way to create a shortcut for "find all" in notepad++.
But here is another way you can try:
Download and install AUTOHOTKEY, copy follow code into a .ahk file
F2::
Send ^f
Send !o
Execute it, then you can use "F2" to operate find all in opened document.
you can replace "F2" to any other key you prefer.
^f mean Ctrl+f
!o mean Alt+o
Press Ctrl + F, and then click "Find All in All Opened Documents"
Alternatively,Press Ctrl + F then you can press Alt + O (as the 'O' is underlined).
Find All in current and open document with Notepad++
F2::
IfWinExist, AHK_CLASS Notepad++
WinActivate, ahk_exe notepad++.exe
Send ^f
CoordMode, Mouse, Screen
MouseMove, A_ScreenWidth/2, A_ScreenHeight/2
sleep 50
Click
Send {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}
return
+F2::
IfWinExist, AHK_CLASS Notepad++
WinActivate, ahk_exe notepad++.exe
Send ^f
CoordMode, Mouse, Screen
MouseMove, A_ScreenWidth/2, A_ScreenHeight/2
sleep 50
Click
Send {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}
return
Use can use alt+o or alt+d as below in place for tabs, but i went with Tabs.
;Send !o
;Send !o
try
Ctrl-Shift-F Find in Files
best regards :-)
Related
Trying to create a keyboard shortcut that will allow me to remap alt+ Cntrl + click to a keyboard only shortcut because I can get the previous sequence to open the definition in the split tab, whereas the regular f12 keybinding only opens it in the current split pane. For some reason, I cannot see where to rebind the alt + Cntrl + click binding. The reason being im trying to ilmit my mouse usage as im using vim commands.
The "alt + control + click" was found from this answer and describes that it opens in a new tab, but how to change the click to a keyboard keystroke is the question: Shortcut for opening the definition file in a split vertical group in vscode
This is currently how I copy code from an editor to a search field in VS code using vscodevim.
Select text in editor somehow
Right click to open up the contextual menu (since pressing Ctrl+C does not seem to work on Ubuntu, even when in input mode, and 'p' does not work in the search field) and click copy
Press Ctrl+Shift+F to open the search field
Press Ctrl+V
I'm pretty sure this is not how copying from an editor to search field is intended to work. It it the steps 1 and 2 I would like to change to something better.
What is a more efficient and vim-like sequence?
If you want to search for the word under the cursor
Ctrl-F will do the trick.
Or you can use Vim's * command, which effectively does the same, but jumps to the next occurrence right away by default.
Otherwise
If you need to use the search field for whatever reason, then the standard Vim way to copy stuff to the clipboard works, so you can yank into the * or + registers. The steps will then be:
Select text
"+y (you can create a shortcut for this combination if you want)
Ctrl-Shift-F, Ctrl-V
See also: How to make vim paste from (and copy to) system's clipboard?.
Having said that, the more obvious approach might be to use Vim's built-in search features, so after selecting the text, the remaining steps would be y: (yanking selection to the default register and opening the command-line) then / or ? (search forward or backward), then <C-v> (pasting the yanked selection to the command-line - this works only in the VSCode plugin, while in Vim you should use <C-r>").
I'm new to VIM so there might be a better way using VIM commands but for now this works pretty well.
Go into insert mode with i than select the word you would like to search for (I'm using the mouse) and than just press ctrl + f. Your search window will open as usual containing the selected word in it.
I see there is such command in the Edit menu tab, but is dim grey, both if I am inside a code tab and if I am outside it, as you can see in the attached screenshot.
How can I perform such operation?
UPDATE:
with the latest version of Jupyter lab (>1.1.4) this function is added!
Just click "Find", below the "Edit" menu: a contextual window will appear at the top right of the notebook.
There you click on the small arrow at the left side of the text field, and the "replace" function appear.
OLD ANSWER (still good anyway):
At the end, I found this solution, but it's only for those who know how to use VIM, the text editor.
I installed an extension, jupyterlab-vim, and so I can use VIM commands for search and replace text.
This appears to be an overkill as solution, but for VIM lovers (like me) using many VIM commands in Jupyter Lab is just fabulous.
A solution will be to:
sed -i "" 's/oldword/newword/g' mynotebook.ipynb
Found here: Is there a way to default to "Replace in all cells" in the "Find and Replace" in jupyter?
the shortcut for replacing all values in a cell is
Shift + Ctrl + H : Find and Replace all in current cell
You can access and set your own shortcuts via keyboard preferences or by Ctrl + M + H
How to do a text search into a cygwin window buffer ? Is there a way to make the same kind of text seach as in Windows console buffer (right-click > search) ?
(I use mintty)
In mintty, you can do that using the sequence Alt+F3.
More information in the mintty man page
Searching in the text and scrollback buffer
Alt-F3 opens a search bar with an input field for a search string. Matches are highlighted in the scrollback buffer. Enter/Shift+Enter find the next/previous position of the match and scrolls the scrollback buffer accordingly. The appearance of the search bar and the matching highlight colours can be customized.
Beware this sequence is very close to the infamous windows sequence that closes a window. (which uses F4)
Alternatively, you can enable the Ctrl+Shift+H shortcut by going into the options pane of mintty and enabling Ctrl+Shift+letters shortcuts in the Key section of the options.
You access the options pane by right-clicking the mintty icon of the mintty window (upper left corner)
There's no such function currently. The closest alternative is to 'Select All' (followed by 'Copy' if you've disabled copy-on-select), paste into a text editor, and search there.
You have a few options.
Use cmd | tee file, then search in the resulting file afterwards.
Use screen's copy/scrollback mode.
(Mintty) I'd mucked up an rsync command (wrong direction) so I wanted to track which files had been altered. So I manually selected the Mintty screen output from the bottom with my mouse hold left mouse button and then push to top of the screen and then tediously waited while the screen scrolled forever backwards then when I'd gone back as far as I needed I did a Control-Insert to copy. I then pasted into a text file which I could then search, edit, grep, vim to my hearts content. Don't know if this the only way but it works!
I used emacs editor as buffer. From emacs open shell : C-x shell, then I can do search within buffer as current window.
I am using vim with NERDTree to develop, but not good at it. I have two questions with NERDTree:
How to move cursor between nav window and edit window without mouse?
How to go to one special file node (named xxx) in nav window directly by keyboard?
The NERDTree plugin creates a Vim buffer, and displays it in a Vim window. So you can use any of your normal Vim commands.
(1) Thus, if your edit window is to the right of the NERDTree window, you would use: ctrl + Wl to go to right window and ctrl + Wh to go to left window. or ctrl + w twice to toggle between the two.
(2) To go to a special file, simply search for it while in the NERDTree window:
/xxx
Hit ENTER to end the search at the line, and then ENTER again to open the file in the previous window and go to it.