1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +02:00

[vim] vimrc improvement, new plugins

This commit is contained in:
Hyacinthe Cartiaux 2013-07-26 11:22:22 +02:00
parent 1bf7c719f8
commit b8221c4f61

View file

@ -5,31 +5,49 @@
set rtp+=~/.vim/bundle/vundle/ set rtp+=~/.vim/bundle/vundle/
call vundle#rc() call vundle#rc()
Bundle 'tpope/vim-fugitive' " Git syntax highlighting and integration
Bundle 'tpope/vim-git' Bundle 'tpope/vim-git'
Bundle 'tpope/vim-fugitive'
Bundle 'gregsexton/gitv'
" nerd plugins
Bundle 'scrooloose/nerdtree' Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/nerdcommenter'
Bundle 'scrooloose/nerdsnippets'
" syntax highlighting
Bundle 'tpope/vim-markdown' Bundle 'tpope/vim-markdown'
Bundle 'vim-ruby/vim-ruby' Bundle 'vim-ruby/vim-ruby'
" Bundle 'altercation/vim-colors-solarized' " Surround selection with quotes, parenthesis…
Bundle 'tpope/vim-surround'
" Automatically closes functions, blocks, etc.
Bundle 'tpope/vim-endwise'
" A better stats bar
Bundle 'Lokaltog/vim-powerline'
" Aligns text.
Bundle 'godlygeek/tabular'
" Browse tags of source code files.
Bundle 'majutsushi/tagbar'
" Increment dates
Bundle 'tpope/vim-speeddating'
syntax on syntax on
set background=dark set background=dark
colorscheme default colorscheme default
" hi CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow
filetype on filetype on
" set mouse=a
" set number " set number
set ruler
set nocompatible set nocompatible
set hlsearch set hlsearch
set nostartofline set nostartofline
" Garde toujours une ligne visible au dessus du curseur
set scrolloff=1 set scrolloff=1
" Essaye de garder le curseur dans la même colonne quand on change de ligne
set nostartofline set nostartofline
set laststatus=2
set showcmd
set showmatch
set cursorline
" set smartindent " Indent
set cindent set cindent
set softtabstop=2 set softtabstop=2
set tabstop=2 set tabstop=2
@ -38,19 +56,17 @@ set shiftwidth=2
" set textwidth=80 " set textwidth=80
" set mouse=a " Encoding
set encoding=utf-8 set encoding=utf-8
set fileencoding=utf-8 set fileencoding=utf-8
set showcmd
set showmatch " filename completion
set cursorline set wildmode=list:longest,list:full
set wildignore+=*.o,*.obj,.git,*.rbc
let g:qb_hotkey = "<F1>" let g:qb_hotkey = "<F1>"
"set laststatus=2
" Centralize backups, swapfiles and undo history " Centralize backups, swapfiles and undo history
set backup set backup
set backupdir=$HOME/.vim/backup set backupdir=$HOME/.vim/backup
@ -61,6 +77,7 @@ endif
set viminfo+=n$HOME/.vim/.viminfo set viminfo+=n$HOME/.vim/.viminfo
" Vim 7 spell checker (z=) " Vim 7 spell checker (z=)
" http://ftp.vim.org/pub/vim/runtime/spell/
if has("spell") if has("spell")
setlocal spell spelllang= setlocal spell spelllang=
" Language : FR " Language : FR
@ -97,3 +114,14 @@ endfun
autocmd BufWritePre * call StripTrailingWhitespace() autocmd BufWritePre * call StripTrailingWhitespace()
autocmd FileType markdown let b:noStripWhitespace=1 autocmd FileType markdown let b:noStripWhitespace=1
" Completion, C-X C-O in insert mode, navigation with C-N/C-P
" http://vim.wikia.com/wiki/Omni_completion
filetype plugin on
set ofu=syntaxcomplete#Complete
map <F3> <Esc>:tabnext<CR>
map <F2> <Esc>:tabprevious<CR>
map <F4> :NERDTreeToggle<CR>
map <F5> :TagbarToggle<CR>
map <F6> <Esc>:set paste<CR>
map <F10> <Esc>:s/"/'/g<CR>