'编辑范围内的所有内容'在VS代码中

时间:2017-08-16 23:24:19

标签: xcode visual-studio-code

如何重命名当前范围内所有出现的变量。我在文档中有其他变量名称相同,但我只想重命名特定函数中的变量

2 个答案:

答案 0 :(得分:1)

对于Windows上的VS代码,您可以按F2或右键单击并选择“重命名符号”。

答案 1 :(得分:0)

'重命名符号'也出现在mac中,我猜它的工作方式相同。但是,找到它并不直观,因为您只需在大多数Mac应用程序中按#!/usr/bin/env php <?php require_once (\dirname(__FILE__).'/../vendor/autoload.php'); // Making coverage according to https://github.com/sebastianbergmann/php-code-coverage $filter = new \SebastianBergmann\CodeCoverage\Filter(); $filter->addDirectoryToWhitelist(\dirname(__FILE__).'/../src'); $filter->removeDirectoryFromWhitelist(\dirname(__FILE__).'/../vendor'); $coverage = new \SebastianBergmann\CodeCoverage\CodeCoverage(new \SebastianBergmann\CodeCoverage\Driver\Xdebug(), $filter); /** * Creates the code coverage. * NOTE! Behat calls the function exit (indirectly). So we have to make the coverage report in a function which * is fired on exit. */ function ____on_behat_shutdown____() { global $coverage; $coverage->stop(); $writer = new \SebastianBergmann\CodeCoverage\Report\Html\Facade; $writer->process($coverage, \dirname(__FILE__).'/../var/code-coverage-report'); } register_shutdown_function('____on_behat_shutdown____'); $coverage->start('myproj'); require_once(\dirname(__FILE__).'/../vendor/behat/behat/bin/behat'); 即可找到您要查找的命令。在VS Code中,您可以在“托盘”中找到您的命令