English 中文(简体)
六. 避免工作不当
原标题:vim indentation correction not working correctly
  • 时间:2010-08-19 22:07:39
  •  标签:
  • linux
  • vim

• 在线末没有标注的情况下,使用方案拟订语言的电动文档; 在我试图战胜.时,这会造成问题。 如果我这样说的话,那么到底,我们就能够正确确定这一缺陷,但是,由于这一方案规划措辞没有意义;在发言结束时,在努力加以纠正之后,退步是正确的。

该守则格式正确:

if imageFound("foo.bmp")
{
    clickButton("button1.bmp")
    clickButton("button2.bmp")
}

如果我确实=G,那就将变成这种情况,那是不正确的:

if imageFound("foo.bmp")
{
    clickButton("button1.bmp")
        clickButton("button2.bmp")
}

然而,如果我说一句话的话;在一行的末尾,这条线的底下将正确格式。

if imageFound("foo.bmp")
{
    clickButton("button1.bmp");
    clickButton("button2.bmp")
}

我怎么能够正确确定格式,而不必作一番改动?

最佳回答

<代码>:c cindent cinoptions=+0。

问题回答

暂无回答




相关问题
Autoupdate VIM Plugins?

Is it possible to update vim plugins automatically?

how to unindent in vim without leaving edit mode?

I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

Vim - Deleting XML Comments

How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...

Limiting a match in vim to certain filetypes?

I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

热门标签