[vim] add .bin and .iris filetype.
.bin a read in hexa. .iris file are set to filetype=python .python file are set to filetype=python Use smarttab and smartindent
This commit is contained in:
parent
77458559c0
commit
9d20254e66
28
.vimrc
28
.vimrc
@ -96,8 +96,8 @@ highlight SpaceError ctermfg=235 cterm=reverse
|
|||||||
" INDENTATION "
|
" INDENTATION "
|
||||||
"""""""""""""""
|
"""""""""""""""
|
||||||
" use tabs at the start of a line, spaces elsewhere
|
" use tabs at the start of a line, spaces elsewhere
|
||||||
" set smarttab
|
set smarttab
|
||||||
" set smartindent
|
set smartindent
|
||||||
set autoindent
|
set autoindent
|
||||||
" tab=4
|
" tab=4
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
@ -118,12 +118,28 @@ if has("autocmd")
|
|||||||
autocmd BufRead,BufNewFile *.py set shiftwidth=4
|
autocmd BufRead,BufNewFile *.py set shiftwidth=4
|
||||||
autocmd BufRead,BufNewFile *.py set softtabstop=4
|
autocmd BufRead,BufNewFile *.py set softtabstop=4
|
||||||
autocmd BufRead,BufNewFile *.py set modeline
|
autocmd BufRead,BufNewFile *.py set modeline
|
||||||
|
autocmd BufRead,BufNewFile *.py set ft=python
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if has("autocmd")
|
||||||
|
autocmd BufRead,BufNewFile *.iris set ft=python
|
||||||
|
endif
|
||||||
|
|
||||||
|
" vim -b : edit binary using xxd-format!
|
||||||
|
augroup Binary
|
||||||
|
au!
|
||||||
|
au BufReadPre *.bin let &bin=1
|
||||||
|
au BufReadPost *.bin if &bin | %!xxd
|
||||||
|
au BufReadPost *.bin set ft=xxd | endif
|
||||||
|
au BufWritePre *.bin if &bin | %!xxd -r
|
||||||
|
au BufWritePre *.bin endif
|
||||||
|
au BufWritePost *.bin if &bin | %!xxd
|
||||||
|
au BufWritePost *.bin set nomod | endif
|
||||||
|
augroup END
|
||||||
|
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
" enable file type detection and do language-dependent indenting
|
" enable file type detection and do language-dependent indenting
|
||||||
" filetype plugin indent on
|
filetype indent on
|
||||||
" detect indentation see http://www.freehackers.org/Indent_Finder
|
" detect indentation see http://www.freehackers.org/Indent_Finder
|
||||||
autocmd BufReadPost * execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
|
autocmd BufReadPost * execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
|
||||||
|
|
||||||
@ -137,10 +153,12 @@ else
|
|||||||
" indent-expr
|
" indent-expr
|
||||||
"set indentexpr ""
|
"set indentexpr ""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
""""""""""
|
""""""""""
|
||||||
" SEARCH "
|
" SEARCH "
|
||||||
""""""""""
|
""""""""""
|
||||||
|
|
||||||
|
set csprg=/home/mmaret/local/bin/cscope
|
||||||
|
|
||||||
" highlight search
|
" highlight search
|
||||||
set hlsearch
|
set hlsearch
|
||||||
" unhighlight current search
|
" unhighlight current search
|
||||||
|
Loading…
Reference in New Issue
Block a user