2015-05-29 20:48:20 +02:00
|
|
|
set nocompatible
|
2015-10-28 19:22:10 +01:00
|
|
|
filetype off
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" init vundle
|
|
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
|
|
call vundle#begin()
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" Let Vundle manage Vundle
|
|
|
|
Plugin 'VundleVim/Vundle.vim'
|
2015-07-10 17:49:49 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" My plugins
|
|
|
|
Plugin 'scrooloose/nerdtree' " FileBrowser on the left side
|
|
|
|
Plugin 'ervandew/supertab' "Auto completion
|
|
|
|
Plugin 'jeetsukumaran/vim-buffergator' "Easy buffer switching
|
|
|
|
Plugin 'ap/vim-templates' "File templates
|
|
|
|
Plugin 'godlygeek/tabular' "Tabularize
|
2015-10-28 19:35:26 +01:00
|
|
|
Plugin 'MarcWeber/vim-addon-mw-utils' " Dependency for snipmate
|
|
|
|
Plugin 'tomtom/tlib_vim' "Dependency for snipmate
|
|
|
|
Plugin 'garbas/vim-snipmate' "Snippets
|
2015-10-28 20:18:24 +01:00
|
|
|
Plugin 'easymotion/vim-easymotion' "Easy Motion
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" End init vundle
|
|
|
|
call vundle#end()
|
|
|
|
filetype plugin indent on
|
2015-07-10 17:49:49 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" General configurations
|
|
|
|
set whichwrap+=<,>,[,]
|
|
|
|
set autoread "auto read file if changed
|
|
|
|
set wildmenu "Command completion
|
|
|
|
set gdefault " substitute all by default
|
2015-05-29 20:48:20 +02:00
|
|
|
set noruler
|
2015-10-28 19:22:10 +01:00
|
|
|
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
|
2015-05-29 20:48:20 +02:00
|
|
|
set showmatch
|
|
|
|
set mat=2
|
2015-10-28 19:22:10 +01:00
|
|
|
set noerrorbells "No visual nuisance
|
2015-05-29 20:48:20 +02:00
|
|
|
set novisualbell
|
|
|
|
set t_vb=
|
|
|
|
set tm=500
|
2015-10-28 19:22:10 +01:00
|
|
|
set encoding=utf8 "Always use utf8
|
2015-05-29 20:48:20 +02:00
|
|
|
set ffs=unix,dos,mac
|
2015-10-28 19:22:10 +01:00
|
|
|
set nobackup "Don't need a backup, I live on the edge
|
2015-05-29 20:48:20 +02:00
|
|
|
set nowb
|
|
|
|
set noswapfile
|
2015-10-28 19:22:10 +01:00
|
|
|
set expandtab "Tabbing
|
2015-05-29 20:48:20 +02:00
|
|
|
set smarttab
|
2015-10-28 19:22:10 +01:00
|
|
|
set ai "auto indent
|
|
|
|
set si "smart indent
|
|
|
|
set wrap "wrap lines
|
2015-05-29 20:48:20 +02:00
|
|
|
set shiftwidth=4
|
|
|
|
set tabstop=4
|
|
|
|
set lbr
|
|
|
|
set tw=500
|
2015-10-28 19:22:10 +01:00
|
|
|
set t_Co=256
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
syntax enable
|
|
|
|
colorscheme desert
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" Leader commands
|
2015-07-10 17:49:49 +02:00
|
|
|
let mapleader = ","
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-25 19:42:03 +01:00
|
|
|
nnoremap <silent> <leader><space> :noh<cr>
|
|
|
|
nnoremap <silent> <leader>c :%s/\s\+$//e<cr>
|
|
|
|
nnoremap <silent> <leader>v :%s/\n\{3,}/\r\r/e<cr>
|
|
|
|
nnoremap <silent> <leader>p :set invpaste paste?<cr>
|
2015-10-27 14:46:13 +01:00
|
|
|
nnoremap <leader>a :Tabularize /
|
|
|
|
vnoremap <leader>a :'<,'>Tabularize /
|
2015-10-26 11:58:41 +01:00
|
|
|
nnoremap <leader>w <C-w>v<C-w>l
|
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" Don't need a help
|
2015-07-10 17:49:49 +02:00
|
|
|
inoremap <F1> <nop>
|
|
|
|
nnoremap <F1> <nop>
|
|
|
|
vnoremap <F1> <nop>
|
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" Just a nuisance
|
2015-10-26 11:58:41 +01:00
|
|
|
nnoremap q: <nop>
|
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" No moving in insert mode allowed
|
2015-10-25 19:42:03 +01:00
|
|
|
ino <down> <Nop>
|
|
|
|
ino <up> <Nop>
|
|
|
|
ino <left> <Nop>
|
|
|
|
ino <right> <Nop>
|
2015-07-10 17:49:49 +02:00
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" Different use of undo
|
2015-05-29 20:48:20 +02:00
|
|
|
nnoremap U <c-r>
|
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" We don't need useless whitespace at the of the line
|
2015-05-29 20:48:20 +02:00
|
|
|
highlight WhitespaceEOL ctermbg=Red guibg=Red
|
|
|
|
match WhitespaceEOL /\s\+$/
|
|
|
|
|
2015-10-28 19:22:10 +01:00
|
|
|
" Rice
|
2015-05-29 20:48:20 +02:00
|
|
|
set statusline=%m
|
|
|
|
set statusline+=\ %f
|
|
|
|
set statusline+=%=
|
|
|
|
set statusline+=%l
|
|
|
|
set statusline+=\ %c
|
2015-10-15 20:48:01 +02:00
|
|
|
hi StatusLine cterm=None ctermfg=green ctermbg=none
|
2015-10-27 00:47:13 +01:00
|
|
|
hi Search cterm=NONE
|
|
|
|
hi IncSearch cterm=underline ctermbg=none ctermfg=green
|
2015-05-29 20:48:20 +02:00
|
|
|
|
2015-10-15 22:38:56 +02:00
|
|
|
"Supertab
|
2015-10-15 22:41:17 +02:00
|
|
|
hi Pmenu ctermfg=green ctermbg=black
|
|
|
|
hi PmenuSel ctermfg=white ctermbg=black
|
|
|
|
hi PmenuSbar ctermfg=white ctermbg=black cterm=none
|
|
|
|
let g:SuperTabNoCompleteAfter = ['^',',','\s']
|
2015-10-28 19:22:10 +01:00
|
|
|
|
|
|
|
"NERDTree tabs
|
|
|
|
nmap <silent> <leader>e :NERDTreeToggle<CR>
|
2015-10-28 20:24:52 +01:00
|
|
|
autocmd StdinReadPre * let s:std_in=1
|
|
|
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
2015-10-28 20:18:24 +01:00
|
|
|
|
|
|
|
"EasyMotion
|
|
|
|
map / <Plug>(easymotion-sn)
|
|
|
|
omap / <Plug>(easymotion-tn)
|
|
|
|
|
|
|
|
map n <Plug>(easymotion-next)
|
|
|
|
map N <Plug>(easymotion-prev)
|