Vim highlight whitespace at end of line and auto delete them

Source: Internet
Author: User
Tags git clone

Install Vundle.vim

    1. mkdir ~/.vim/bundle
    2. git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/vundle.vim
    3. Create. VIMRC If it is not exist. Add the following setting into. vimrc
1Set nocompatible"Be improved, required2FileType off"Required3 4 "set the runtime path to include Vundle and initialize5Set rtp+=~/.vim/bundle/Vundle.vim6 Call Vundle#begin ()7 8 "Let Vundle manage Vundle, required9Plugin'Gmarik/vundle.vim'Ten  One "All of your Plugins must is added before the following line ACall Vundle#end ()"Required -FileType plugin indent on"Required

Install Vim-better-whitespace Git:https://github.com/ntpeters/vim-better-whitespace

Add:plugin ' Ntpeters/vim-better-whitespace ' to. VIMRC between Vundle#begin () and Vundle#end ()

' Ntpeters/vim-better-whitespace '

Then rum vim::P lugininstall

If you want to auto delete whitespace if can add the following cmd into your. VIMRC

Autocmd Bufwritepre * Stripwhitespace

Vim highlight whitespace at end of line and auto delete them

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.