標籤:vim
【vim配置】.vimrc
set nocompatibleset enc=utf-8"-show line number"set number"-enable filetype pluginfiletype plugin onset history=500syntax onset autoindentset smartindent"-show brackets matchset showmatch"-show statusset ruler"-close highline match"set nohls"-enable quick searchset incsearch"-enable paste modeset paste"set tabstop=4set ts=4"set shiftwidth=4set sw=4"set expandtabset etif has("autocmd")filetype plugin indent onendifautocmd filetype python setlocal et sta sw=4 sts=4"-smart append title by file typefunc SetTitle()if &filetype == ‘sh‘call setline(1, "\#!/bin/bash")call append(line("."), "\# ")call append(line(".")+1, "")elsecall setline(1, "\#!/usr/local/bin/python3")call append(line("."), "\# ") call append(line(".")+1, "")endifendfuncautocmd BufNewFile *.py,*.sh exec ":call SetTitle()""-go to the end of fileautocmd BufNewFile * normal G"-press F2 to delete empty linennoremap <F2> :g/^\s*$/d<CR>
【vim配置】.vimrc