Resolves an issue in which the go code is saved when using the Vim-go plugin to cause a set collapse to disappear

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

I used to use vim to edit the Python code, the folding function is no problem

Later, when I edited the Go code, I found that I saved, collapsed all disappeared , I am puzzled, I infer that it is related to the plugin I use, because I save the time will trigger the GOFMT plug-in format code, but it was lazy did not continue to trace down.

Today, a colleague asked me about the problem of folding in vim, I think again, and then prepare to completely solve this problem, first in Chinese search, no results, are the basic use of vim folding. There is no way to use my crappy English to Google search, sure enough, on GitHub vim-go issues inside found, and then saw the author to solve the problem of the code, and then go to my fmt.vim inside to correspond, found an option!

Simply add the following configuration to the VIMRC configuration file, and you will be able to use the folding as usual.

1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.