(a 600MB+ sized c/c++ compiler which is capable of hi-light and JB styled completion!! and of-course with VIM efficiency !!)

Till now, several days passed before I started learning to compile a self-designed gvim.. It is no good experience, but full of discoveries.

First of all, I want to point out that all the plugins loaded or wish to be loaded by vim needs to have the same bit-width. That means, using 32 bits of vim requires all its components including its plugins to be 32 bits.

  1. It seems to use 32bit version is recommended on vim's official site, but you know, it feels not quite good when running 32bit apps on 64bit machine. So downloaded two source files from official site, one is runtime binaries, and the other is the source. Unrar these compressed data to one file named 'vim64' is suggested.
  2. To install/compile the souce file, need to install python/python3 (required), something like "nmake -f Make_mvc.mak GUI=yes PYTHON3=path PYTHON3_VER=3X DYNAMIC_PYTHON3=yes MSVCVER=m.n CPU=AMD64/IA64" needs to be run in cmd. If well-configured, gvim/vim is generated in the /src folder, for more, read the Make_*.mak file according to your compiler, if nmake, *=mvc (note to compile linux ver of vim, need to configure && make && make install, where prefix. enable-pythoninterp, enable-luainterp, enable-python3interp, enable-cscope, enable-rubyinterp, enable-perlinterp, enable-python2interp might need to be specified at configure time.) If python/python3 are not installed in ordinary path, specify it by with-python-config-dir/with-pythno3-config-dir=/usr/lib/python3.x/config/ along with the enable options.
    ./configure --prefix=/usr --enable-luainterp --enable-pythoninterp --enable-python3interp --enable-cscope --with-python-config-dir=/usr/lib64/python2./config/ --with-python3-config-dir=/usr/lib64/python3./config-3.4m/ 
  3. To configure for better experiences in gvim, some plugins are recommended. jiangmiao/auto-pairs, Lokaltog/vim-powerline, xuhdev/SingleCompile, scrooloose/syntastic, Valloric/YouCompleteMe, VundleVim/Vundle.vim, sickill/vim-pasta and so on, might add/delete in the future.

Here's my _vimrc file: (it's only for my own usage, very likely to have flaws.. and it's for Win usage)

 set nocompatible
filetype off set rtp+=$VIM/vimfiles/bundle/Vundle.vim/
call vundle#rc('$VIM/vimfiles/bundle/') Plugin 'VundleVim/Vundle.vim'
Plugin 'jiangmiao/auto-pairs'
Plugin 'bufexplorer.zip'
Plugin 'Lokaltog/vim-powerline'
Plugin 'wesleyche/SrcExpl'
Plugin 'junegunn/limelight.vim'
Plugin 'sickill/vim-pasta'
Plugin 'scrooloose/syntastic'
Plugin 'xuhdev/SingleCompile'
Plugin 'Valloric/YouCompleteMe', {'do':'./install.py'}
Plugin 'chriskempson/base16-vim' let c_cpp_comments= filetype plugin indent on noremap <c-k> <c-w>k
noremap <c-j> <c-w>j
noremap <c-h> <c-w>h
noremap <c-l> <c-w>l syntax on
filetype on
filetype plugin on
filetype plugin indent on
let g:ycm_auto_trigger =
let g:ycm_min_num_of_chars_for_completion =
let g:ycm_global_ycm_extra_conf = 'E:/vim64/vimfiles/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
set t_Co=
set backspace=
set smartindent
set expandtab
set tabstop=
set shiftwidth=
set smarttab
set foldenable
set foldmethod=indent
set autoread
set ignorecase
set smartcase imap <c-k> <Up>
imap <c-j> <Down>
imap <c-h> <Left>
imap <c-l> <Right> set nu
set laststatus=
set cmdheight=
set cursorline
set nowrap
colorscheme base16-tomorrow
set shortmess=atI
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L
set encoding=utf-
set fenc=utf-
set fileencodings=utf-,latin-,ascii,gbk,usc-bom,cp936,Shift-JIS
set ff=unix
set fileformats=unix,dos,mac language messages zh_CN.utf- nnoremap <c-s> :w<CR>
nnoremap <c-c> ESC
nnoremap <c-c> :nohl<CR>
nnoremap <c-F9> :SCCompile<CR>
nnoremap <c-F10> :SCCompileRun<CR>
nnoremap <c-F11> :SCChooseCompiler<CR>
let g:ycm_min_num_identifier_candidate_chars =
let g:ycm_semantic_triggers = {
\ 'c' : ['->', '.'],
\ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s',
\ 're!\[.*\]\s'],
\ 'ocaml' : ['.', '#'],
\ 'cpp,objcpp' : ['->', '.', '::','re!\w+'],
\ 'perl' : ['->'],
\ 'php' : ['->', '::'],
\ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],
\ 'ruby' : ['.', '::'],
\ 'lua' : ['.', ':'],
\ 'erlang' : [':'],
\ }
autocmd InsertLeave * :pclose

note that some maps of keys might be in collision, use :verbose i/nmap <c-*> to check it out!

It's not a big problem until I came across Valloric/YouCompleteMe.. This plugin needs to be compiled before utilization..

4-step preparations: (Of course, python is previously installed on your machine.. and it's not included in the 4 preparations)

  1. get ycm from git
  2. get cmake
  3. get clang
  4. 7z installed

Notes: to get ycm from git, just use vundle to manage, type :PluginInstall (It might be :BundleInstall or whatever else..), wait till done

to get cmake, download a binary and install it, remember to add its bin path to env-path..

to get clang, download a binary according to system and use 7z to unzip it to $YCM/ycm_temp/llvm_root/

Then we have to build the ycm app:

https://github.com/Valloric/YouCompleteMe#windows

Other systems guides can also be found there...

  1. create folder ycm_build in $YCM
  2. generate makefiles, using cmake -G "Visual Studio m.n Win64" "$YCM/ycm_temp/llvm_root" . "$YCM/third_party/ycmd/cpp" in the created folder
  3. compile with the generated files and .vcxproj, cmake --build . --target ycm_core --config Release -- -j 4 in the same folder

Done.

plugin: cscope

Plugin 'brookhoog/cscope.vim'
nnoremap <leader>fa :call CscopeFindInteractive(expand('<cword>'))<CR>

Theseare the vim's quirk techniques.

reopen file in vim at last closed file location, by:

source /usr/share/vim/vim*/vimrc_example.vim
or:
source /usr/share/vim/vim*/defaults.vim
# in the file contains an intro that explains reopen at last closed location

gvim work notes.. a few days' work on 64bit vim and plugin compilations的更多相关文章

  1. Gvim插件管理Vundle

    之前关于gvim的博客中提到的很多插件安装比较繁琐,这一篇来介绍一下gvim管理插件的插件--vundle的安装以及使用,让givm的插件安装更加的简单 首先给出vundle的git地址 https: ...

  2. 【转】Gvim开发环境配置笔记--Windows篇

    配置文件(vimrc) set nocompatible set nu! set cursorline colorscheme murphy " vim 自身命令行模式智能补全 set wi ...

  3. Windows下gvim配置

    Windows下gvim配置原作地:http://hi.baidu.com/leemoncc/blog/item/a6be15cf40d7ab31b600c806.html 0.准备软件及插件. (a ...

  4. Env:Gvim开发环境配置笔记--Windows篇

    转自:http://www.cnblogs.com/xiekeli/archive/2012/08/13/2637176.html 加班的时候,听同事提到gvim在windows下的使用,然后突然想起 ...

  5. Gvim for php 安装配置

    VIM for PHP Windows 2011-05-14 11:51:51|  分类: Php|举报|字号 订阅     虽然vim本质上只是一个编辑器.但只要配合一些适当的插件,vim也能变成一 ...

  6. [转载] ubuntu下定制Vim/Gvim及使用技巧

    vim是linux下的编辑器之神,是玩linux的必备工具,同样emacs是神的编辑器,两个编辑器是各有千秋,看个人的喜好,青菜萝卜各有所爱.我是比较喜欢vim,用vim编写bash,perl,pyt ...

  7. 设置ISE/vivado中默认文本编辑器为gvim

    ise windows版,添加方式 ISE下点击菜单Edit -> Preferences -> Editor. 在Editor选项框里选择Custom,在Command line syn ...

  8. Gvim使用心得--设置篇[转]

    1.设置自己喜欢的字体? 点“编辑”--“选择字体”, 然后在字体列表中选择一个你喜欢的字体和字号,然后确认. 如果想每次都使用这个这个字体 需要加到启动文件中 比如我的 set guifont=Co ...

  9. 【转】gvim配置及相关插件安装

    0.准备软件及插件.(a)gvim72.exe 地址ftp://ftp.vim.org/pub/vim/pc/gvim72.exe.(b)vimcdoc-1.7.0-setup.exe 地址http: ...

随机推荐

  1. C# 非public的方法和属性的单元测试

    有时候我们写好的类库中,某些类的属性和方法不应该暴露出来,那么如何对这些非public的方法和属性进行单元测试? MS为我们提供了PrivateObject类,可以解决这个问题,可以去MSDN的说明文 ...

  2. 参考C++STL标准库中对了的使用方法

    http://www.cppblog.com/zhenglinbo/archive/2012/09/18/191170.html 参考:http://www.cppblog.com/zhenglinb ...

  3. 背包类问题解答——poj3624分析

    习题网址:http://poj.org/problem?id=3624 试题分析:该类题通过限定物品总数量.总质量:并且初始化每个物品的起始质量和一个量化的性质.最后求解最值的量化性质的值是多少的问题 ...

  4. JSON.parse()和JSON.stringify()&&traditional(ajax请求)的作用

    parse是一个字符串中解析出json对象,如 var str = '{"name":"haizeiwang"}' 结果: JSON.parse(str) na ...

  5. solr定时增量索引

    当数据库的数据发生改变的时候,我们不想手动的去重新添加数据库的数据导solr索引库中,所以用到定时添加索引.增删改的数据.现在写的这些都是基于我之前做的一步步到这来的. 将solr/dist下的sol ...

  6. C#中泛型默认关键字(default)详解

    我们在泛型类和泛型方法中产生的一个问题是,在预先未知以下情况时,如何将默认值分配给参数化类型 T:(T 是引用类型还是值类型?)对此我们将如何处理? C#代码实例: /// <summary&g ...

  7. ASP.NET MVC Controller向View传值的几种方式

    上几篇博文提到MVC和WebForm的区别,主要是MVC的Controller和View将传统的WebForm的窗体和后台代码做了解耦,这篇博文简单介绍一下在MVC中Controller向View是如 ...

  8. spring security 3 自定义认证,授权示例

    1,建一个web project,并导入所有需要的lib. 2,配置web.xml,使用Spring的机制装载: <?xml version="1.0" encoding=& ...

  9. linux文件权限赋值

    1修改权限     命令:chmod (change mode)     功能:改变文件的读写和执行权限.有符号法和八进制数字法.     选项:(1)符号法:   命令格式:chmod {u|g|o ...

  10. MyEclipse的Expressions没有结果的解决办法

    之前我的Expressions在Value这一列什么都不显示,就连简单的1+2结果3都不显示出来. 然后我咬咬牙把它卸载了,然后重装就好了,我也不清楚是什么原因. 1.之前我安装的目录是"C ...