syntax enable
syntax on
set filetype=c "设置默认语言为C
set tabstop=4 "设置tab距离为4
set softtabstop=4
set shiftwidth=4 "换行时行间交错使用4个空格
set expandtab
set cindent "使用C语言的对齐方式
set smartindent "智能对齐方式
set autoindent "自动对齐,使用上一行的对齐方式
set "设置自动缩进
set nocp "使可以使用backspace
set backspace=indent,eol,start "使以前的字符也能使用backspace
set ignorecase "搜索时不区分大小写 set noic为区分
map <C-S> :w <CR> "设置Ctrl+S保存
set ruler "在编辑过程中,在右下角显示光标位置的状态行
set showmatch "设置匹配模式,类似当输入一个左括号时会匹配相应的那个右括号
set incsearch "搜索自动定位
set hlsearch "高亮搜索
set autochdir "自动切换工作目录
set lines=38 columns=135 "设置窗口大小
set cmdheight=1 "设置cmd窗口的大小
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap mm :WMToggle<cr>
map <M-right> <ESC>:bn<RETURN> " right arrow (normal mode) switches buffers (excluding minibuf)
map :bp " right arrow (normal mode) switches buffers (excluding minibuf)
set nobackup
set nocompatible
set number
set ignorecase
set ruler
set lines=40
set columns=160
set autoindent
set nowrap
set hlsearch
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
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
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
colorscheme delek
|