Download script for Vim extension in VSCode - visual-studio-code

I'm using the Vim extension in VSCode. In C++, I can indent blocks of code with the >i{ and >a{ commands. This can't be done in Python, as it uses indentation instead of brackets to delimite blocks of code. However, I found that it can be achieved by downloading this script for Vim. The site says it has to be unpacked "in the vim runtime directory". Where is this directory in the case of the Vim extension?

Related

Command-Line Question.. I recently used start atom filename.txt to open a file in atom from my command-line

However I want to open other programs in the command-line, for example I tried sublime 3 and I got an error.
My question is where do you find what is the correct spelling for the programs we desire to work within the command-line?
The correct spelling for Sublime text is subl. I just googled "sublime text open from command-line".
Not all programs have command-line equivalents. For example I know Visual Studio Code installs the code command. But for a simpler editor like TextEdit you would need to use open.

VS Code Go to Matching Pair Command

This command won't work for me. I had installed the Visual Studio Keymap, but when I uninstalled that it made no difference. If I open Keyboard Shortcuts and try customizing it to some other keybinding, still nothing. I open the simplest javascript folder/file (folder with a single .js file) to test, simply putting the cursor on either side of the parens in console.log('hi');
Version is 1.28.2 (latest). The only other extensions I have installed are Debugger for Chrome & ESLint.
editor.action.jumpToBracket is what you want for .js files, Ctrl-Shift-\.
The "Go to matching pair" command: editor.emmet.action.matchTag is for html files.

Powershell ISE variable highlighter

Is there any add-ons for Powershell ISE where you can highlight any occurrence of the variable or any word? Something like Sublime Text has?
The ISE doesn't have support for add-ons, but Visual Studio Code does (and there's lots of good ones). It also has much better built-in syntax highlighting and Git support (if Git is installed). You'll need to install the PowerShell extension from the "extension marketplace" (just search for "PowerShell"). Also, Microsoft has said that they're not planning to continue maintenance of ISE, so VS Code is probably what you should be using to write PowerShell.
The ISE was not highlighting any keywords/syntaxes, for me the issue was with the file extension, the PS script file extension was inadvertently set to .ps, when I renamed it to have .ps1 extension, all the syntax highlighting revived. Hope this helps others.

Using Powershell ISE's intellisense in other terminal

I'm a big fan of powershell ISE as a terminal. It has intellisense and syntax highlighting built in the shell and I just use it instead of the regular shell for everyday commands.
I would like to use Visual Studio Code instead, because the editor is much more powerfull and has support for a whole lot of languages and format. However the integrated shell is you basic Powershell terminal : no intellisense, no coloring (even with Powershell 5 installed on my computer).
Is there any way to add intellisense and coloring to my terminal, or use ISE's terminal in VSCode? or is there a plugin somewhere adressing these issues?
The integrated PowerShell terminal on Visual Studio Code does have intellisense, so I'm unclear what you require here, are you sure it's not set to cmd.exe instead ?
On another note, follow this setup guide. In case you haven't already installed the PowerShell Extension.

External editor for IPython notebook

I am using IPython notebook and I want to edit programs in an external editor.
How do I get the %edit file_name.py to open an editor such as Notepad++.
Running %edit? will give you the help for the %edit magic function.
You need to set c.TerminalInteractiveShell.editor, which is in your ipython_config.py. I'm not quite sure where this is located in Windows; on OS X and Linux, it is in ~/.ipython. You'll want to set the variable to be the full path of the editor you want.
Alternatively, you can create an environment variable EDITOR in Windows itself, and set that equal to the full path of the editor you want. iPython should use that.
I'm using Windows 7 and 8 (and 10TP) and Python 3.4.2.
I started with ipython locate to tell me where ipython thought config files suggested elsewhere should be. When I saw it was different I read around and came up with the following:
On my system, the ipython locate gave me c:\users\osmith\.ipython, not the _ipython you'll see mentioned in the YouTube videos done with Windows XP,
Look in the directory ipython locate specifies for a profile directory; if you aren't actively doing anything with ipython profiles, it should be .ipython\profile_default, if you are using profiles, then I leave it to you to s/profile_default/${YOUR_PROFILE_NAME}/g
Check the profile_default directory for a ipython_config.py file, if it's not there, tell IPython to initialize itself: ipython profile create
Open the config file in a text editor,
If you are the kind of person who hasn't messed around with their console overly much and installs things in standard places, you can skip straight to this step by typing: ipython profile create followed by start notepad .ipython\profile_default\ipython_config.py.
Search for the string c.TerminalInteractiveShell.editor,
The comment above this indicates you can also use the EDITOR environment variable, but hard coding file paths never hurt anyone so lets do eet:
Copy the line and remove the leading hash and spaces from the copy.
Replace the text between the apostrophes ('notepad') with the path of our desired editor, e.g.
c.TerminalInteractiveShell.editor = 'c:/program files (x86)/noddyeditor/noddy.exe'
There is a catch here, though; some modern editors get a bit fancy and automatically and, when invoked like this, detach from the console. Notepad++ and Sublime Text, for example. Sublime accepts a "--wait" option, which works some of the time; this tells the command invocation to hang around until you close the file, for some definition of until and some other definition of close.
However, the following setting will work most of the time for sublime text:
c.TerminalInteractiveShell.editor = '"c:/program files/sublime text 3/subl.exe" --wait'
(assuming c:\program files\ is where your sublime text 3 directory is)
Try the 'Pycharm' editor
This works for me.