" Use vim settings, instead of vi set nocompatible set ts=4 set sw=4 set bs=2 set nobackup set noswapfile set modeline set ruler set history=50 set nowrap " Change terminal title set title " No annoying error noises set noerrorbells " Make backspace delete lots of things set backspace=indent,eol,start " Show us the command we're typing set showcmd " Highlight matching parens set showmatch " Search options: incremental search, highlight search set hlsearch set incsearch " Selective case insensitivity set smartcase " Show full tags when doing search completion set showfulltag " Speed up macros set lazyredraw " No annoying error noises set noerrorbells " Wrap on these set whichwrap+=<,>,[,] " Use the cool tab complete menu set wildmenu set wildmode=longest,full set wildignore+=*.o,*~ set suffixes+=.in,.a " Allow edit buffers to be hidden set hidden " 1 height windows set winminheight=1 " misc set autowrite set autochdir set ttyfast set smartcase set complete-=i if has("autocmd") filetype plugin indent on else set ai endif " Activer la coloration if &t_Co > 2 || has("gui_running") syntax on set nohls endif if has("gui_running") colorscheme slate set guifont=Monospace\ 8 set guioptions-=T set guioptions-=m set guioptions-=l set guioptions-=L set guioptions-=r set guioptions-=R set mouse=ar set mousemodel=extend set mousefocus set mousehide set noguipty set guicursor=a:blinkon0 highlight Normal gui=NONE guibg=Black guifg=White highlight NonText gui=NONE guibg=Black highlight Pmenu gui=NONE guifg=Black guibg=LightGrey highlight PmenuSel gui=NONE guifg=LightGrey guibg=Black highlight PmenuSbar gui=NONE guifg=LightGrey guibg=Black highlight PmenuThumb gui=NONE guifg=Black guibg=LightGrey endif function! CleverTab(direction) let idx = col('.') - 1 let str = getline('.') if a:direction == "forward" && idx >= 2 && str[idx - 1] == ' ' && str[idx - 2] =~? '[a-z]' if &softtabstop && idx % &softtabstop == 0 return "\\\" else return "\\" endif elseif idx == 0 || str[idx - 1] !~? '[a-z]' return "\" elseif "backward" == a:direction return "\" else return "\" endif endf function! ClosePair(char) if getline('.')[col('.') - 1] == a:char return "\" else return a:char endif endf inoremap =CleverTab("forward") inoremap =CleverTab("backward") if has("gui_running") inoremap pumvisible()?"\":"\" inoremap pumvisible()?"\":"\" inoremap pumvisible()?"\":"\" inoremap pumvisible()?"\":"\" inoremap pumvisible()?"\\\":"\" inoremap pumvisible()?"\\\":"\" endif inoremap inoremap ( ()i inoremap ) =ClosePair(')') inoremap { {}i inoremap } =ClosePair('}') inoremap [ []i inoremap ] =ClosePair(']') " Paste map map! " Change buffer map :bn map :bp " Shell like Home / End cnoremap cnoremap " Hide coloration of found words map :nohlsearch " Tabs map :tabnew map :tabnext map :tabprevious