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