Emacs Cider Debugger locals navigation - debugging

I use Emacs with Cider to debug Clojure Code. After setting a breakpoint using the default debugging framework , there appears the list of debugging options one might execute shown in this Figure .
After pressing l the local values appear in a new tab in emacs. One can press on each element of the list of locals and click ENTER to jump into each map in the list and see its values, which works perfect.
How do we navigate back? After entering a map in a map in a map, how to navigate back one step?
The only behaviour I found is to go back to the debug window again press l and find the right map and find its child again, but there has to be a shortcut?
What is the shortcut? What is the procedure to find such a shortcut in the feature? Google did not help

You can use M-x cider-inspector-pop command. Usually it is bound to l key.
To find this keybinding, you could use M-x describe-mode command, when in the inspector buffer. It will give you all the commands of the mode and keybindings which these commands are bound to.

Related

ctrl+f2 keyboard shortcut does not work in VSCode on macOs

I have ctrl+f2 mapped to toggle bookmark in my vscode keyboard shortcuts.
{ "key": "ctrl+f2", "command": "bookmarks.toggle", "when": "editorTextFocus" },
It work correctly on Linux and Windows, but not on macOs.
I have enabled the setting to switch function keys (f1, f2, etc) to behave as standard function keys.
I have then unmapped ctrl+f2 in macOs keyboard shortcut settings.
But still ctrl+f2 keyboard shortcut is not registering with vscode.
Troubleshooting VS-Code Keybinding Issues
The best way to troubleshoot an issue with Keybindings in V.S. Code is to use the tool that was created for solving keybinding issues
The tool is simply named: "Keyboard Shortcut Troubleshooting Tool"
The tool comes with V.S. Code "out of the box", as a result; no downloading, or installation is needed. To use the tool you just activate it from the Quick Input Menu that drops open by pressing the F1-Key. If you cannot find it your self I posted instructions below, and an image. If you can find it yourself, then skip the "Activating the Troubleshooting Tool" Section, and go ahead and read, "Effectively Troubleshooting Issues with the Troubleshoot Keyboard-Shortcut Tool"
Activate V.S. Code's Troubleshooting Tool
Hit the F1-Key
When the quick input drops open type the following into the text input:
"Toggle Keyboard Shortcuts Troubleshooting"
Select the option: Developer: Toggle Keyboard Shortcuts Troubleshooting
It should automatically open the OUTPUT panel, which is located in the same panel that your terminal is. Make sure that the OUTPUT is set to LOG(Window) in the drop down. (I took a picture and posted it below if you can't find the Keyboard Shortcut Troubleshooter).
The image might have funny declensions because I am on a dual monitor setup with 1 1080x1920 curved screen and one 1080x720 screen.... I cropped it to a STD HD 1920 width.
HELPFUL SIDE NOTE:
"This tool may be the most verbose program ever written, as far as I can tell, it logs data to the OUTPUT Console each & every time you activate a keyboard event. Truth be told, I find this tool to be extremely distracting, and very annoying. Because of this, it is important to note, that even if you switch out of your OUTPUT console to your terminal or something. The Troubleshooter is still actively logging to the OUTPUT Console. Make sure when you are finished to turn it off."
Turning off the Keyboard Troubleshooter, requires the same process as turning it on.
Using V.S. Code's Troubleshooter
STEP-1: Close VS Code
This is not to be confused with reload V.S. Code. The only mechanism that VS-Code has for reloading its-self, doesn't provide the same functionality as closing, and reopening V.S. Code. The two are similar, but they are not equal (discussion for another time).
actually stop its process from running by hitting the X in the upper right corner of the title-bar, or hit
**[Alt + F4].
Step-2: Reopen V.S. Code W/O Any Extensions
Don't worry, you won't have to uninstall anything. You will start V.S. Code from the command-line though. Open up your bash terminal, or Powershell, and enter the following command:
$ code --disable-extensions
V.S. Code should start almost immediately
If the V.S. Code CLI doesn't open your editor, or this doesn't disable your extensions, you should refer to this link
Step-3: Start the Keyboard Shortcut Troubleshooter
I already explained this step above, so their is no reason to go over it again. Do make sure you have your panel open, and the OUTPUT tab is selected. You should see a bunch of logging being output, in the VS-Code output (that is redundant sounding), logging when you use any keybinding. The drop-down should have Log(Window) showing, as the current log selected.
Step-4: Test Your Keybinding
At this point you can use your keybinding, and get results. They might not be the results that you were hoping for, but the troubleshooter should give you details as to what is happening when you use your keyboard shortcut (aka bound-key, aka key-binding).
Step-5:
Fix the issue by opening the Keyboards Shortcuts configuration file by opening the quick input, (like I described above for the troubleshooter), and type Keyboard Shortcuts. Their will be two options, one is the default Keybindings that cannot be written too, the other is a configuration file, where you are allowed to overwrite all of the default keybindings if you choose. Look in the default keybinding.json file and make sure the keybinding that you feel is assigned to a certain task, really is assigned to it. Look in the regular keybindings.json file, and make sure if anything is written in it, that those keybindings are not affecting the keybinding that is not working for you. Use the information from the troubleshooter to help guide you through the process.
These links below further elaborate on V.S. Code keybindings:
V.S. Code Community Docs (Community Contributed)
V.S. Code Official Docs (Keybindings)

ahk send alternative in bash script

I want to achieve in a bash script, that when I press any key (e.g. F5) and then type any word (e.g. "hello world"), regardless of whether I positioned in the terminal, or text-editor or browser...
While I was using Windows, then I used Autohotkey for that.
How could I achieve that with bash script in Linux?
While as #Socowi mentioned, you will likely not be able to do this with bash alone, you can use AutoHotkey Linux alternatives like AutoKey for this.
For your specific question, see this guide for setting up and configuring AutoKey on Linux.
More specifically, scroll down to the section labeled "Inserting repetitive text using a hotkey" for how to configure a text-typing hotkey:
Inserting repetitive text using a hotkey
Abbreviations is only one way of inserting text using AutoKey. If you
prefer, you can also insert text using a keyboard shortcut, which
doesn't require typing an abbreviation.
To insert some text that you need to type frequently using a keyboard
shortcut, click the Set button next to Hotkey, then click Press to Set
in the newly opened window, and press the key combination you want to
use for this phrase:
Make sure you use a hotkey that's not already in use or else it may
not work / it will interfere with the already set hotkey. To try this
out, set it to something like Ctrl + F1 (which shouldn't be set by the
system at least).
Remember to click the Save button in the AutoKey toolbar after setting
the phrase hotkey, or else the changes won't have any effect. Now try
it out: focus a text editor, some text field in a web form, etc., and
press the hotkey you've set in AutoKey - the Testing AutoKey text
expansion on Linux phrase should be automatically inserted as soon as
you press the keyboard shortcut.

Intellij IDEA: shortcut to switch between code and Scala console (Mac)?

One of the most frequent things I used to do in Emacs is to have two buffers open: one for Scala code, and one for the Scala Console/REPL, and send code from the code buffer to the console, and rapidly switch between the two buffers using my own defined keyboard shortcuts.
What are the keyboard short-cuts to do this in Intellij IDEA with Scala? None of the docs seem to have exactly what I want, which is:
have both the Scala console (REPL) and the file (code) windows open
switch back and forth between code and console.
If there's no pre-defined keyboard shortcut, then is there an action for this, so I can define my own shortcut? I know there's "Jump to last window" (F12) and "Restore default layout" (Shift F12); these almost get me what I want: F12 takes me to the Scala console, and Shift F12 takes me to the code but closes the Scala console, and I want the Scala console to remain open.
More generally, it would be great to have Shortcuts/Actions to simply cycle through the open windows/components in the IDE, without having to use the switcher (Ctrl-TAB).
As far as I can tell you can run the scala console in either Run mode or Debug mode.
To jump to the Run panel you can hit: Cmd + 4
To jump to the Debug panel you can hit: Cmd + 5
To jump to code without closing the panel hit ESC
To close the currently open panel and go back to code hit the same shortcut for the panel.
If for some reason these don't work for you you can check the keymap bindings. Run & Debug bindings are under Main menu -> View -> Tool Windows -> Run, Debug. The escape binding is Editor Actions -> Escape.

iTerm Emacs key codes for Ctrl + <Arrow Keys>

In Emacs on Linux terms and Cygwin, Ctrl + Up/Down causes a long jump (depending on the mode) say one function block down, on iTerm however this does not work I am assuming I need to manually set key codes send?
I guess you are using iTerm 2. Go to Preferences window in iTerm, and check both "Keys" tabs. One is in the main tabs and the second is for each profile. By default, in the "Keys" tab in your profile ^↑ are ^↓ are defined there to send some backward-compatible special keys. Remove them for your profile and you're good to go!
UPDATE: This change doesn't seem to affect your current tab or window. You may need to start a new iTerm window.
Use M-{ and M-} instead.

Page down and page up in Emacs on Windows using the Windows key

I am trying to learn Emacs and trying to find best keyboard layout for me. One thing is really annoying me. I have added following lines to .emacs
(global-set-key "\C-y" 'scroll-up)
(global-set-key "\M-y" 'scroll-down)
When I hold Control and press y a few times, it will page down on every press of y.
However, when I hold the Windows key (mapped as Meta) and press y a few times it will only page up on the first press of y and all subsequent presses of y I get the ‘y’ character inserted in the buffer.
Can the page up behave like page down? I want to hold Meta and keep pressing y to scroll multiple pages up.
I am using GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-05-12 on LENNART-69DE564 (patched). It is Emacs with EmacsW32 patch. Is this problem with this Emacs? Problem with Meta key?
I tried original GNU Emacs (not patched) and it works OK with Alt. But my problem is not that I want to scroll without releasing any key. I release key y and press it multiple times but don't want to have to release Meta key. Same problem is described here:
http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/f30f4b75a8b75b10
Problem is not in that I have changed key mapping. It looks like it is a bug in EmacsW32 version. Here is another description of the problem:
Unreleased Meta/Win modifier
Use C-v and M-v.
Don't change C-y, M-y default bindings.
Could this be a side affect of using the Windows key as Meta? I'm thinking this because in a non-Emacs situation if you press and hold the Windows key and another key for a short cut (Win+E for Explorer, Win+R for Run dialog, etc.) the desired action only triggers once, not multiple times if you keep holding it down.
I'd try reassigning Meta to Alt and see if the problem persists. If it doesn't, then I'm not sure what other option you have, since likely it's the OS only sending the Windows key press once to the app in focus.
You should use the patched EmacsW32 version, if you want the Windows key as Meta.
From the site about the patches:
"Changes that makes it possible to use the window keyboard keys as META in Emacs. Without this patch key sequences like E will always do what they by default does in windows, ie in this case open up Windows Explorer. (This patched is not used by default, you have to turn it on.)"

Resources