Visual Studio Code keybindings – Running two or more commands with one shortcut

Update: released for vscode v1.77, more at run multiple commands like a macro. You are able to do this: { “command”: “runCommands”, “key”: “alt+r”, // whatever keybinding “args”: { “commands”: [ // commands to run in sequence “workbench.action.files.save”, “workbench.action.terminal.focus” ] } } The command runCommands is built-in, so no extension is necessary for your use … Read more

Unable to understand a line in .vimrc

nmap means “map a key sequence when in normal mode” (see vim’s docs). <silent> tells vim to show no message when this key sequence is used. <leader> means the key sequence starts with the character assigned to variable mapleader — a backslash, if no let mapleader = statement has executed yet at the point nmap … Read more

Emacs Keybindings in Visual Studio 2012 or 2013

I figured out how to get the emacs emulation extension for VS 2010 to install and run on VS 2012. This is a bit from memory, but here is what I did. Download the Emacs emulation extension. Rename it from EmacsEmulations.vsix to EmacsEmulations.zip and unzip into a folder. Edit the <VisualStudio Version=”10.0″> value on the … Read more

How do I bind the enter key to a function in tkinter?

Try running the following program. You just have to be sure your window has the focus when you hit Return–to ensure that it does, first click the button a couple of times until you see some output, then without clicking anywhere else hit Return. import tkinter as tk root = tk.Tk() root.geometry(“300×200”) def func(event): print(“You … Read more