# 创建 ~/.vimrc
# 添加以下内容
set nocompatible
set history=700
set ruler
set hlsearch
set incsearch
set showmatch
set number
syntax on
set expandtab
set smarttab
set tabstop=4
set softtabstop=4
set autochdir
set autoindent
set smartindent
set cindent
set shiftwidth=4
set tags=tags;
"set tags+=./tags
"set tags+=~/tags
"Remove all trailing whitespace by pressing F5
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
filetype indent on
autocmd FileType python setlocal et sta sw=4 sts=4
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
vim格式配置
于 2023-12-01 10:42:41 首次发布