键盘快捷键,用于将RStudio中的选择发送到终端

时间:2018-07-31 16:11:09

标签: r rstudio keyboard-shortcuts

我正在寻找键盘快捷键,而不是控制台(如RStudio中标记的)发送到终端

例如,我想跑步 $ Rscript hello_world.R

Ctrl+Enter允许我从控制台运行source("hello_world.R"),但是我正在Rmd文档中使用bash和python块,所以我希望能够在不启动单独的源代码编辑器的情况下运行它们。

1 个答案:

答案 0 :(得分:2)

尝试void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'My app title', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new MyHomePage(), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key}) : super(key: key); @override _MyHomePageState createState() => new _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; @override Widget build(BuildContext context) { return new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '$_counter', style: Theme.of(context).textTheme.display1, ), ], ), ); } } ,我想这就是您想要的。

相关问题