TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Vim plugin makes Ruby blocks into text objects

83 点作者 subelsky超过 14 年前

7 条评论

burgerbrain超过 14 年前
Stuff like this can usually be handled with a quick macro in Vim.<p>For example, I use the macro `zEkzfggj%jzfG` (minus backticks) to fold everything above and below the current { and it's corresponding C block.<p>And now that I see all of it typed out like that, I'm not sure myself if this is an argument for Vim, or a parody of an argument for it ;)
评论 #2043628 未加载
评论 #2045199 未加载
austintaylor超过 14 年前
An indentation-based text object solves the same problem in a language-agnostic way. There are several implementations out there. I maintain one that includes proper handling of languages without ending block delimiters (python, haml, sass): <a href="http://github.com/austintaylor/vim-indentobject" rel="nofollow">http://github.com/austintaylor/vim-indentobject</a>
aditya超过 14 年前
Nifty, but this seems like plugin overkill.<p>I just use matchit (<a href="http://www.vim.org/scripts/script.php?script_id=39" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=39</a>) and then I can do v% to visually select everything to the end of a block.
评论 #2043611 未加载
评论 #2043671 未加载
lemming超过 14 年前
One of the little things that I love most about IntelliJ is its expand/shrink selection command. It's one of those things that you have no idea how useful it will be until you get used to it, then you can't live without it.
wmwong超过 14 年前
This made me smile. Such a nice Christmas gift. I just started getting into vim and things that solve little nagging annoyances really help me stick with it. Thank you!
kingsidharth超过 14 年前
Anything like this for Python? Any plug-in or built in macro?
chrismealy超过 14 年前
Anybody know an emacs equivalent?