zoukankan      html  css  js  c++  java
  • 我的vim配置

    vim 插件管理工具 :NeoBundlePathogenVim-Addon-ManagerVim-Plug, or Vundle

    vundle: http://blog.csdn.net/sww_simpcity/article/details/18504071

    代码检查工具: syntastic  https://github.com/scrooloose/syntastic#installation

    nerdtree

    omnicppcomplete

    taglist

    syntastic 语法检查

    fecs js格式化

    安装fecs: https://github.com/ecomfe/fecs

                  https://github.com/hushicai/fecs.vim

    "
    "syntastic
    "
    " 不建议首次打开文件时进行检查
    let g:syntastic_check_on_open = 0 
    " `:wq`时不进行检查,注意这跟`:w`不一样
    let g:syntastic_check_on_wq = 0 
    " 如果你想在写文件时不进行检查,需要配置`passive`模式
    " 在`passive`模式下,只有手动调用了`:SyntasticCheck`才会触发检查
    " let g:syntastic_mode_map = {'mode': 'passive'} 
    " 你可以配置一个快捷方式,用来快速检查当前文件
    " nmap <silent> <F5> :SyntasticCheck<cr>
    let g:syntastic_javascript_checkers = ['fecs']
    let g:syntastic_javascript_fecs_args = "--reporter=baidu"
    let g:syntastic_error_symbol = "x" 
    let g:syntastic_warning_symbol = "w" 
    
    set nocompatible                " be iMproved
    filetype off                    " required!
    set rtp+=~/.vim/bundle/vundle/
    call vundle#rc()
    
    " let Vundle manage Vundle
    Bundle 'gmarik/vundle'
    
    "my Bundle here:
    "
    Bundle 'scrooloose/syntastic'
    Plugin 'hushicai/fecs.vim.git'
    "Bundle 't9md/vim-quickhl'
    " Bundle 'Lokaltog/vim-powerline'
    "Bundle 'scrooloose/nerdcommenter'
    
    set sw=4
    set ts=4
    set nocp
    filetype plugin on
    filetype indent on
    autocmd FileType python setlocal et sta sw=4 sts=4
    set nobackup
    "
    "tab键 = 4个空格
    "
    " show existing tab with 4 spaces width
    set tabstop=4
    " when indenting with '>', use 4 spaces width
    set shiftwidth=4
    " On pressing tab, insert 4 spaces
    set expandtab
    
    "
    "选中即复制到windows
    "
    set mouse=v
    
    "
    "支持中文
    "
    set encoding=utf-8 termencoding=utf-8 fileencoding=utf-8
    set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
    "
    "taglist
    "
    let Tlist_Show_One_File=1
    let Tlist_WinWidth=40
    let Tlist_Exit_OnlyWindow=1
    let Tlist_Sort_Type="name"
    map <silent> <F9> :TlistToggle<CR>
    
    "
    "nerdtree
    "
    map <silent> <F7> :NERDTree<CR>
    map <silent> <F7> :NERDTreeToggle<CR>
    "
    "omnicppcomplete
    "
    map <F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
    map <F11> :!ctags -R .<CR>
    set completeopt=menu,menuone
    let OmniCpp_MayCompleteDot=1
    let OmniCpp_MayCompleteArrow=1
    let OmniCpp_MayCompleteScope=1
    let OmniCpp_NamespaceSearch=1
    let OmniCpp_GlobalScopeSearch=1
    let OmniCpp_DefaultNamespace=["std"]
    let OmniCpp_ShowPrototypeInAbbr=1
    let OmniCpp_SelectFirstItem = 2

    [完]

  • 相关阅读:
    关于IE6不能兼容LCUC使用的PNG透明图象
    rmvb压制中高级技巧
    不错的课件网站
    C#程序多用户只启动一个进程的方法
    不可想像的加密光盘复制工具
    检测远程URL是否存在的三种方法
    请哪里有英文单词单复数转换的代码?
    一些感想,欢迎拍砖
    Some thoughts on my own O/R Mapping or Code Generation tools
    有了net send,谁还用IM?
  • 原文地址:https://www.cnblogs.com/zhutianpeng/p/5478362.html
Copyright © 2011-2022 走看看