In IDEA (12) under Mac OS, how do I navigate the dialog windows using the underlined characters like it is know from Windows?
Take the Run/Debug Configuration dialog. Here all option-names have one of their characters underlined. In 'Name', N is underlined. How do I navigate to the 'Name' field with this (because merely pressing N with or without any of the usual modifiers does nothing)?
thanks /c
Use Alt+N (Alt is the generic mnemonic trigger).
Related
I have a new installation of Visual Studio Code (default configuration, with vim keymap). I want to use the command "add selection to find next match". I think this is equivalent to how multicursors work in sublime text and vim (with an extension), or Atom (find and replace: select next).
When I try to run the command directly by using Ctrl D it does not work, taking me to the last line in the file. This might be some kind of conflict that might be easy to solve.
More interestingly, when I run the command from the command palette Ctrl Shift P.
The first time selects the word I am at (well done!)
The second time selects the next occurrence of that word, but loses the selection, moving the two cursors right after the two first occurrences of the word.
The third time and next times nothing happens, the selection was lost in the previous time.
How to get the awesome normal behaviour that other editors have?
PD: I have now confirmed that this behavior is not present without the vim keymap, may they be compatible somehow?
Ctl + D is a default Vim keybind that scrolls the window down in the buffer. This is expected behavior for the Vim extension, and you should disable the mapping if you wish to use it to run the VSCode command "Add Selection To Find Next Match".
To do this, open the extension's setting by clicking File > Preferences > Extensions. From there, choose the Vim extension and select the option to Configure Extension Settings. There will be an option called Handle Keys, where you can enter JSON data to send certain key combos back to VSCode (and there's another option to turn off all Ctl + Letter combos, called Use Ctrl Keys). You can find some examples of such data on the extension's Marketplace page. Below is the snippet of code that I added to my settings.json file to get Ctl + D back.
"vim.handleKeys": {
"<C-d>": false
}
From my testing, it looks like changing this setting also fixes the behavior when using the Command Palette. It might be a bug, but who cares when you are most likely just going to use Ctl + D anyway. :)
Using the VIM extension for VS Code is there a key command to jump to the explorer pane and then back to the work window?
I cannot find anything in the docs.
I'm hoping there is something like my Control+N binding for NERDTree which lets me open the file viewer, pick a file and then close it.
I am not familiar with NERDTree, but I think Ctrl+Shift+e does what you are asking in vs code. Alternatively Ctrl+p may be an alternative? You could look at
linux keyboard shortcut for more reference.
The link is also available in Help > Keyboard Shortcut Reference
EDIT: I'm adding the equivalent shortcut for Mac OS since it's different layout. However, I don't use Mac OS.. So I add this without being able to confirm :
Shift+Command+E
Mac OS Keyboard shortcut for VS Code
Windows keyboard shortcuts are very similar to linux ones. So, I'll just include the link to windows shortcuts doc here. Windows Keyboard shortcut for VS Code
Just my two cents:
If you are using the Vim extension for VS code you can add this to your settings.json file:
"vim.normalModeKeyBindings": [
{
"before" : ["<leader>","a"],
"commands" : [
"workbench.view.explorer"
]
}
]
The exemple above uses <leader> + a while in normal mode to display the file explorer where you can navigate the file list with j and k. Pressing ENTER will open the file under the cursor and close the file list.
To set up a leader key just add in your settings.json:
"vim.leader" : "," ,
In addition to Santiago's comment, you're able to open a file in a new tab from the explorer (Cmd + Shift + E) with Ctrl + Enter for MacOS. I'm not sure about Windows or Linux.
If you want to go to a file with VIM in VSCode:
Enter Normal Mode (Esc)
Place cursor over file you want to jump to, e.g. between the quotes - "../models/postMessage.js";
Press lowercase gd - Go to definition
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
I'm on a mac terminal using the auto-pairs plugin. I'm trying to use the feature to wrap some text in parentheses. The manual says to use <M-e> but I do not know what this corresponds to on my keyboard. I've tried just about everything but nothing works. Google turns up nothing.
In Terminal.app…
open the Preferences window,
choose the Profiles tab,
choose your current profile,
under Keyboard, check "Use 'Option' key…".
In iTerm.app…
open the Preferences window,
choose the Profiles tab,
choose your current profile,
under Keys, choose which option key you want to use as Meta and check +Esc.
In your vimrc, add the line below to make it understand <M-e>:
set <M-e>=^[e
The ^[ is a literal <Esc> that you insert by typing <C-v> then <Esc>.
I think "M" normally refers to either "Mod" (alt) or "Meta" (the apple key in your case). So it would either be alt-e or apple-e
Is there a command available to key mapping for toggling the display of invisibles in the Atom editor. A Show/Hide Invisibles command?
Where would I go to look for such a command?
YES
For Linux and Windows:
1) hit Ctrl+Shift+P and type keymap
2) select Application: open your keymap and add the following 2 lines to that file:
'body':
'shift-ctrl-i': 'window:toggle-invisibles'
Or any non-conflicting keystroke combination of your liking instead of shift-ctrl-i.
Note
For further detail, read documentation on CSON fromat (season) and atom-editor's implementaton of cson.
You can open the Command Palette (Cmd + Shift + P) and search for the Window: Toggle Invisibles command. Selecting that command should toggle invisibles on/off.
Here's what worked for me using the Mac version:
'.editor':
'ctrl-i': 'window:toggle-invisibles'
For Atom 1.58.0 on Mac, open Settings, Keybindings, and click on the 'your keymap file' link above the search box. Add the following two lines to the bottom of the file and save it:
'atom-text-editor':
'ctrl-i': 'window:toggle-invisibles'
Pressing Ctrl and i will then toggle on and off the invisible characters