Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问一下,如何格式化代码啊 #18

Closed
William-Sang opened this issue Dec 30, 2013 · 7 comments
Closed

请问一下,如何格式化代码啊 #18

William-Sang opened this issue Dec 30, 2013 · 7 comments

Comments

@William-Sang
Copy link

使用 gg=G 没有用

@wklken
Copy link
Owner

wklken commented Dec 30, 2013

插件列表里没有代码格式化相关的....只有语法检查/高亮相关的
python不需要格式化,golang有自带命令,java貌似有插件,不过没关注....其他语言未知

gg=G?
gg回到顶
G到底

这两个不需要改写的吧?

@wklken wklken closed this as completed Dec 30, 2013
@William-Sang
Copy link
Author

gg=G 是默认的自动格式化代码的命令啊。自动调整缩进。

但是现在这里面没法用了。

@wklken
Copy link
Owner

wklken commented Dec 31, 2013

=号被另一个插件占用了......
line 618行附近,用于扩大缩小选择区域的快捷键

注掉即可

因为写python和golang,所以貌似从来木用过这个快捷键 >_<#

@William-Sang
Copy link
Author

不好意思,找了半天没找到,可能是我对这个vim配置还不是太了解。
能把上下文帖一下吗? 谢谢啦~~

@wklken
Copy link
Owner

wklken commented Jan 1, 2014

Bundle 'terryma/vim-expand-region'
map = (expand_region_expand)
map - (expand_region_shrink)

现在的等号是用来扩大选中区域,注掉后gg=G有效的
我回头考虑下有没有个更好的快捷键用来替换

@William-Sang
Copy link
Author

3Q~

@wengych
Copy link

wengych commented Jan 1, 2014

格式化代码还是用indent更好些,可以批量做。

On Wed, Jan 1, 2014 at 12:36 PM, William-Sang notifications@github.comwrote:

3Q~


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-31418536
.

翁翊成

andyt9527 pushed a commit to andyt9527/vim_config that referenced this issue Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants