My VIM configuration and description "K-vim"

Source: Internet
Author: User
This is the penultimate article, the new blog is about to be completed
Toss and tidy up the next, own vim configuration, managed GitHub, support one-click Deployment
have plugin description, screenshots and animated GIF display Https://github.com/wklken/k-vim
Click to direct
The following is readme.md, for reference, hope to help
------------------------------------------ Vim Plug-in classification and shortcut keys


Give a vim command, he can toss one night; tell him how to customize the Vim command, he can churn his whole life.



Life is endless, it 's more than written in front



With VIM, nearly two years, with the original use of a long time, and then toss a few times, using the online popular configuration, but the total feeling that a lot of places can not meet demand.


Later decided to do one, a lot of reference, often a function has multiple plug-ins, will try to use a period of time, then decided to use which


such as complementary, Python from pydiction to the nearest Jedi and Python-mode, finally found YCM


plug-in, first of all, to be able to improve productivity (improve efficiency), so to find the most power of the


second, to be beautiful (shortcut keys and Interface), with a little discomfort on the custom


last, is cool (loaded x artifact ...) Amount, not advocated, (╯‵-′) ╯︵┻━┻)


 


PS: This vim configuration is my linux_config next part, if needed, can refer to, mainly a key configuration environment vim basic usage



Beginner: Vim Training draft two years ago in March, the first time to use Vim, and then collated a copy, to knock several times



Recommended: Mouse uncle's concise vim practice Strategy



Or, play the game vim Big Adventure use instructions



The use of raw vim, it is best to first familiar with the plug-in, Plug-ins for Plug-ins, auxiliary properties



The following plug-ins, only for the purpose of the benefits, detailed configuration can be searched in GitHub For detailed purpose and configuration



Current VIM usage configuration, viewing in VIMRC



The shortcut key is defined for the plugin default/or current configuration VIMRC, and if you need to modify it, view the plug-in configuration modifications in VIMRC [SD] for custom [d] as the default



What's the problem, first look at the plugin documentation description-> code options->github on the issues->google it



Believe me, you meet the problem, someone else also encountered, most can be solved, a small part of no solution ....



28 law, focusing on the 20% plug-ins that can maximize their productivity, how to configure them, and how to do them yourself



Because of the usual use of Python and Golang, the language configuration is biased towards these two



Other can refer to the network configuration (common Plug-ins can be configured, specific language plug-ins need to do their own research)



Fork A



Get a VIM configuration that fits your habits, and of course, welcome to a cooler plug-in configuration:



My configuration also updates the configuration step irregularly



Clone to local, configure to Linux personal directory (if it is from linux_config, do not need clone)


git clone git@github.com:wklken/k-vim.git


Install Dependency Pack


sudo apt-get install ctags
 Brew install ctags

 #使用python需要
 sudo pip install pyflakes
 sudo pip install Pyli NT
 sudo pip install Pep8


Installing Plug-ins


CD k-vim/

 sh install.sh

 #会进入安装插件的列表, the current 31 plug-ins, one installation is from GitHub clone, completely depends on the speed

 #安装完插件后, will automatically compile ycm, attention, Possible compilation failed (missing some dependencies), failed to manually compile it, see the 4th step of compiling automatic completion youcompleteme (This step is a bit long, but definitely worth)

 install.sh
 Essentially do things
 1. Will vimrc/ Vim folder soft connect to $home, programming system vim configuration
 2.git clone install Vundle (clone to bundle directory)
 3. Install all other plug-ins through Vundle (equivalent to entering VIMRC, command line execution: Bundleinstall)
 4. Compile the plugin that needs to be manually compiled, eg. YCM


Problems that you may encounter:



Compile related plug-ins, modify the configuration relative line number



VIMRC configuration, if not used, can be removed, the relevant reference to compile automatic complement Youcompleteme



The document This plugin requires VIM 7.3.584, so if the vim version is too low, you need to compile the installation configuration topic



To modify Colortheme in VIMRC, you can use Molokai (familiar with the children's shoes accustomed to SUBLIMETEXT2)



The default configuration is solarized Dark theme



Want to modify the terminal color to solarized can refer to the screenshot here



Solarized Theme



Molokai Topic Custom shortcut key description



The following shortcut keys = =


F1   off, prevent jump help
F2  set Nu/nonu
F3  set list/nolist
F4  set wrap/nowrap
F5  Set paste /nopaste
F6  syntax On/off
space/Turn lookup
Y   =y$   Copy To line end
w!!  Save KJ <esc> with sudo
permission   ; don't go to the corner, press ESC.
T    New Line, below, not into insert mode
T    New Line, above
, SA   Select All
hjkl up  and down, forced to use, to unlock their own change
Ctrl + JKHL to go up and down the window jump, do not need to CTRL+W+JKHL

, TN  new tab
, TC  tab Close
, to  tab only
, TM  tab Move
, te  new tab Edit
CTRL + N  Absolute line number transformation relative to line number, by
        default relative line number http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/
5j/5k  in the relative line number mode, move up 5 lines down 5 lines, do not like note line 142 near the Relativenumber configuration

, y display history clipboard
, YC empty
yy/dd- > P-> ctrl+p can replace non-recent clip content

, p to open file search CTRLP
,/remove matching highlighting
plug-in and its shortcut key description


Picture a bit more, show a bit slow, cut not very professional, patiently read:



Plug-in Management Gmarik/vundle



Done, required to be installed, for the management of all Plug-ins



Manage commands in command-line mode:


: Bundleinstall     Install
 : bundleinstall!    Update
 : Bundleclean       Remove plugin not in list


Navigation and search vim-scripts/the-nerd-tree



Done must install, Open Directory tree navigation


[SD]
     , n open tree directory structure
     p to upper directory
     K to same directory first node
     J to same directory last node


Demo Majutsushi/tagbar



Done, must install, label navigation, latitude and taglist different


[SD] <F9> Open


Demo Vim-scripts/taglist.vim



Done, must be installed


[SD] <F8> Open


Demo: Kien/ctrlp.vim



File search, ack/command-t need to rely on external packages, do not like to have too much reliance, unless very powerful



Demonstrate



Show enhancements


Passive skills, no shortcut keys
Lokaltog/vim-powerline


Done, must be installed



Demo Kien/rainbow_parentheses.vim



Done, must be installed



Demo Yggdroot/indentline



Done, do not pretend to see a person like, indent logo



Another similar, whole piece of background color, nathanaelkane/vim-indent-guides



It looks like the st2 looks good, alas



Adjust the color and solarized consistent, not too conspicuous influence attention, you can set the color according to their own theme (color)



Demo: bronson/vim-trailing-whitespace



Label Red altercation/vim-colors-solarized the last invalid code line



Done, the subject, which I used at present, looked comfortable Tomasr/molokai



Done, another theme, optional, occasional change of flavor



Fast Moving


Active skills, need shortcut keys
lokaltog/vim-easymotion


Jump to any position after the cursor



Configuration (my leader key configuration let G:mapleader = ', ')


,,, + w  jump
 ,, + fe  find ' e ', quick jump to locate a character position


Demo Vim-scripts/matchit.zip



% match pairs of tags, jump



Auto-complement and quick edit


Active skills, need shortcut keys, efficient editing without a sharp weapon
Valloric/youcompleteme


YCM is currently used the best automatic not full plug-in, with this write code too comfortable



This needs to go to see the official configuration Way, demo in the official GitHub have



Need vim 7.3.584 (how to compile vim) need to compile this plugin (see GitHub document)



This plugin contains the following four plug-in features, so there is no need to install the following four


Clang_complete
 autocomplpop
 supertab
 neocomplcache
 Jedi (complement to Python)
vim-scripts/ultisnips


Quickly insert custom-defined code snippets



Automatic not all add this, high efficiency must



Demo Scrooloose/nerdcommenter



Quick batch Add and subtract notes


[d] shift+v+ arrow key selected (default current line)   ->  , cc  plus annotation  ->, cu unlock annotation


Demo Tpope/vim-surround



Quickly wrap a word around a symbol, such as a quote



Tpope/vim-repeatrepeat to enhance, '. ' You can repeat the command


[D]cs "' [Inside]
   " Hello world! "-> ' Hello world! '
   DS "
   " Hello world! "-> Hello world!
   Ysiw "Hello
   ->" Hello "


Demo raimondi/delimitmate



Enter quotation marks, parentheses, auto-complement



Demo Godlygeek/tabular



Code alignment


[SD]
 , a=  by equal sign
 , a: Split  format by comma


Specific language


It's mostly Python  other languages and the front end, with a little less research used

python   golang   markdown

need other language support, can be fished on the GitHub, many of the popular vim configuration , eg. Spf13-vim
Python-syntax


The Python syntax is highlighted, which is Python.vim, in GitHub, with maintenance and updates scrooloose/syntastic



Static grammar and style check, support a variety of languages to modify the next marked a column of background color, the original background color under the solarized too ugly ...



Demo Kevinw/pyflakes-vim



Although this author recommends using Syntastic, this plugin is still needed for pythoner.



Because there is a special cow function, fly check, that is, encoding in the buffer state can dynamically check the wrong mark, make up for the syntastic can only save and open the error check syntax errors



Demo Jnwhiteh/vim-golang



Golang Syntax highlighting



Golang just started to use, the project has not officially started, at present many Golang manuals have to configure the introduction of Vim, follow-up needs to get Plasticboy/vim-markdown



Markdown syntax, editing MD file pangloss/vim-javascript



Occasionally will look at JS, frequency is not high



Other extension Enhancements


Self-configuring according to your own needs, no need to comment
Vim-scripts/tasklist.vim


View and quickly jump to the todo list in code



Refactoring code generally read through, mark modify location, very practical


[SD]
, TD open Todo List


Demo tpope/vim-fugitive



Git plug-in is not very accustomed, so the number of times is too small, and existing configuration shortcuts have conflicts, not resolved Sjl/gundo.vim



Edit file Time Machine


[SD], H  view file editing history
Vim-scripts/mru.vim


Recently opened file list


[SD], F show recently opened files
Thiderman/nginx-vim-syntax


The Nginx configuration file syntax is highlighted, and it is often useful to configure the server glench/vim-jinja2-syntax



JINJA2 syntax highlighting nono/jquery.vim



jquery Highlight



sjl/vitality.vim Vim-scripts/conque-shell to be inspected



After a while, not adapt, look back vim-scripts/yankring.vim



Clipboard reinforced, installed for a period of time found too little, unloaded .... Look back, vim-scripts/auto.git .



After a while, fast switching mode of



The Vim-scripts/python_match.vim that used to be discarded



Features: redefining%, you can jump in the Python if/elif/else try/except/finally structure, but the usual percent sign used too little, mainly is not smooth, unloading the



Be interested to try yonchu/accelerated-smooth-scroll



Move up and down, smooth scrolling, with a period of time, not adapt, unloading, see a person likes Ervandew/supertab



The Youcompleteme is included, so no nathanaelkane/vim-indent-guides is needed.



Block indent logo, but it's always very ugly, the one with the vertical line.



The above plugin does not have the buffer management, may search installs the Minibuferexplorer/buferexplorer, the plug-in is good, but currently does not use the custom, temporarily did not join



The end!



Wklken (Ling Yue/pythoner/vim Party probationary)



Email:wklken@yeah.net



Github:https://github.com/wklken



Blog:http://blog.csdn.net/wklken (Pending migration)



2013-06-11 in Shenzhen


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.