zoukankan      html  css  js  c++  java
  • .vimrc

     1 """"""""""""""""""""""""""""""""""
     2 " Vundle相关配置,不要乱改 -- start "
     3 """"""""""""""""""""""""""""""""""
     4 set nocompatible
     5 filetype off
     6 set rtp+=~/.vim/bundle/Vundle.vim
     7 call vundle#begin()
     8 Plugin 'VundleVim/Vundle.vim'
     9 
    10 " 把需要的插件全部写在这一行下面
    11 Plugin 'taglist.vim'                               "代码导航
    12 Plugin 'tpope/vim-fugitive'                        "Git集成
    13 Plugin 'scrooloose/nerdtree'                       "文件浏览器
    14 Plugin 'Lokaltog/vim-powerline'                    "状态栏美化
    15 Plugin 'L9'                                        "必须的依赖库
    16 Plugin 'git://git.wincent.com/command-t.git'       "快速定位文件
    17 Plugin 'Valloric/YouCompleteMe'                    "智能补全代码
    18 " 把需要的插件全部写在这一行上面
    19 
    20 call vundle#end()
    21 filetype plugin indent on
    22 """"""""""""""""""""""""""""""""
    23 " Vundle相关配置,不要乱改 -- end "
    24 """"""""""""""""""""""""""""""""
    25 
    26 
    27 
    28 """""""""""""""""""""""""""""""""""""""""""""""""""
    29 """""""""""""""""" 下面是自己的设置 """"""""""""""""""
    30 """""""""""""""""""""""""""""""""""""""""""""""""""
    31 syntax on                   "开启语法高亮
    32 colorscheme molokai         "设置配色方案
    33 
    34 set helplang=cn             "帮助系统设置为中文
    35 set number                  "显示行号
    36 set ruler                   "显示位置指示器
    37 set laststatus=2            "总是显示状态行
    38 set cursorline              "为光标所在行加下划线
    39 
    40 set hls                     "检索时高亮显示匹配项
    41 set ignorecase              "检索时忽略大小写
    42 set showmatch               "代码匹配
    43 set bs=2                    "在insert模式下用退格键删除
    44 
    45 set fileencodings=uft-8     "使用utf-8打开文件
    46 set autoread                "文件在Vim之外修改过,自动重新读入
    47 set backupdir=/tmp          "设置备份文件目录
    48 set directory=/tmp          "设置临时文件目录
    49 
    50 set expandtab               "以下三个配置配合使用,设置tab和缩进空格数
    51 set shiftwidth=4
    52 set tabstop=4
    53 set softtabstop=2           "一个制表符的长度(可以大于tabstop)
    54 set smarttab                "智能制表符
    55 set smartindent             "智能缩进
    56 set autoindent              "自动缩进
    57 
    58 " 键位映射相关设置
    59 " 开关文件浏览器
    60 map <D-1> :NERDTreeToggle <CR>
    61 " 在文件浏览器中定位当前文件
    62 map <D-!> :NERDTreeFind <CR>
    63 " 关闭文件时同时关闭文件浏览器
    64 let NERDTreeQuitOnOpen = 1
    65 
    66 " 打开文件定位窗口
    67 " nnoremap <slient> <D-R> :CommandT<CR>
    68 " 打开最近打开的文件列表
    69 " nnoremap <slient> <D-E> :CommandTBuffer<CR>
    70 
    71 
    72 " TagList 相关设置
    73 let Tlist_Use_Right_Window = 1
    74 let Tlist_Exit_OnlyWindow = 1
    75 let Tlist_Show_One_File = 1
    76 " Sort type 'name' or 'order'
    77 let Tlist_Sort_Type = "name"
    78 let Tlist_Compact_Format = 1
    79 let g:tlist_php_settings = 'php;c:class;f:function'
    80 map <D-7> :TlistToggle <CR>
    81 
    82 " powerline 相关设置
    83 set guifont=PowerlineSymbols for Powerline
    84 set nocompatible
    85 set t_Co=256
    86 let g:Powerline_symbols = 'fancy'
    87 
    88 " 编程语言相关设置
    89 " Enable omni completion.
    90 autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
    91 autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
    92 autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
    93 
    94 autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
    95 
    96 autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
    97 autocmd FileType php setlocal omnifunc=xmlcomplete#CompletePHP
  • 相关阅读:
    css3 省略号
    js一些常用方法
    nth-child使用
    常见表单元素处理
    表单的基本使用
    web基本概念
    PHP数组
    PHP函数
    PHP错误处理
    PHP文件载入
  • 原文地址:https://www.cnblogs.com/iospp/p/5074564.html
Copyright © 2011-2022 走看看