潘帥的vim配置

本帥帥的gvim配置

前言

入門級,但是反正效果挺炫的!嘻嘻

source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\<cmd'
      if empty(&shellxquote)
        let l:shxq_sav = ''
        set shellxquote&
      endif
      let cmd = '"' . $VIMRUNTIME . '\diff"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
    endif
  else
    let cmd = $VIMRUNTIME . '\diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
  if exists('l:shxq_sav')
    let &shellxquote=l:shxq_sav
  endif
endfunction

"------------------------------------------------------------------------
" below add by panshuai, just for personal setting
"------------------------------------------------------------------------
"g`"set smartindent   "設置智能縮進
"set shortmess=atI "去掉歡迎界面
"colorscheme monokai          "sublime的配色方案

set cursorcolumn             "列高亮
set cursorline               "行高亮
set guioptions-=T            "隱藏工具欄
set guioptions-=m            "隱藏菜單欄

color evening                    "設置背景顏色
set guifont=Consolas:h16     "字體與字號
set tabstop=4                " 設置tab鍵的寬度
set expandtab
set shiftwidth=2             " 換行時行間交錯使用4個空格
set autoindent               " 自動對齊
set backspace=2              " 設置退格鍵可用
set cindent shiftwidth=2     " 自動縮進4空格
set smartindent              " 智能自動縮進
set ai!                      " 設置自動縮進
set nu!                      " 顯示行號

set mouse=a                  " 啓用鼠標
set ruler                    " 右下角顯示光標位置的狀態行
set incsearch                " 查找book時,當輸入/b時會自動找到
set hlsearch                 " 開啓高亮顯示結果
set incsearch                " 開啓實時搜索功能
"set nowrapscan              " 搜索到文件兩端時不重新搜索
set nocompatible             " 關閉兼容模式
set vb t_vb=                 " 關閉提示音
set hidden                   " 允許在有未保存的修改時切換緩衝區
"set list                     " 顯示Tab符,使用一高亮豎線代替
"set listchars=tab:\|\ ,
syntax enable                " 打開語法高亮
syntax on                    " 開啓文件類型偵測
filetype indent on           " 針對不同的文件類型採用不同的縮進格式
filetype plugin on           " 針對不同的文件類型加載對應的插件
filetype plugin indent on    " 啓用自動補全


set nobackup                             " 從不備份
set autowrite                                " 自動保存 
"set hidden                   " 允許在有未保存的修改時切換緩衝區

"gvim 版本爲7.3.46
set encoding=utf-8
"set fileencodings=utf-8,gbk,gb18030,gk2312
"解決菜單亂碼
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解決consle輸出亂碼
language messages zh_CN.utf-8
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章