Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Misc/Vim/vimrc

    r2 r391  
    1616" Some suggested options are listed but commented out at the end of this file.
    1717
     18" Number of spaces that a pre-existing tab is equal to.
     19" For the amount of space used for a new tab use shiftwidth.
     20au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8
    1821
    19 " Number of spaces to use for an indent.
     22" What to use for an indent.
    2023" This will affect Ctrl-T and 'autoindent'.
    2124" Python: 4 spaces
    22 " C: 8 spaces (pre-existing files) or 4 spaces (new files)
     25" C: tabs (pre-existing files) or 4 spaces (new files)
    2326au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
    24 au BufRead *.c,*.h set shiftwidth=8
    25 au BufNewFile *.c,*.h set shiftwidth=4
    26 
    27 " Number of spaces that a pre-existing tab is equal to.
    28 " For the amount of space used for a new tab use shiftwidth.
    29 " Python: 8
    30 " C: 8
    31 au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8
    32 
    33 " Replace tabs with the equivalent number of spaces.
    34 " Also have an autocmd for Makefiles since they require hard tabs.
    35 " Python: yes
    36 " C: no
    37 " Makefile: no
    3827au BufRead,BufNewFile *.py,*.pyw set expandtab
    39 au BufRead,BufNewFile *.c,*.h set noexpandtab
     28fu Select_c_style()
     29    if search('^\t', 'n', 150)
     30        set shiftwidth=8
     31        set noexpandtab
     32    el
     33        set shiftwidth=4
     34        set expandtab
     35    en
     36endf
     37au BufRead,BufNewFile *.c,*.h call Select_c_style()
    4038au BufRead,BufNewFile Makefile* set noexpandtab
    4139
    42 " Use the below highlight group when displaying bad whitespace is desired
     40" Use the below highlight group when displaying bad whitespace is desired.
    4341highlight BadWhitespace ctermbg=red guibg=red
    4442
Note: See TracChangeset for help on using the changeset viewer.