question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run Selection/Line in xxx be more smart?

See original GitHub issue

When we execute the command of Run Selection/Line in xxx, it only executes either the current line if nothing is selected or the selection. For example:

dtypes = {
    'date' : 'str',
    'item_code' : 'category',
    'branch_code' : 'category',
    'sale_qty' : 'float',
    'sale_val' : 'float',
    'return_qty' : 'float',
    'return_val' : 'float'
}

When I put my cursor at the first line, it would attempt to run dtypes = { only. But in the other IDEs such as RStudio, it’s a little smart, it intelligently knows that the current line is part of a multiline statement and runs the whole statement.

Thanks.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:24
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
andycraigcommented, Nov 19, 2022

I’d love this block-detection functionality so I’m going to have a try at creating an extension to provide it. My plan is to use the Python Extension Template and make it compatible with both the VS Code Jupyter and VS Code Python extensions.

In the meantime, if there’s any move towards providing this functionality within the VS Code Jupyter or VS Code Python extensions themselves, please let me know as I’d very happily leave it to the pros!

3reactions
cbrnrcommented, Apr 5, 2022

This would be a great feature. FWIW, maybe looking at how other extensions do it might help. For example, the Julia extension uses Shift+Enter, and the R extension uses cmd+Enter to run multiline statements without any selection.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-line statements support for Python code · Issue #9014 · rstudio ...
It would be really great to have RStudio support of multi-line statements ... Run Selection/Line in xxx be more smart? microsoft/vscode-python#18105.
Read more >
Troubleshoot Smart Licensing on Catalyst Platforms - Cisco
This document describes how to work with Cisco Smart Licensing (cloud-based system) to manage software licenses on Catalyst switches.
Read more >
Smart DFSORT Tricks - IBM
SELECT FROM(DATA) TO(EQ5) ON(5,8,CH) EQUAL(5). * Put records with more than 3 occurrences (of the key) in GT3, and. * records with 3...
Read more >
Overview — Spyder 3 documentation
Working directory selection. Command line options. Run in Current/dedicated/external console choice. Automatically clear variables or enter debugging.
Read more >
Verifying a Smart Contract - Blockscout
To learn more about the smart contract verification Rust microservice and ... Compiler: derived from the first line in the contract pragma solidity...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found