[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 "
|
||||
"""""""""""""""
|
||||
" use tabs at the start of a line, spaces elsewhere
|
||||
" set smarttab
|
||||
" set smartindent
|
||||
set smarttab
|
||||
set smartindent
|
||||
set autoindent
|
||||
" tab=4
|
||||
set tabstop=4
|
||||
@ -118,12 +118,28 @@ if has("autocmd")
|
||||
autocmd BufRead,BufNewFile *.py set shiftwidth=4
|
||||
autocmd BufRead,BufNewFile *.py set softtabstop=4
|
||||
autocmd BufRead,BufNewFile *.py set modeline
|
||||
|
||||
autocmd BufRead,BufNewFile *.py set ft=python
|
||||
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")
|
||||
" 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
|
||||
autocmd BufReadPost * execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
|
||||
|
||||
@ -137,10 +153,12 @@ else
|
||||
" indent-expr
|
||||
"set indentexpr ""
|
||||
endif
|
||||
|
||||
""""""""""
|
||||
" SEARCH "
|
||||
""""""""""
|
||||
|
||||
set csprg=/home/mmaret/local/bin/cscope
|
||||
|
||||
" highlight search
|
||||
set hlsearch
|
||||
" unhighlight current search
|
||||
|
Loading…
Reference in New Issue
Block a user