Plugin :
NeoComplete.vim (Complétion de syntaxe, variables, fichiers, mots, …)
~/.vimrc
Code :
"ilet loaded_matchparen = 1
let g:neocomplete#enable_at_startup = 1
filetype indent plugin off " KISS and no PEP8
set nobomb
set encoding=utf-8
"set uc=0
set noautoindent nosmartindent
set hlsearch
set tabpagemax=16
set foldmethod=indent
set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab " I’d prefer plain \t
syntax on
set bg=dark
colorscheme solarized
noremap <F8> :call HexMe()<CR>
let $in_hex=0
function HexMe()
set binary
if $in_hex>0
:%!xxd -r
let $in_hex=0
else
:%!xxd
let $in_hex=1
endif
endfunction
" Transparent editing of gpg encrypted files.
" By Wouter Hanegraaff
augroup encrypted
au!
" First make sure nothing is written to ~/.viminfo while editing
" an encrypted file.
autocmd BufReadPre,FileReadPre *.gpg set viminfo=
" We don’t want a various options which write unencrypted data to disk
autocmd BufReadPre,FileReadPre *.gpg set noswapfile noundofile nobackup
" Switch to binary mode to read the encrypted file
autocmd BufReadPre,FileReadPre *.gpg set bin
autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2
" (If you use tcsh, you may need to alter this line.)
autocmd BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt 2> /dev/null
" Switch to normal mode for editing
autocmd BufReadPost,FileReadPost *.gpg set nobin
autocmd BufReadPost,FileReadPost *.gpg let &ch = ch_save|unlet ch_save
autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r")
" Convert all text to encrypted text before writing
" (If you use tcsh, you may need to alter this line.)
autocmd BufWritePre,FileWritePre *.gpg '[,']!gpg --default-recipient-self -ae 2>/dev/null
" Undo the encryption so we are back in the normal text, directly
" after the file has been written.
autocmd BufWritePost,FileWritePost *.gpg u
augroup END
set statusline=%<%F\ [%{&ff}][%{&enc}%{((exists(\"+bomb\")\ &&\ &bomb)?\",\ BOM\":\"\")}]\ %=\ %-14.(%l,%c%V%)\ %P
set laststatus=2