/SearchWithCursor

Search with cursor from VS Code.

Primary LanguageTypeScript

↖️ Search with cursor

https://marketplace.visualstudio.com/items?itemName=hasefumi23.search-with-cursor Build Status The MIT License

This extension can easily search with cursor.

🔧 Feature

This extension is very simple. The behavior is depends on the line on which cursor. There are three behaviors.

  • Search with selected text.
  • Search with text of the line on which cursor.
  • In the case the empty line, just open the browser(Google).

If text has valid URL, open website directly, otherwise https://www.google.com/search?q=${text}.

Available command

Available Command is only search with cursor.

Shortcut

Windows Mac
Shift + alt + s Shift + option + s

feature

Search with cursor settings

These settings are specific to search-with-cursor.

Setting Description Type Default Value
searchWithCursor.customSearchEngine Search engine. string https://www.google.com/search?q=%s

📝 Release Notes

0.1.4

Add configuration searchWithCursor.customSearchEngine. It replace search engine. Default value: https://www.google.com/search?q=%s %s will be replaced selected text.

0.1.2

Enhance matching logic for url.

  • Use raw RegExp instead of url-regex(it matches localhost:8080 and url in markdown syntax).
  • Use encodeURIComponent.

0.1.1

Change the condition of direct access from exact match to including.

0.1.0

Initial release.

License

MIT