Vimrc cleaned up + Vundle

This commit is contained in:
madmaurice 2015-10-28 19:22:10 +01:00
parent b8812e8fb0
commit 2505dcd8ce

View file

@ -1,78 +1,63 @@
set nocompatible set nocompatible
filetype off
" CL History " init vundle
set history=700 set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
set modelines=0 " Let Vundle manage Vundle
Plugin 'VundleVim/Vundle.vim'
"Enable filetype plugins " My plugins
filetype plugin on Plugin 'scrooloose/nerdtree' " FileBrowser on the left side
filetype indent on Plugin 'ervandew/supertab' "Auto completion
Plugin 'msanders/snipmate.vim' "Snippets
Plugin 'jeetsukumaran/vim-buffergator' "Easy buffer switching
Plugin 'ap/vim-templates' "File templates
Plugin 'godlygeek/tabular' "Tabularize
"Set to auto read if file is changed " End init vundle
set autoread call vundle#end()
filetype plugin indent on
"wildmenu
set wildmenu
set wildignore=*.o,*~,*.pyc
set gdefault
" General configurations
set whichwrap+=<,>,[,]
set autoread "auto read file if changed
set wildmenu "Command completion
set gdefault " substitute all by default
set noruler set noruler
set laststatus=2 set laststatus=2 " Add Status line always
set number "Show linenumbers
"set cmdheight=2 set backspace=eol,start,indent "Make backspace behave like it's supposed to
set incsearch "Search while typing pattern
set number set lazyredraw "No redrawing while running macros
set magic "Allow magic modelines
set hid
set backspace=eol,start,indent
set incsearch
set lazyredraw
set magic
set showmatch set showmatch
set mat=2 set mat=2
set noerrorbells "No visual nuisance
set noerrorbells
set novisualbell set novisualbell
set t_vb= set t_vb=
set tm=500 set tm=500
set encoding=utf8 "Always use utf8
syntax enable
colorscheme desert
set encoding=utf8
set ffs=unix,dos,mac set ffs=unix,dos,mac
set nobackup "Don't need a backup, I live on the edge
set nobackup
set nowb set nowb
set noswapfile set noswapfile
set expandtab "Tabbing
set expandtab
set smarttab set smarttab
set shiftwidth=4
set tabstop=4
set lbr
set tw=500
set ai "auto indent set ai "auto indent
set si "smart indent set si "smart indent
set wrap "wrap lines set wrap "wrap lines
set shiftwidth=4
set tabstop=4
set lbr
set tw=500
set t_Co=256
syntax enable
colorscheme desert
" Leader commands
let mapleader = "," let mapleader = ","
nnoremap <silent> <leader><space> :noh<cr> nnoremap <silent> <leader><space> :noh<cr>
@ -82,51 +67,44 @@ nnoremap <silent> <leader>p :set invpaste paste?<cr>
nnoremap <leader>a :Tabularize / nnoremap <leader>a :Tabularize /
vnoremap <leader>a :'<,'>Tabularize / vnoremap <leader>a :'<,'>Tabularize /
nnoremap <leader>w <C-w>v<C-w>l nnoremap <leader>w <C-w>v<C-w>l
nmap <leader>s /\V
nmap <Esc><left> :tabp<cr> " Don't need a help
nmap <Esc><right> :tabn<cr>
nmap f /
nmap F ?
inoremap <F1> <nop> inoremap <F1> <nop>
nnoremap <F1> <nop> nnoremap <F1> <nop>
vnoremap <F1> <nop> vnoremap <F1> <nop>
" Just a nuisance
nnoremap q: <nop> nnoremap q: <nop>
" No moving in insert mode allowed
ino <down> <Nop> ino <down> <Nop>
ino <up> <Nop> ino <up> <Nop>
ino <left> <Nop> ino <left> <Nop>
ino <right> <Nop> ino <right> <Nop>
nnoremap / /\V " Different use of undo
vnoremap / /\V
nnoremap ? ?\V
vnoremap ? ?\V
set whichwrap+=<,>,[,]
" nnoremap <F5> :buffers<CR>:buffer<Space>
nnoremap U <c-r> nnoremap U <c-r>
" We don't need useless whitespace at the of the line
highlight WhitespaceEOL ctermbg=Red guibg=Red highlight WhitespaceEOL ctermbg=Red guibg=Red
match WhitespaceEOL /\s\+$/ match WhitespaceEOL /\s\+$/
" Rice
set statusline=%m set statusline=%m
set statusline+=\ %f set statusline+=\ %f
set statusline+=%= set statusline+=%=
set statusline+=%l set statusline+=%l
set statusline+=\ %c set statusline+=\ %c
hi StatusLine cterm=None ctermfg=green ctermbg=none hi StatusLine cterm=None ctermfg=green ctermbg=none
hi Search cterm=NONE hi Search cterm=NONE
hi IncSearch cterm=underline ctermbg=none ctermfg=green hi IncSearch cterm=underline ctermbg=none ctermfg=green
set t_Co=256
"Supertab "Supertab
hi Pmenu ctermfg=green ctermbg=black hi Pmenu ctermfg=green ctermbg=black
hi PmenuSel ctermfg=white ctermbg=black hi PmenuSel ctermfg=white ctermbg=black
hi PmenuSbar ctermfg=white ctermbg=black cterm=none hi PmenuSbar ctermfg=white ctermbg=black cterm=none
let g:SuperTabNoCompleteAfter = ['^',',','\s'] let g:SuperTabNoCompleteAfter = ['^',',','\s']
"NERDTree tabs
nmap <silent> <leader>e :NERDTreeToggle<CR>