Vim converts the end format of the file line

Source: Internet
Author: User
Vim converts the end-to-end format of a file to the end of a line in a different system. sometimes we write scripts in a windows system or a unix system, and then replace different system scripts may become invalid. For example, if a python script is used, change the header program path to a unix version #! /Usr/local/bin/python3 according... vim converts the end-to-end format of a file to the end of a line in a different system. sometimes we write scripts in a windows system or a unix system, and then replace different system scripts may become invalid. For example, if a python script is used, change the header program path to a unix version #! /Usr/local/bin/python3 still reports an error-bash :. /getUsingWord. py:/usr/local/bin/python3 ^ M: bad interpreter: No such file or directory. It is easier to use vim to modify the line tail format. Unix to windows: w: setl ff = dos (or: setlocal fileformat = dos): wwindows to unix: w: setl ff = unix (or: setlocal fileformat = unix ): w batch conversion: args filenames *. py *. c: argdo setl ff = dos | update
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.