vim php doc,vim

本文介绍了如何配置 Vim 编辑器,包括设置 tab 键的缩进、语法高亮、鼠标功能、自动检测外部更改等。同时,针对 Go 语言开发,详细设置了 vim-go 插件,增强了函数、方法、结构体等高亮,并设置了快捷键。对于 PHP 开发,启用了 phpdoc 插件以增强文档注释功能。
摘要由CSDN通过智能技术生成

"tab缩进

set ts=4

set expandtab

set shiftwidth=4

"配色

syntax enable "语法高亮

set background=dark

colorscheme solarized

"set mouse=a "鼠标可用

set autoread "自动检测外部更改

set cindent "c文件自动锁紧

set autoindent "自动对齐

"set showmatch "显示匹配

"set hlsearch "高亮查找

set fdm=marker "语法高亮

"set cursorline "语法高亮

"set ruler "显示标尺

"set paste "粘贴 不能与autoindent共存

"set number

" 设置编码

set encoding=utf-8

set nocompatible

set laststatus=2

" 设置文件编码

set fenc=utf-8

" Vundle 配置 -------------------------

set nocompatible " required

filetype off " required

" set the runtime path to include Vundle and initialize

set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

" alternatively, pass a path where Vundle should install plugins

"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required

Plugin 'gmarik/Vundle.vim'

Plugin 'fatih/vim-go'

Bundle 'Blackrush/vim-gocode'

Plugin 'Valloric/YouCompleteMe'

" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)

" All of your Plugins must be added before the following line

call vundle#end() " required

filetype plugin indent on " required

" GO

" =====================================================

" vim-go --------------------------------

let g:go_disable_autoinstall = 0

let g:go_fmt_command = "goimports"

let g:go_highlight_functions = 1

let g:go_highlight_methods = 1

let g:go_highlight_structs = 1

let g:go_highlight_operators = 1

let g:go_highlight_build_constraints = 1

au FileType go nmap i (go-info)

au FileType go nmap gd (go-doc)

au FileType go nmap r (go-run)

au FileType go nmap b (go-build)

au FileType go nmap t (go-test)

au FileType go nmap c (go-coverage)

au FileType go nmap gd (go-def-tab)

" go-code --------------------------------

"imap "将F6 映射为自动补全快捷键

" PHP

" =====================================================

" The php doc plugin

let php_baselib = 1

let php_htmlInStrings = 1

let php_noShortTags = 1

let php_folding = 1

source ~/.vim/php-doc.vim

:imap :call PhpDocSingle()

:nmap :call PhpDocSingle()

:vmap :call PhpDocRange()

"open a NERDTree automatically when vim starts up

"autocmd vimenter * NERDTree

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值