个人gvim vimrc 简单配置

filetype on
filetype plugin on
syntax enable
syntax on
filetype indent on
colorscheme desert
set noeb
set t_Co=256
set cmdheight=2
set showcmd
set ruler
set number
set cursorline
set cursorcolumn
set whichwrap+=<,>,h,l
set virtualedit=block,onemore
function! CurDir()
        let curdir = substitute(getcwd(), $HOME, "~", "g")
        return curdir
endfunction
set statusline=[%n]\ %f%m%r%h\ \|\ \ pwd:\ %{CurDir()}\ \ \|%=\|\ %l,%c\ %p%%\ \|\ ascii=%b,hex=%b%{((&fenc==\"\")?\"\":\"\ \|\ \".&fenc)}\ \|\ %{$USER}\ @\ %{hostname()}\
set laststatus=2
set autoindent
set smartindent
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set nowrap
set backspace=2
" linux : set guifont=Monospace\ Regular\ 16
set guifont=Consolas:h14
set hlsearch
set incsearch
set mouse=a
set guioptions+=b
set wildmenu
set completeopt-=preview
set foldmethod=syntax
set nofoldenable
nmap cS :%s/\s\+$//g<CR>:noh<CR>
nmap cM :%s/\r$//g<CR>:noh<CR>
set ignorecase                             
set smartcase                                     
" set noincsearch       
set expandtab
set nobackup
set noswapfile
set autoread
set autowrite
set confirm
inoremap jj <Esc>
nnoremap <c-d> yyp
imap <c-a> <Esc>la
imap <c-d> <Esc>o
imap <c-e> <Esc>s

au BufRead,BufNewFile *.sv,*.v,*.svh,*.svi,*.vlib set filetype=systemverilog
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
finish
endif

posted @ 2021-08-28 20:06  大海在倾听  阅读(133)  评论(0编辑  收藏  举报