注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

xiaozhuge0825的博客

 
 
 

日志

 
 

vim php 开发配置文件  

2010-12-27 11:07:08|  分类: vim编辑器 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the
" following enables syntax highlighting by default.
if has("syntax")
	syntax enable
	syntax on
endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
"  filetype plugin indent on
"endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd		" Show (partial) command in status line.
"set showmatch		" Show matching brackets.
"set ignorecase		" Do case insensitive matching
"set smartcase		" Do smart case matching
"set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make
"set hidden			 " Hide buffers when they are abandoned
"set mouse=a		" Enable mouse usage (all modes)
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif
"You can obtain the completion dictionary file from:
"  http://cvs.php.net/viewvc.cgi/phpdoc/funclist.txt
set dictionary-=$VIM/funclist.txt dictionary+=$VIM/funclist.txt
set dictionary-=$VIM/javascript.txt dictionary+=$VIM/javascript.txt
set dictionary-=$VIM/mysql.txt dictionary+=$VIM/mysql.txt
"Use the dictionary completion
set complete-=k complete+=k
"Auto completion using the TAB key
"This function determines, wether we are on
"the start of the line text(then tab indents)
"or if we want to try auto completion
function! InsertTabWrapper()
	let col=col('.')-1
	if !col || getline('.')[col-1] !~ '\k'
		return "\"
	else
		return "\"
	endif
endfunction
"Remap the tab key to select action with InsertTabWrapper
inoremap  =InsertTabWrapper()
"let g:SuperTabRetainCompletionType=2
"let g:SuperTabDefaultCompletionType=""
"记录光标位置
"au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
"let g:winManagerWindowLayout='FileExplorer|TagList'
"nmap wm :WMToggle
"输入法
let g:vimim_www_sogou = 1
let g:vimim_custom_lcursor_color=1
"字体
"set guifont=Bitstream_Vera_Sans_Mono:h10:cANSI
"set gfw=Yahei_Mono:h10.5:cGB2312
"检测文件类型
filetype on
"快速打开文件
"map ^O :browse confirm e^M
"快速创建新文件
"map ^N :confirm enew^M
"---------------javascript------------------
"autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
"let b:javascript_fold=1
"let javascript_enable_domhtmlcss=1
"设置javascriptlint
"---------------javascript------------------
"配色
" Avoid clearing hilight definition in plugins
if !exists("g:vimrc_loaded")
   if has("gui_running")
	  set guioptions-=T "隐藏工具栏
   else
	  colorscheme desertEx
   endif " has
endif " exists(...)
"set background=dark
"显示行号
"set nummber
set nu
"代码折叠
set fdm=indent
" 设置编码
set enc=utf-8
" 设置文件编码
set fenc=utf-8
" 设置文件编码检测类型及支持格式
set fencs=ucs-bom,utf-8,chinese
"缩进相关
set cindent
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
set shiftwidth=4
set tabstop=4
set softtabstop=4
" ambiwidth 默认值为 single。在其值为 single 时,
" 若 encoding 为 utf-8,gvim 显示全角符号时就会
" 出问题,会当作半角显示。
set ambiwidth=double
set autoread				" 自动重新加载外部修改内容
set autochdir			   " 自动切换当前目录为当前文件所在的目录
"No bell settings {{{
set noerrorbells
set visualbell
"No bell settings End }}}
"在编辑过程中,在右下角显示光标位置的状态行
"set ruler
"set nolinebreak			 " 在单词中间断行
" 在状态栏显示目前所执行的指令,未完成的指令片段亦
" 会显示出来
"set showcmd
set wrap					" 自动换行显示
"CmdLine settings {{{
set cmdheight=1			 " 设定命令行的行数为 1
set laststatus=2			" 显示状态栏 (默认值为 1, 无法显示状态栏)
"
"显示匹配括号
set showmatch
"自动缩排
set ai
"搜索不分大小写
set ic
"标识关键字
set hls
" Line highlight 設此是游標整行會標註顏色
"set cursorline
" Column highlight 設此是遊標整列會標註顏色 横向
"set cursorcolumn
"highlight CursorLine cterm=none ctermbg=2 ctermfg=0
"智能补全ctags -R --c++-kinds=+p --fields=+iaS --extra=+q
"highlight Pmenu ctermbg=13 guibg=LightGray
"highlight PmenuSel ctermbg=7 guibg=DarkBlue guifg=White
"highlight PmenuSbar ctermbg=7 guibg=DarkGray
highlight PmenuThumb guibg=Black
"打开自己工程的时候自动加载的脚本
if getfsize(".vimscript")>0
   source .vimscript
endif
"------------------------php----------------------------
" 设置注释
vmap  :call EnhancedCommentify('yes','comment',line("'<"),line("'>"))
" 取消注释
vmap  :call EnhancedCommentify('yes','decomment',line("'<"),line("'>"))
" I use a back background in my editors
"set background=dark
" I like highlighted search results
"set hlsearch
"" Use incremental searching
"set incsearch
"" Set standard setting for PEAR coding standards
"set tabstop=4
"set shiftwidth=4
"" Auto expand tabs to spaces
"set expandtab
"" Auto indent after a {
"set autoindent
"set smartindent
"" Linewidth to endless
"set textwidth=0
"
"" Jump 5 lines when running out of the screen
"set scrolljump=5
"" Indicate jump out of the screen when 3 lines before end of the screen
"set scrolloff=3
"" Repair wired terminal/vim settings
"set backspace=start,eol
" Map -B to run PHP parser check
noremap  :!php -l %
" Remap the tab key to select action with InsertTabWrapper
inoremap  =InsertTabWrapper()
"set list
" set listchars=tab:>-,trail:-,eol:$
set ignorecase				  " caseinsensitive searches
set showmode					" always show command or insert mode
set ruler					  " show line and column information
set showmatch				  " show matching brackets
set formatoptions=tcqor
set whichwrap=b,s,<,>,[,]
"------------------------php----------------------------
"------------------------自定义快捷键-----------------------------
"前一个文件后一个文件
map  :bn
map  :bp
map  :w
map  :new
map  :u
map  :ggVG
"自定义
"inoremap " ""i
"inoremap ' ''i
"inoremap [ []i
"inoremap { {}i
"inoremap ` ``i
"inoremap < <>i
"inoremap / /**/i
"启动gVIM时最大化
set columns=1024
set lines=768
" Rename.vim  -  Rename a buffer within Vim and on the disk
" Copyright June 2007 by Christian J. Robinson
" Distributed under the terms of the Vim license.  See ":help license".
" Usage:
" :Rename[!] {newname}
command! -nargs=* -complete=file -bang Rename :call Rename("", "")
function! Rename(name, bang)
	let l:curfile = expand("%:p")
	let v:errmsg = ""
	silent! exe "saveas" . a:bang . " " . a:name
	if v:errmsg =~# '^$\|^E329'ings {{{
set cmdheight=1			 " 设定命令行的行数为 1
set laststatus=2			" 显示状态栏 (默认值为 1, 无法显示状态栏)
"
		if expand("%:p") !=# l:curfile && filewritable(expand("%:p"))
			silent exe "bwipe! " . l:curfile
			if delete(l:curfile)
				echoerr "Could not delete " . l:curfile
			endif
		endif
	else
		echoerr v:errmsg
	endif
endfunction
"php-doc
inoremap  :call PhpDocClass()
nnoremap  :call PhpDocClass()
vnoremap  :call PhpDocClass()
"颜色设定
colorscheme blackdust"desert
"字体
set guifont=Monaco\ 10
  评论这张
 
阅读(1084)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018