Setting up the editing environment---vim

Source: Internet
Author: User
Tags set background git clone

Major premise: Install git: sudo apt-get install Git-core , because many of the following are available on GitHub.

In addition, unreasonable point of view (concrete principle such as the small have not seen >.<, PA pa face)

1. Terminal using solarized color Matching

Color Theme From: https://github.com/seebi/dircolors-solarized

The following scenarios are from: http://blog.csdn.net/lucktroy/article/details/7825805

Set solarized theme for GNU ls:

git clone git://github.com/seebi/dircolors-solarized.git

Make a specific color match (the specific selection is described in the color theme, the following refers to the dark256 scheme):

CP ~/dircolors-solarized/dircolors.256dark ~/.dircolors
' dircolors. Dircolors '

Setting Terminal supports 256 colors:

Open vim .bashrc and add export TERM=xterm-256color这段在保存 it, so the dircolors for GNU LS is set to complete

Next download Solarized's gnome-terminal color:

Enter the following statement

git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git

Then enter the following directory

CD gnome-terminal-colors-solarized

Run ./set_dark.sh or ./set_light.sh in this directory (depending on the color scheme you choose)

After running, you will silently find the background turned dark blue---complete!

As the Terminator has just been set to the above appearance, after the supplement (very recommended Terminator, use a bit, instantly feel cool)

2. Vim Configuration----Plugin

The following scenarios are mainly from: http://feihu.me/blog/2014/intro-to-vim/

1. Plug-in Management---vundle

To make the plug-in easier to manage later

Plugin from: Https://github.com/gmarik/Vundle.vim

Installation method: (In fact, GitHub on the project gives a very detailed description!) Likes ~)

  1. Clone on GitHub (enter the following statement in terminal)
    git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/vundle.vim
  2. Configuration plugin: Enter Vim ~/.VIMRC to add the following code inside
    Set nocompatible"Be improved, requiredFileType off"Required"set the runtime path to include Vundle and initializeSet rtp+=~/.vim/bundle/Vundle.vimcall Vundle#begin ()"Alternatively, pass a path where vundle should install plugins"Call vundle#begin (' ~/some/path/here ')"Let Vundle manage Vundle, requiredPlugin'Gmarik/vundle.vim'""ADD The Plugin you wanted follows"All of your Plugins must is added before the following lineCall Vundle#End () "RequiredFileType plugin indent on"Required"to ignore plugin indent changes, instead use:"filetype plugin on""Brief Help":P luginlist-lists configured plugins":P lugininstall-installs plugins, append '! ' to update or just:P luginupdate":P luginsearch foo-searches for foo, append '! ' to refresh local cache":P luginclean-confirms removal of unused plugins; Append '! ' to auto-approve removal""see:h Vundle For more details or wiki for FAQ"Put your non-plugin stuff after this Lin
  3. Install plug-ins: Run Vim, then :P lugininstall will display done! when finished

(Many of the following plugins are based on Vundle)

2. Vim color scheme---here is best consistent with previous terminal scenarios

Plugin Source: https://github.com/altercation/solarized

Enter the Vim ~/.VIMRC, between the following code

Call Vundle#begin () "" "" "" " below here " "" "" on top call Vundle#  End ()

Add plug-in code (and see another way of expressing it):

' git://github.com/altercation/v|~ im-colors-solarized.git '

Turn on vim and run :P lugininstall is OK.

Then modify the. VIMRC configuration by adding the following statement:

syntax enableset background=Darkcolorscheme solarized

If you want light, as long as set Background=light can

3. Navigation and Indexing---nerdtree

Plugin Source: Https://github.com/scrooloose/nerdtree

The installation method is basically the same as the color scheme.

Adding statements in. vimrc

' Git://github.com/scrooloose/nerdtree.git '

When running vim, enter:P Lugininstall wait for done to OK (don't doubt it, open vim don't see effect don't busy Pluginclean, because the default does not open)

As Nerdtree also has a lot of commands to operate, see http://www.cnblogs.com/mo-beifeng/archive/2011/09/08/2171018.html

Add the following statement to the. VIMRC (used to turn navigation on and off, in addition, some operations subsequent configuration plus allow mouse operation can be faster, open and close shortcut keys F2):

Map <F2>:nerdtreemirror<cr><F2>:nerdtreetoggle<cr>

Or

Map <silent> <F2>:nerdtreetoggle<cr>
4. Taglist---Information list

Plugin Source: Https://github.com/vim-scripts/taglist.vim

Mainly lists the macros, global variables, functions, classes, and other information in the current file.

The installation method is similar to the above

There are a few differences that need to be installed ctags: sudo apt-get install ctags

Adding statements in. vimrc

' Git://github.com/vim-scripts/taglist.vim.git '

When running vim, enter :P lugininstall wait for done to OK

The additional. VIMRC configuration file is as follows (Open/Close shortcut key F3):

Let tlist_show_one_file=1    " Show Only tags let tlist_winwidth=30 for current files        " setting taglist width let tlist_exit_onlywindow=1  "taglist window is the last window, then exit vim"  Display TagList window on the right side of the Vim window map <silent> <F3>:tlisttoggle<cr>

Additionally, additional special effects duang~ are added, referring to the http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html

The rest of the plug-in has not been installed and tried, temporarily before ~ because the main learning C (instantaneous exposure of small rookie nature), after a period of time to add plug-ins

Setting up the editing environment---vim

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.