Vim Configuration 2

Source: Internet
Author: User


"To determine whether it is under Windows or Linux
if (g:iswindows && G:isgui)
Nmap CT:!ctags-r--exclude=.svn<cr>
Else
Nmap CT:!find. /-name tags-exec RM-RF {} \;; Ctags-r--exclude=.svn<cr><cr>
endif

-----------------------------------------------------------------------------
  < ctags tool configuration >
-----------------------------------------------------------------------------
is very convenient for navigating through your code and can be used in functions, Jump between variables such as
set tags=./. /tags,tags;                              set the path to the find tags file, ending with a semicolon
set tags+=/usr/ include/tags;                          set the path to the find tags file, ending with a semicolon
set tags+=/mnt/package/kernel/ linux-3.2.80/tags;     "Sets the path of the find tags file, ending with a semicolon

-----------------------------------------------------------------------------
  < Nerdcommenter Plug-in configuration,
"-----------------------------------------------------------------------------
" I am mainly used for C + + code comments ( others)
"The following is the plug-in default shortcut key, which is described in C + + as an example, other languages similar to
" <leader>ci with A/* */comment in each line (the row of the selected area), and then uncomment
< LEADER>CM Select a row with a/* */Comment (the row of the selected area), and then enter the repeating comment
<LEADER>CC Select the row or area with a/* */comment per line, and then enter the repeating comment
"<Leader> Cu uncheck the comment of the area (row), the selected area (row) has at least one/* */
"<LEADER>CA in/*...*/and//both annotation modes (other languages may be different)
" <leader>ca End of line comment
Let nerdspacedelims = 1                      "After the left comment, leave a space before the right comment

" -----------------------------------------------------------------------------
"< Nerdtree plug-in Configuration >
" -----------------------------------------------------------------------------
"File browsing plugin with Directory village structure"
"In general mode, enter the DIR call plugin
Nmap DIR:CD%:p:h<cr>:nerdtreetoggle<cr>
Let g:winmanagerwindowlayout= ' fileexplorer| TagList '
Nmap wm:wmtoggle<cr>

Let Nerdtreedirarrows=1
Let Nerdchristmastree=0
Let nerdtreewinsize=25
Let nerdtreechdirmode=2
Let nerdtreeignore=[' \.svn$ ', ' \ags$ ', ' \~$ ', ' \.pyc$ ', ' \.swp$ ', ' \.$ ', ' \.tar$ ', ' \gz$ ']
Let Nerdtreeshowbookmarks=1
Let nerdtreewinpos= "left"

The Auto-open Nerdtree
"Autocmd Vimenter *.sh,*.c,*,inc,*.h,*.pyc,*,py Nerdtree

"Auto Close Nerdtree
Autocmd Bufenter * if (WINNR ("$") = = 1 && exists ("B:nerdtreetype") && B:nerdtreetype = = "PRIMARY") | Q | endif

Vim Configuration 2

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.