sgryjp / japanese-word-handler Goto Github PK
View Code? Open in Web Editor NEWBetter Japanese word handling on Visual Studio Code.
License: zlib License
Better Japanese word handling on Visual Studio Code.
License: zlib License
especially in visual mode. if so, moving cursor when selecting words will be much more handy.
(日本語ですみません)
この間偶然この拡張機能を見つけて以来、便利に使わせていただいています。
ありがとうございます!
Japanese Word Handler を見つける前は、設定の editor.wordSeparators
に日本語の助詞になるひらがな「てにをはがのともへでや」を区切り文字として設定していました。
参考:https://qiita.com/yokarikeri/items/d6d9bb1e4f55869395af#-%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E8%A8%AD%E5%AE%9A-%E3%81%9D%E3%81%AE%E4%BB%96
「て」などのひらがなを問答無用で区切り文字にするので、例えば「すべての」が「すべ/て/の」になってしまうのが難点ですが、ひらがなの連続に区切りが入ったり、ダブルクリックでも多少分割されるようになったり、結構便利です。
例えば、「分割されるようになったり」は「分割されるよう/に/なったり」と分割されます。
Japanese Word Handler と併用することで、「分割/されるよう/に/なったり」と分割されるようになります。
そこで提案なのですが、拡張機能の側から editor.wordSeparators
に文字を加えたりすることはできないのでしょうか?
ちょっと強引な方法ではあるのでオプションにした方がよさそうですが、もし拡張機能を入れただけでこの助詞での分割が可能になるなら、かなり便利なのではないかと思います。
もし制限などがあって使えない場合であっても、README に editor.wordSeparators
について言及しておくのもアリなんじゃないでしょうか。
提案だけで申し訳ないです。
よかったらご検討よろしくお願いします!
This is question issue.
I want to fix selection range when double click.
I tried to fix this using registerHoverProvider()
+ onDidChangeTextEditorSelection()
.
https://github.com/sgryjp/japanese-word-handler/compare/master...tyru:handle-double-click?expand=1
But that has the problem:
registerHoverProvider()
handler is not called so frequently, it doesn't update mouse position when moving mouse quickly.
And question is:
I wonder if event has a mouse position, or any other better workaround for this 🤔
Do you know that?
japanese-word-handler cannot be used on web services such as GitHub Cocespaces and vscode.dev because it is not a web extension. To make it possible, it should be changed into a web extension.
Codespaces で使えない理由の一つになっているので、通常の Extension から Web Extension にマイグレーションする。
便利に使わせて頂いております
細かい事で恐縮ですが、ReadMeの以下のキーバインドがRightになっていました
japaneseWordHandler.cursorWordStartLeft
japaneseWordHandler.cursorWordStartLeftSelect
Hi! I'm from the VS Code team, and we'd like to ensure Japanese Word Handler can run in the different extension host setups VS Code currently supports. I've found that the current definition of extensionKind
for your extension is too restrictive.
The extension has the extensionKind
set to ["ui"]
: https://github.com/sgryjp/japanese-word-handler/blob/master/package.json#L17. This defines that the extension can only run in the VS Code desktop extension host.
However, this extension can also run on the workspace extension host (which is used for remote scenarios) since it doesn't have any dependencies on the desktop extension host. It'd also be great to enable it for Codespaces web.
Thus, to ensure your extension can run properly across setups, we'd recommend to change the extensionKind to "extensionKind": ["ui", "workspace"]
. More information about extensionKind
can be found here.
Please let me know if you have questions - I'm happy to help clarify anything. Thank you!
If cursor is at first line and there are only WSPs before there, moving a word back (Ctrl+Left) will cause hung-up.
VS Code のデフォルトで設定できる項目を見ると、
下記のような設定/動作となっているようなのですが、
JapaneseWordHandler は いま それぞれ 1, 2 に対応している状態に見えます。
3, 4 にも対応することは可能でしょうか?
# | 設定 | 空白1個手前から消したとき ※1 | 空白2個以上手前から消したとき | 単語の途中から消したとき |
---|---|---|---|---|
1 | deleteWordStartLeft | 空白の前の単語も消える | 空白の前の単語も消える | 単語だけ消える |
2 | deleteWordEndLeft | 空白だけ消える | 空白だけ消える | 単語の前の空白も消える |
3 | deleteWordLeft | 空白の前の単語も消える | 空白だけ消える | 単語だけ消える |
4 | deleteWordPartLeft | 空白だけ消える | 空白だけ消える | 単語だけ消える ※2 |
# | 設定 | 空白1個手前から消したとき ※1 | 空白2個以上手前から消したとき | 単語の途中から消したとき |
---|---|---|---|---|
1 | deleteWordStartRight | 空白だけ消える | 空白だけ消える | 単語の後の空白も消える |
2 | deleteWordEndRight | 空白の後の単語も消える | 空白の後の単語も消える | 単語だけ消える |
3 | deleteWordRight | 空白の後の単語も消える | 空白だけ消える | 単語だけ消える |
4 | deleteWordPartRight | 空白だけ消える | 空白だけ消える | 単語だけ消える ※2 |
deleteWordPartLeft
は、大文字1文字or小文字or数字の場合は直前の大文字まで、連続する大文字の場合は連続する大文字まで消えるようです (SomeXMLFileName2 → SomeXMLFile → SomeXML → Some )A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.