Skip to content

Instantly share code, notes, and snippets.

@superboum
Created June 26, 2015 14:23
Show Gist options
  • Save superboum/90faf4e644a4cc46e740 to your computer and use it in GitHub Desktop.
Save superboum/90faf4e644a4cc46e740 to your computer and use it in GitHub Desktop.
My vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
" call vundle#begin('~/some/path/here')
Plugin 'gmarik/Vundle.vim'
"theme
Plugin 'chriskempson/vim-tomorrow-theme'
"syntax
Plugin 'kchmck/vim-coffee-script'
Plugin 'groenewege/vim-less'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'othree/html5.vim'
Plugin 'gregsexton/MatchTag'
Plugin 'leafgarland/typescript-vim'
Plugin 'digitaltoad/vim-jade'
" syntax checker
Plugin 'scrooloose/syntastic'
"""""""""""""""""""""
"""" EXTRA TOOLS """"
"""""""""""""""""""""
"comment lines
Plugin 'scrooloose/nerdcommenter'
" Tab /= align all =
Plugin 'godlygeek/tabular'
"Fuzzy file, buffer, mru, tag, etc finder. http://kien.github.com/ctrlp.vim
Plugin 'kien/ctrlp.vim'
"type :ChromeReload to reload Chrome
Plugin 'lordm/vim-browser-reload-linux'
Plugin 'evidens/vim-twig'
Plugin 'scrooloose/nerdtree'
call vundle#end()
"let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
syntax on
colorscheme Tomorrow-Night
" GENERAL ABOUT VIM AND CODE
set number " line number
set autoindent
set smartindent
set mouse=a " use mouse
set scrolljump=4 " lines to scroll when cursor leaves screen
set scrolloff=5 " minimum lines to keep above and below cursor
set history=1000
"The current buffer can be put to the background without writing to disk;
"When a background buffer becomes current again, marks and undo-history are remembered.
set hidden
nnoremap ' `
nnoremap ` '
set title
set shortmess=atI
"deal with tabs : http://tedlogan.com/techblog3.html
set tabstop=2 " on en souhaite 3 quand on press tab
set expandtab " Spaces instead of tabs
set shiftwidth=2 " on en souhaite 3 pour l'indentation
"set foldenable " auto fold code
set gdefault " the /g flag on 😖
"substitutions by default
set encoding=utf-8
set fileencodings=utf-8
let mapleader=","
"ABOUT AUTOCOMPLETION
set wildmenu " show list instead of just completing
set wildmode=list:longest,full " comand <Tab> completion, list matches, then longest common part, then all.
"ABOUT SEARCH
set incsearch " find as you type search
set ignorecase " case insensitive search
set smartcase " case sensitive when uc present
nmap <F7> :tabnew /home/qdufour/.vimrc<ENTER>
nmap <F8> :source $MYVIMRC<ENTER>
"Activation de l'autocomplétion
filetype on
filetype plugin on
filetype indent on "Automatically detect file types.
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
"autocmd FileType less set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
au BufNewFile,BufRead *.ejs set filetype=html
au BufNewFile,BufRead *.coffee setl shiftwidth=2 expandtab
au BufNewFile,BufRead *.coffee setf=coffee
" Swap files
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment