Coder Social home page Coder Social logo

sgryjp / japanese-word-handler Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 7.0 743 KB

Better Japanese word handling on Visual Studio Code.

License: zlib License

TypeScript 96.07% JavaScript 3.93%
cursor-movement japanese japanese-characters visual-studio-code vscode-extension

japanese-word-handler's People

Contributors

dependabot[bot] avatar sgryjp avatar tekezo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

japanese-word-handler's Issues

日本語の助詞を区切り文字とする案

(日本語ですみません)

この間偶然この拡張機能を見つけて以来、便利に使わせていただいています。
ありがとうございます!


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 について言及しておくのもアリなんじゃないでしょうか。


提案だけで申し訳ないです。
よかったらご検討よろしくお願いします!

Is there better way to handle double click selection?

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?

Screenshot

Screencast 2019-08-07 13 46 02

v1.4.0 does not work on local VS Code

command 'japaneseWordHandler.*' not found error will be raised for all japaneseWordHandler commands on local VS Code with Japanese Word Handler v1.4.0.

v1.3.0 works well on same environment.

I guess the migrated web extension is not loaded on local VS Code.

Screen Shot 2021-11-06 at 7 47 34

ReadMeのKeybinding表記

便利に使わせて頂いております
細かい事で恐縮ですが、ReadMeの以下のキーバインドがRightになっていました
japaneseWordHandler.cursorWordStartLeft
japaneseWordHandler.cursorWordStartLeftSelect

Update package.json to ensure extension can run in different extension host setups

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!

deleteWordLeft, deleteWordRight の動作について

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
  • ※1. 空白1個と2個以上で動作が違うことに気がついたので 編集して1列追加しました (03/07)
  • ※2. deleteWordPartLeft は、大文字1文字or小文字or数字の場合は直前の大文字まで、連続する大文字の場合は連続する大文字まで消えるようです (SomeXMLFileName2 → SomeXMLFile → SomeXML → Some )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.