Vim Configuration and Tab Inconsistency Between Vim and Notepad++

General

A completed configuration can be installed by running this

git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh

If you want to add some customized configurations,

vim ~/.vim_runtime/my_configs.vim

Some sample configuration of your vim

set shiftwidth=4             " used by >>, << and tab.
set tabstop=4                " number of space characters used when displaying TAB
set expandtab                " replace TAB by spaces
set softtabstop=4            " will erase 4 spaces at once when using BS in the begining of lines only

If this is an existed file, you might run this to sort out your file

:%retab

Python

C

Vim and Notepad++ Inconsistency

To solve the inconsistency, you might want to use

:%s/        /    /g

发表评论

zh_CN简体中文