Vim development environment in linux

Source: Internet
Author: User
For more information about the ROR editor in deep LINUX, refer to ghost.

ROR editor for deep LINUX

Reference: http://www.2cto.com/ OS /201110/107773.html
Vim home: http://www.vim.org/index.php

1. install the nerdtree. plug-in vim
Git clone git: // github.com/scrooloose/nerdtree.git
Rake
2. use:
: NERDTree # Enable
Exit by q
More --
O open and close files or directories
T open in the tab
T open in the background tab
! Execute this file
P to the upper Directory
P to the root directory
K to the first node
J to the last node
U open the upper Directory
M: displays the file system menu (add, delete, and move operations)
? Help
Q close
Ctr + w + h cursor focus left tree directory,
Ctrl + w + l The right-side file display window of the cursor focus.
Press ctrl + w multiple times, and the cursor is automatically switched in the left-right window
3.
Git clone git: // github.com/tpope/vim-rails.git
Cp-R autoload doc plugin ~ /. Vim

4. Rake
: Any Redit file, relative path
: Rlog log file
: Rpreview open the browser, http: // localhost: 3000
: Rtags: generate a tag, which must be ctags.
: Rrefresh
: Rfind File query, can not write. rb suffix
The gf command is super powerful and jumps to the file according to the content at the current cursor

Open directly
: Rmodel
: Rmigration
: Robserver
: Rfixtures
: Runittest
: Rcontroller
: Rhelper
: Rview
: Rlayout
: Rapi
: Rfunctionaltest
: Rstylesheet
: Rjavascript
: Rplugin
: Rlib
: Rtask
: Rintegrationtest

: Rscript
: Rconsole
: Rgenerate
: Rserver
: Rserver! Force run. killing the previous one is equivalent to restarting.

Refactoring:
: Rextract simply puts forward a section in rhtml into a subpage.

5. install snipmate
Git clone git: // github.com/msandres/snipmate.vim.git
Cd snipmate. vim
Cp-R *~ /. Vim
But the ERB file is invalid. This problem has not been resolved.

6. FuzzyFinder. vim + A9

7. http://www.vim.org/scripts/script.php? Script_id = 1, 1338
Tabbar Alt-bufNumber

8.
Git clone git: // github.com/pangloss/vim-javascript.git
Cd vim-javascript
Rake install

9. http://www.vim.org/scripts/script.php? Script_id = 1, 2280
Blackboard. vim
: Color blackboard
------ But I found that color blackboard can be used directly under plugin.

10 .. vimrc
"Window size when vim is started
Set lines = 35columns = 120

"Incompatible VI keyboard, using vim keyboard
Set nocompatible

"File type identification
Filetype on
Filetype plugin indent on

"Do not generate temporary files
Set nobackup
Set noswapfile

"Number of historical records
Set history = 50

"Set encoding
Set enc = UTF-8

"Set file encoding
Set fenc = UTF-8

"Sets the file encoding detection type and Supported formats
Set fencs = UTF-8, ucs-bom, gb18030, gbk, gb2312, cp936

"Set to enable syntax highlighting
Syntax on

"Display row number
Set number

"Highlight matching brackets
Set showmatch

"Case-insensitive search
Set ignorecase

"High brightness display of search results
Set hlsearch
Set incsearch

"Tab width
Set tabstop = 4
Set cindent shiftwidth = 4
Set autoindent shiftwidth = 4
 
"The command line is automatically completed by pressing the tab key.
Set wildmode = list: full
Set wildmenu

"Set the default color
Colorscheme darkblue
 
"Do not separate words with the following symbols by line breaks
Set iskeyword + =_, $, @, % ,#,-
 
"The commands command tells us which row of the file has been changed.
Set report = 0
 
"You can use the mouse anywhere in the buffer (similar to double-click the mouse in the workspace in office to locate the location)
Set mouse =
Set selection = exclusive
Set selectmode = mouse, key

"Set auto save
Imap : Up

"Map F8 to start the NERDTree plug-in.
Let NERDTreeShowBookmarks = 1
Let NERDChristmasTree = 1
Let NERDTreeWinPos = "left"
Map : NERDTree

"Move in different windows
Map J
Map K
Map H
Map L

"Set FuzzyFinder
Let mapleader = "\\"
Map F: FufFile
Map F: FufTaggedFile
Map G: FufTag
Map B: FufBuffer

"Set Color-Sample
Map : NEXTCOLOR
Map : PREVCOLOR

"Set Rubytest
Let g: rubytest_cmd_spec = "rspec-fd % p"

"Set SuperTab
Let g: SuperTabRetainCompletionType = "context"

11. autoclose. vim surround. vim
Https://github.com/tpope/vim-surround

12.
Vim-pathogen
Https://github.com/tpope/vim-pathogen
Mkdir-p ~ /. Vim/autoload ~ /. Vim/bundle;
Curl-so ~ /. Vim/autoload/pathogen. vim https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim
Add call pathogen # infect ()
It was not successful (it was later confirmed successful, but there was a problem with fugitive)
Fugitive
Cd ~ /. Vim/bundle
Git clone git: // github.com/tpope/vim-fugitive.git
: Help vim-fugitive

Tabular
Https://github.com/godlygeek/tabular

Taglist
Git clone git: // github.com/vim-scripts/taglist.vim.git

Zendcoding
Git clone https://github.com/mattn/zencoding-vim.git
Http://mattn.github.com/zencoding-vim/
Not doing well. try again later.
13. exit all tabs at a time: qa!

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.