Added the syntastic plugin to "vimrc"

This commit is contained in:
Logan Saunders 2015-05-31 17:19:42 -07:00
parent 6f41a97be0
commit 6c4b4c5228
2 changed files with 42 additions and 13 deletions

View file

@ -1,7 +1,23 @@
# Dotfiles
![Setup Preview](https://i.imgur.com/MAr424z.png)
This repo includes my tmux.conf and vimrc along with the scripts used in said tmux.conf. **Note:** my vimrc is using [vundle](https://github.com/gmarik/Vundle.vim) so don't just copy and paste it without installing vundle (also directly copying a vimrc is usually not a good idea).
This repo includes my tmux.conf and vimrc along with the scripts used in said tmux.conf.
**Note:** my vimrc is using [vundle](https://github.com/gmarik/Vundle.vim) so don't just copy and paste it without installing vundle
(also directly copying a vimrc is usually not a good idea).
##Fonts
###Fonts
The vimrc and tmux.conf files require patched fonts in order to be displayed correctly. I recommend [DejaVu Sans Mono for Powerline](https://github.com/powerline/fonts/tree/master/DejaVuSansMono) but you can find patched versions of many more fonts in that repository.
##Syntastic
One of the vim plugins in the vimrc file, syntastic requires small programs called "checkers" to work properly. These check your code and find any errors or,
in some cases, inefficiencies or code smells and are specific to one or two programming languages. Here are the checkers used in this vimrc (not including gcc which is found on practically every Unix-based OS on the planet and any other checker included in the command used to compile the language's files):
* [tidy5](http://www.htacg.org/tidy-html5/)
* [csslint](https://www.npmjs.com/package/csslint)
* [jshint](http://jshint.com/)
* [cppcheck](http://cppcheck.sourceforge.net/)
* [cpplint](https://gist.github.com/gigavinyl/fcb45d9d50a7287d3eb1)
* [rubylint](https://github.com/YorickPeterse/ruby-lint)
* [pylint](http://www.pylint.org/)

35
vimrc
View file

@ -15,14 +15,14 @@ set smartindent
"Tab
set tabstop=2 shiftwidth=0 expandtab
set pastetoggle=<F2>
let mapleader = ","
let mapleader = ','
"Line wrapping
set wrap
set linebreak
set nolist
set nocompatible " be iMproved, required
filetype off " required
set nocompatible
filetype off
""""""""Setup Vundle""""""""
" set the runtime path to include Vundle and initialize
@ -38,7 +38,6 @@ Plugin 'airblade/vim-gitgutter'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'Townk/vim-autoclose'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'kchmck/vim-coffee-script'
Plugin 'pangloss/vim-javascript'
@ -46,7 +45,6 @@ Plugin 'jelera/vim-javascript-syntax'
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'tpope/vim-haml'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'bling/vim-bufferline'
Bundle 'kien/ctrlp.vim'
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
@ -54,6 +52,7 @@ Bundle 'vim-ruby/vim-ruby'
Bundle 'scrooloose/nerdcommenter'
Bundle 'tpope/vim-surround'
Bundle 'ervandew/supertab'
Bundle 'scrooloose/syntastic'
call vundle#end() " required
filetype plugin indent on " required
@ -82,6 +81,7 @@ nnoremap <leader>v :vsplit<CR>
nnoremap <leader>bd :bd<CR>
nnoremap <leader>bn :bnext!<CR>
nnoremap <leader>bp :bprevious!<CR>
nnoremap <leader>c :lclose<CR>
""""""Setup ctlp""""""
@ -104,10 +104,23 @@ let g:cpp_class_scope_highlight = 1
let g:cpp_experimental_template_highlight = 1
""""""Enable Better HTML AutoIndent""""""
let g:html_indent_inctags = "html,body,head,tbody, div, img, a"
let g:html_indent_inctags = 'html,body,head,tbody, div, img, a'
""""""Configure Bufferline""""""
let g:bufferline_echo = 0
let g:bufferline_show_bufnr = 0
let g:bufferline_echo = 0
autocmd VimEnter * let &statusline='%{bufferline#refresh_status()}'.bufferline#get_status_string()
""""""Enable vim-airline's tabline""""""
let g:airline#extensions#tabline#enabled = 1
""""""Config syntastic""""""
"Configure Error messages and their behavior
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
"Add and configure checkers
let g:syntastic_html_tidy_exec = 'tidy5'
let g:syntastic_cpp_cppcheck_exec = 'cppcheck'
let g:syntastic_cpp_cpplint_exec = 'cpplint'
let g:syntastic_cpp_checkers = ['gcc', 'cppcheck', 'cpplint']
let g:syntastic_vim_checkers = ['vint']