代码之家  ›  专栏  ›  技术社区  ›  StudioTime

自动搜索macOs自动补全-VS代码

  •  0
  • StudioTime  · 技术社区  · 4 年前

    在Windows上的Visual Studio Code中使用搜索功能时,当我在搜索文本框中键入时,它会自动完成搜索。在macOS上,我必须按enter键才能进行搜索。

    有没有办法在macOS上的VS Code中打开自动搜索的自动补全功能?

    我现在在大苏尔。2019年MBP 16英寸。

    enter image description here

    1 回复  |  直到 4 年前
        1
  •  1
  •   Gino Mempin Brijesh Sondarva    4 年前

    也许你有 searchOnType 设置为 false 在你的Mac上。

    // Search all files as you type.
    "search.searchOnType": true,
    
    // When #search.searchOnType# is enabled, controls the timeout in 
    // milliseconds between a character being typed and the search 
    // starting. Has no effect when search.searchOnType is disabled.
    "search.searchOnTypeDebouncePeriod": 300,
    

    enter image description here

    它被添加为 1.41 release(确保至少有此版本):
    https://code.visualstudio.com/updates/v1_41#_update-search-results-as-you-type

    在全文搜索中,结果现在将随着您的键入而更新。这在构建复杂的正则表达式查询等场景中特别有用,在这些场景中,对查询的快速反馈可以帮助您编写RegEx。

    注: :可以通过设置禁用此功能 search.searchOnType 错误的 ,并且可以通过以下方式调整键入和搜索之间的延迟 search.searchOnTypeDebouncePeriod ,默认为300ms。