If you didn't know, you can customize the terminal for VScode. In my case, I wanted to use cmder because Windows terminals suck; both of them cmd and powershell.
Fortunately, cmder has a guide for integrating it to VScode.
The interesting thing is when I tried using it with my Python workflow which includes virtual environements via Pipenv and I ran into a couple of problems.
Problem #1 Missing posh-git
Symptom Spits out a warning telling you that you are missing posh-git - 'Install-Module posh-git' and restart cmder"
Fix #1 Run from the admin level PShell: Install-Module posh-git
You might also get a error saying it might have an overlap with some other extension like say 'TabExpansion'.
Fix #2 Either run Fix#1 with the -AllowClobber or -Force option OR run it with a -Scope option: Install-Module posh-git -Scope CurrentUser
----
Problem #2 FunctionNotWritable (Cannot write to function prompt..)
Symptom Spits out the error; Also notice that your terminal prompt isn't prefixed by the activated virtual environment. Only happens when your doing Python with virtual environments.
Fix #1 Remove or comment out the -Options ReadOnly option on the cmder profile.ps1. Details here.
Blog. Repository of ideas/solutions. Web Developer. Data Labandero. Python. TypeScript. Dart. Flutter apps. VB6 free since 2003!
Showing posts with label vscode. Show all posts
Showing posts with label vscode. Show all posts
Wednesday, April 10, 2019
Troubleshooting Cmder Terminal in Visual Studio Code
Labels:
Installing,
python,
troubleshooting,
virtualenv,
vscode
Thursday, September 14, 2017
VS Code with code ligatures
Code ligatures are these cool things I just found out about recently that replace text to symbols. For example: '!=' turns into '!='. That pretty cool.
Now, if you're not seeing the equal symbol with a slash across it, that just means you haven't installed correct font for code ligatures - FiraCode. Click here for install instructions.
With the font installed, time to activate this for VS Code, you'll have to modify your settings.json - either your users or your workspaces settings.json.
FYI, most editors and IDEs are supported except for a few; most notable are Eclipse and Sublime which are not supported yet. Huh....
To open settings.json, from the File menu choose Prefereneces, Settings or use the keyboard shortcut Ctrl +,. Add these lines and restart VS Code.
You might have to wrap the "Fira Code" font with extra apostrophes like
Read up more about code ligatures.
Now, if you're not seeing the equal symbol with a slash across it, that just means you haven't installed correct font for code ligatures - FiraCode. Click here for install instructions.
With the font installed, time to activate this for VS Code, you'll have to modify your settings.json - either your users or your workspaces settings.json.
FYI, most editors and IDEs are supported except for a few; most notable are Eclipse and Sublime which are not supported yet. Huh....
To open settings.json, from the File menu choose Prefereneces, Settings or use the keyboard shortcut Ctrl +,. Add these lines and restart VS Code.
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.fontLigatures": true
You might have to wrap the "Fira Code" font with extra apostrophes like
"'Fira Code'".if it doesn't work.
Read up more about code ligatures.
Labels:
Code Editor,
programming,
vscode
Friday, May 5, 2017
Ghetto Python development with VS Code
Not everyone can afford Pycharm or Sublime or you just don't like the new Pycharm terms/license then this could be a alternative setup with Visual Studio Code.
Code away!
- Install Visual Studio Code. It's has all the "f"s: fast, free, flexible, fowerful.
Don't forget to install Python also.
Tip: Install Python 3 unless you're maintaining legacy Python code then install Python 2. - Pick our plugins for Python. You can install plugins or extensions from the within VS Code; Just click on the "Extensions" button on the side menu or you can download them from the "marketplace" and install them manually. Go here for details.
Here's our list of extensions. - donjayamanne.python - our primary plugin so we can work with Python. It's got almost all the things we'd expect to make for a good Python IDE; Intellisense, Code formatting, refactoring, debugging, and linting.
EDIT: I think this has been rolled into the official Python plugin by Microsoft.
A word on linting though, The plugin doesn't come with it. You'll have to install your linting module like say Pylint or Flake 8 separately via pip. - Indent-raindow - Trust me, you'll need this. It makes seeing the code indents easier.
- Jinja - This is an optional plugin. You'll probably only need this if you're working with a lot of Jinja templates.
Don't forget to explore the marketplace for other customisations like themes. - Start coding. Don't forget to make a virtual environment because VSCode does support them on a per project bases via a settings JSON file. Same with debugging.
- Push to a repo. VSCode already has a git client built-in so push your code to popular repos like Github, Gitlab or Bitbucket.
Labels:
django,
programming,
python,
vscode
Subscribe to:
Posts (Atom)