Comments (7)
Hey, I just stopped by to leave the same issue. It's possible he's talking about another vim plugin, but it definitely breaks VSCodeVim.
from vsc-python-indent.
VS code python indent
I believe that's my extension :)
@above-c-level or @ryanrca, could one of you give me a step-by-step instructions for reproducing? I've not used the vim plugin before.
from vsc-python-indent.
Yeah no problem! Basically when using vim, you can normally do :w
or :wa
(colon puts vim into command mode, w means write, a means all), hit enter, and your file(s) is/are saved. For some reason though, vim no longer seems to accept hitting enter in command mode while this plugin is activated, which is necessary for normal operation. Hope this helps
from vsc-python-indent.
Try this. Start with a fresh install of VSCode.
- Install vim plugin
- Install python plugin
- Open a python file
- Edit it: (click
i
for insert mode, type# test 1234
. clickesc
a couple times to exit insert mode) - open dev tools ( Help | Toggle Developer Tools). Go to "console' and clear the console.
- Save the python file (
:w<enter>
)
See nothing in the dev tools error console. Observe the file is saved to disk.
- Install Python indent plugin.
- Make another edit to a python file
- Try to save the file (
:w<enter>
)
See the stack trace in the dev tools error Console. Observe the file is NOT saved to disk.
- Disable Python Indent plugin.
- Make another edit to a python file
- Save the file (
:w<enter>
)
See nothing in the dev tools error console. Observe the file is saved to disk.
from vsc-python-indent.
Thanks for leaving an issue! Could you specify which vim plugin you are talking about?
from vsc-python-indent.
Thanks for leaving an issue! Could you specify which vim plugin you are talking about?
VS code python indent
from vsc-python-indent.
EDIT: This should be resolved in versions v0.7.0 and above, please try upgrading. If the issue persists, please open a new issue.
Thanks for the descriptions!
The problem is that this extension sets the Enter
key as a keyboard shortcut, and when the Vim plugin is not in Insert
mode, overriding the Enter key means you can't send commands.
In VSCode, you can refine the conditions of when a shortcut will fire, and I can do that for when vim.mode == 'Insert'
, but this breaks the keyboard when the user does not have the Vim extension installed. As far as I can tell, the when
syntax of keyboard shortcuts does not support checking for the existence of a vim.mode
variable first.
I'm going to file an issue with the Vim extension to see if we can get a good solution in place.
As a workaround in the meantime, you can edit your own conditions:
- Have both the Vim extension and the python indent extensions installed
- Open up the keyboard shortcuts page (Ctrl-k Ctrl-s on linux/windows, ⌘-k ⌘-s on Mac)
- Use the top bar to search for "pythonindent" (no space)
- Right click the
pythonIndent.newlineAndIndent
row (should be the only row) - Select "Change When Expression"
- Add
&& vim.mode == 'Insert'
to the end of the expression.
from vsc-python-indent.
Related Issues (20)
- install extension offline, not compatible version HOT 1
- Extension causes high cpu load HOT 2
- Maybe adjust behavior of useTabOnHangingIndent? HOT 1
- keepHangingBracketOnLine doesn't seem to be working for square brackets HOT 3
- Automatic dedent for return doesn't always work HOT 13
- One space get inserted HOT 1
- # region Description invalid
- Connection to server got closed. Server will not be restarted. HOT 2
- Fail to generate Indentation for a specific file and code copied from that file HOT 1
- Causes big lags in the editor HOT 2
- Connection to server got closed. Server will not be restarted HOT 1
- Enter doesn't work HOT 4
- Enter button not working fine
- Input lag on Keyboard key
- There is no formatter for 'python' files installed
- Extreme lag from pressing Enter to action when extension is running in remote (ssh) host. HOT 6
- multiple indent blank lines will not clear white space before line HOT 2
- Highlighting ` *` and pressing enter doesn't do anything. HOT 1
- python Indentation of the current line is automatically reduced after line wrap HOT 2
- Add extra 3 whitespaces when add new line and broke indent HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsc-python-indent.