崇高的文字 word_separator CamelCase [英] Sublime text word_separator CamelCase

查看:25
本文介绍了崇高的文字 word_separator CamelCase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sublime text word_separator 是:

The sublime text word_separator is:

"word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?",

我还希望将 CamelCase 中的大小写更改视为更改.有没有设置/方法可以做到这一点?

I would also like case change in CamelCase to be considered change. Is there a setting/way to do this?

(例如在 FooBar ctrl+bck_space 应该只删除 Bar).

(Eg in FooBar ctrl+bck_space should delete only Bar).

推荐答案

如果有人还在看这个...

In the event anyone is still looking at this...

在您的默认键绑定中,您会发现:

In your default keybindings you'll find:

{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true} },
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },

{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },

使用 alt+direction 将按子词"移动,而不是词",后者考虑了驼峰式大小写.我更喜欢默认设置,所以我将 alt+direction 设置复制到我的用户键绑定中,并用 ctrl 替换了 alt 的实例.瞧, ctrl+direction 由驼峰命名以及定义的单词分隔符移动.

Using alt+direction will move by "subwords" as opposed to "words", which takes into account camelCase. I prefer that over the default so I've copied the alt+direction set into my user keybindings and replaced the instances of alt with ctrl. Voila, ctrl+direction moves by camelCase as well as the defined word separators.

另外,我不确定使用 subwords 设置是否会考虑下划线,我总是在单词分隔符中添加 _ 以确保.

Also, I'm not sure if using the subwords setting will take into account underscores, I've always added _ to the word separators just to make sure.

这篇关于崇高的文字 word_separator CamelCase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆