个人使用vim配置,安装YCM(YouCompleteMe,jedi, vundle等插件),具体的配置如下:

 execute pathogen#infect()
syntax on
filetype plugin on "{一般设置
set fileencodings=utf-,gbk
set ambiwidth=double set smartindent
set smarttab
set expandtab
set tabstop=
set softtabstop=
set shiftwidth=
set backspace=
set nu
set hls "{折叠代码
set foldmethod=indent
set foldlevel=
nnoremap <space> za
"} "{光标重回上次退出位置
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif "} "{
set nocompatible " be iMproved filetype off " required! /** 从这行开始,vimrc配置 **/ set rtp+=~/.vim/bundle/vundle/ call vundle#rc() "let Vundle manage Vundle " required! Bundle 'gmarik/vundle' " My Bundles here: /* 插件配置格式 */ "BundleInstall " original repos on github (Github网站上非vim-scripts仓库的插件,按下面格式填写)
Bundle 'Valloric/YouCompleteMe'
Bundle 'honza/vim-snippets'
Bundle 'jonathanfilip/lucius'
Bundle 'tomasr/molokai' "Bundle 'tpope/vim-fugitive' "Bundle 'Lokaltog/vim-easymotion' "Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} "Bundle 'tpope/vim-rails.git' " vim-scripts repos (vim-scripts仓库里的,按下面格式填写) "Bundle 'L9' "Bundle 'FuzzyFinder'
"
"" non github repos (非上面两种情况的,按下面格式填写)
"
"Bundle 'git://git.wincent.com/command-t.git'
"
"" ... filetype plugin indent on " required! /** vimrc文件配置结束 **/
"} "{taglist
"let Tlist_Auto_Highlight_Tag=1
"let Tlist_Auto_Open=1
"let Tlist_Auto_Update=1
"let Tlist_Display_Tag_Scope=1
"let Tlist_Exit_OnlyWindow=1
"let Tlist_Enable_Dold_Column=1
"let Tlist_File_Fold_Auto_Close=1
"let Tlist_Show_One_File=1
"let Tlist_Use_Right_Window=1
"let Tlist_Use_SingleClick=1
"nnoremap <silent> <F8> :TlistToggle<CR>
"} let mapleader = ","
let g:mapleader = ","
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType python setlocal completeopt-=preview
autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete let g:pydiction_location='~/.vim/complete-dict'
set autoindent
set tabstop=
set shiftwidth=
set expandtab
set number "{jedi bundle
let g:jedi#auto_initialization =
let g:jedi#auto_vim_configuration =
let g:jedi#use_tabs_not_buffers =
let g:jedi#use_splits_not_buffers = "left"
let g:jedi#popup_on_dot =
let g:jedi#popup_select_first =
let g:jedi#show_call_signatures = ""
let g:jedi#goto_command = "<leader>d"
let g:jedi#goto_assignments_command = "<leader>g"
let g:jedi#goto_definitions_command = ""
let g:jedi#documentation_command = "K"
let g:jedi#usages_command = "<leader>n"
let g:jedi#completions_command = "<C-Space>"
let g:jedi#rename_command = "<leader>r"
let g:jedi#completions_enabled = "}
"{YouCompleteMe
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/clang/testdata/client_data/' "配置默认的ycm_extra_conf.py
let g:ycm_error_symbol = '>>'
let g:ycm_warning_symbol = '>*'
nnoremap <leader>gl :YcmCompleter GoToDeclaration<CR>
nnoremap <leader>gf :YcmCompleter GoToDefinition<CR>
nnoremap <leader>gg :YcmCompleter GoToDefinitionElseDeclaration<CR>
nmap <F4> :YcmDiags<CR>
"打开vim时不再询问是否加载ycm_extra_conf.py配置
let g:ycm_confirm_extra_conf=
"使用ctags生成的tags文件
let g:ycm_collect_identifiers_from_tag_files =
"python with virtualenv support
py << EOF
import os
import sys
if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
EOF
"}
"
"{界面设置
colorscheme desert
"colorscheme molokai "}

个人VIM配置文件的更多相关文章

  1. Vim配置文件

    转载 原文网址:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim ...

  2. 我的vim配置文件.vimrc

    我的vim配置文件.vimrc map <silent> <F10> :TlistToggle<cr>map <silent> <F8> : ...

  3. 转载~vim配置文件

    转载自:小码哥的博客 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主要有以下优点: 1.按F5可以直接编译并执行C.C++.java代码以及执行shell脚本,按“F8”可进行C. ...

  4. 【转】强大的vim配置文件,让编程更随意

    原文地址:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主 ...

  5. [转]强大的vim配置文件,让编程更随意

    转自:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主要有 ...

  6. vim 配置文件 ,高亮+自动缩进+行号+折叠+优化

    vim 配置文件 ,高亮+自动缩进+行号+折叠+优化 将一下代码copy到 用户目录下 新建文件为  .vimrc保存即可生效: 如果想所有用户生效 请修改 /etc/vimrc (建议先cp一份)& ...

  7. 实用的VIM配置文件

    VIM配置文件名为.vimrc,默认在用户根目录下,或者在命令模式下输入:version可以获取配置文件路径. 在VIM命令行下输入options,然后回车,可以查看VIM所有的参数选项. 双引号&q ...

  8. vim配置文件和插件管理

    本文通过总结零碎的资料总结而成,更多是去引导学习vim配置文件及插件使用. .vimrc配置文件,内容如下(备注清晰) "引入插件pathogen使用 execute pathogen#in ...

  9. 强大的vim配置文件,让编程更随意

    花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主要有以下优点: 1.按F5可以直接编译并执行C.C++.java代码以及执行shell脚本,按“F8”可进行C.C++代码的调试 2. ...

  10. Ubuntu下更改Vim配置文件打造C/C++风格

    转载:Ubuntu下更改Vim配置文件打造C/C++风格 Vim默认的配置使用起来还不能让人满意,还需要自己配置 默认配置文件是:/etc/vim/vimrc我们可以在家目录下建立自己的配置文件切换到 ...

随机推荐

  1. Contains Duplicate II 解答

    Question Given an array of integers and an integer k, find out whether there are two distinct indice ...

  2. C语言中不同类型的循环(Different types of loops in C)

    C语言中有三种类型的循环:for,while,do-while. while循环先判断循环条件. while (condition) { //gets executed after condition ...

  3. AIX5.3CPU占用高的问题核查

    AIX5.3 CPU占用高问题核查步骤 1.topas查看占用cpu占用最高的进程的PID 2.执行: ps -mp PID -o THREAD 以查找相应进程下所有正在占用 CPU 的线程的TID ...

  4. hdu 3681 Prison Break(状态压缩+bfs)

    Problem Description Rompire . Now it’s time to escape, but Micheal# needs an optimal plan and he con ...

  5. Unity position和localposition

    1. position是根据世界原点为中心 2. localPosition是根据父节点为中心,如果没有父节点,localpositon和position是没有区别的 3.选中一个物体左上角Globa ...

  6. 关于map与set的一点理解;

    set代码: #include<stdio.h> #include<set> using namespace std; int main(){ set<int>m; ...

  7. 数据库的优化tips

    数据库   TIPS:: 1.用于记录或者是数据分析的表创建时::使用Id作为主键,1,2,3...表示消息条数.用户账号id用于做外键.一个用户相应唯一个accountId             ...

  8. cocos2dx 3.1从零学习(三)——Touch事件(回调,反向传值)

    第三讲 Touch 前面两篇我们学习的内容,足够我们做一款简单的小游戏.也能够说,我们已经入门了,能够蹒跚的走路了. 本篇将解说cocos2dx中非常重要的touch回调机制.你肯定记得第一章做定时器 ...

  9. org.springframework.web.util.IntrospectorCleanupListener的用途

    Spring官方API中对其描述如下 /** * Listener that flushes the JDK's {@link java.beans.Introspector JavaBeans In ...

  10. 出现security ioError 安全沙箱问题

    client安全沙箱 通配策略 crossdomain <?xml version="1.0" encoding="UTF-8"?> <!DO ...