" Configuration file for vim set runtimepath=~/.vim,/usr/share/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/usr/share/vim/addons/after,~/.vim/after,~/.po-vim set nocompatible " Use Vim defaults instead of 100% vi compatibility set backspace=indent,eol,start " more powerful backspacing set smartindent " type of indent set tabstop=8 " number of space characters inserted by a tab key set shiftwidth=8 " number of space inserted by indentation "set expandtab " change tabs to spaces set softtabstop=8 " how many spaces = tab "set linebreak " Don't wrap words by default "set backup "set textwidth=0 " Don't wrap lines by default set textwidth=79 set viminfo='20,\"50 " read/write a .viminfo file, don't store more than " 50 lines of registers set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time set hlsearch set wrap set smartcase set nonumber set notitle " suppress title messages set noerrorbells " turn off error bells set showmode " show the current mode set visualbell " turn on the visual bell set complete=.,w,b,t " word completion rules set shell=zsh " set the shell set ignorecase " case insensitive search (default) set smartcase " search is case-insensitive until caps set incsearch " incremental search mode set infercase " correct case during completion set nomore " do not pause screenfulls of output "set statusline=%<%F%=%([%M%R%H%W]\ %)%l,%c%V\ %P\ (%n) "set scrolloff=2 " set number of scroll padding lines "set shortmess=aOtI " shorter messages "set cmdheight=2 " size of command area set shiftround " shift at columns that are indent multiples set showbreak=\\ " indicator for wrapped lines set showcmd " Show (partial) command in status line. set showmatch " Show matching brackets. set autowrite " Autosave before commands like :next and :make "set spl=ca spell " correcció de textos en catala set encoding=utf8 set fileencoding=utf8 set foldmethod=marker set background=dark syntax on " Enable syntax highlighting filetype on " Enable filetype detection filetype indent on " Enable filetype-specific indenting filetype plugin on " Enable filetype-specific plugins highlight clear WhitespaceEOL "set tags+=~/.systags "set tags+=~/.systags-cpp "autocmd Filetype c "set omnifunc=ccomplete#Complete map tb :tabnext map tp :tabprev map tn :tabnew map tc :tabclose " Suffixes that get lower priority when doing tab completion for filenames. " These are files we are not likely to want to edit or read. set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc " We know xterm-debian is a color terminal if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif " Some Debian-specific things if has("autocmd") augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END endif " Uncomment the following to have Vim jump to the last position when " reopening a file " if has("autocmd") " au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") " \| exe normal g'\"" | endif " endif " Set paper size from /etc/papersize if available (Debian-specific) if filereadable("/etc/papersize") try let s:shellbak = &shell let &shell="/bin/sh" let s:papersize = matchstr(system("cat /etc/papersize"), "\\p*") let &shell=s:shellbak if strlen(s:papersize) let &printoptions = "paper:" . s:papersize endif catch /^Vim\%((\a\+)\)\=:E145/ endtry endif map hl :call HighlightCurrentLine() endif " material per la sintaxi d'Ada let ada_standard_types = 1 let ada_space_errors =1 let ada_withuse_ordinary =1 let ada_begin_preproc =1 " 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