Gvim work notes. A few days work on 64bit vim and plugin compilations

Source: Internet
Author: User
Tags imap

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

First of all, I want-to-point-out, this all-plugins vim loaded or wish to is loaded needs to the same bit-width. That means, using the-bits of the VIM requires all IT components including their plugins to be.

  1. It seems to use 32bit version was recommended on Vim's official site, but you know, it feels not quite good feeling when RU Nning 32bit apps on 64bit machine. So downloaded to the 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=ye s Python3=path python3_ver=3x dynamic_python3=yes MSVCVER=M.N cpu=amd64/ia64 "needs to is run in CMD. If well-configured, Gvim/vim is generated on The/src folder, for more, read the Make_*.mak file according to your compile R, if NMAKE, *=MVC
  3. To configure-better experiences in Gvim, some plugins is 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 having flaws: and it ' s for Win usage)

1 Set Nocompatible2 filetype off3 4Set rtp+= $VIM/vimfiles/bundle/vundle.vim/5Call VUNDLE#RC ('$VIM/vimfiles/bundle/')6 7Plugin'Vundlevim/vundle.vim'8Plugin'Jiangmiao/auto-pairs'9Plugin'Bufexplorer.zip'TenPlugin'Lokaltog/vim-powerline' OnePlugin'WESLEYCHE/SRCEXPL' APlugin'Std_c.zip' -Plugin'Junegunn/limelight.vim' -Plugin'Sickill/vim-pasta' thePlugin'scrooloose/syntastic' -Plugin'Xuhdev/singlecompile' -Plugin'Valloric/youcompleteme', {' Do':'./install.py'} -  +Let c_cpp_comments=0 -  + filetype plugin indent on A  atNoremap <c-k> <c-W>k -Noremap <c-j> <c-W>J -Noremap <c-h> <c-W>h -Noremap <c-l> <c-W>L -  - filetype on in filetype plugin on - filetype plugin indent on toLet G:ycm_auto_trigger =1 +Let g:ycm_min_num_of_chars_for_completion =2 -Set t_co= the theSet backspace=2 * Set Smartindent $ Set ExpandtabPanax NotoginsengSet tabstop=4 -Set shiftwidth=4 the Set Smarttab + Set Foldenable ASet foldmethod=Indent the Set Autoread + Set ignorecase - Set Smartcase $  $IMAP <c-k> <Up> -IMAP <c-j> <Down> -IMAP <c-h> <Left> theIMAP <c-l> <Right> - Wuyi Set Nu theSet laststatus=2 -Set cmdheight=2 Wu Set Cursorline - Set nowrap AboutColorScheme tomorrow-night-eighties $Set shortmess=AtI -Set guioptions-=m -Set guioptions-=T -Set guioptions-=R ASet guioptions-=L +Set encoding=utf-8 theSet fenc=utf-8 -Set fileencodings=utf-8, latin-1, ascii,gbk,usc-bom,cp936,shift-JIS $Set ff=Unix theSet fileformats=Unix,dos,mac the  theLanguage Messages zh_cn.utf-8 the  -Nnoremap <c-s>:W<CR> inNnoremap <c-c>ESC theNnoremap <c-c>:nohl<cr> theNnoremap <c-F9>:sccompile<cr> AboutNnoremap <c-F10>:sccompilerun<cr> theNnoremap <c-F11>:scchoosecompiler<cr> theLet G:ycm_min_num_identifier_candidate_chars =2 theLet g:ycm_semantic_triggers =  { +\'C': [' -','.'], -\'OBJC': [' -','.','re!\[[_a-za-z]+\w*\s','re!^\s*[^\w\d]\w*\s', the\'re!\[.*\]\s'],Bayi\'OCaml': ['.','#'], the\'Cpp,objcpp': [' -','.','::','re!\w+'], the\'Perl': [' -'], -\'PHP': [' -','::'], -\'Cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go': ['.'], the\'Ruby': ['.','::'], the\'Lua': ['.',':'], the\'Erlang': [':'], the   \ } -Autocmd Insertleave *:p Close

Note that some maps of the keys might is 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-be compiled before utilization.

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

    1. Get ycm from Git
    2. Get CMake
    3. Get Clang
    4. 7z installed

Notes:to get ycm from Git, just with vundle to manage, type:P lugininstall (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 had to build the YCM app:

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

Other systems guides can also is 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 in the same fol Der

Done.

Gvim work notes. A few days work on 64bit vim and plugin compilations

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.