Skip to content

Commit

Permalink
Plugin Syntastic
Browse files Browse the repository at this point in the history
Syntastic gives you error checking for just about every language
imaginable right from within Vim! It shows you the offending line next
to the line numbers.
  • Loading branch information
jez committed Feb 25, 2015
1 parent b7ff90c commit 144f979
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Plugin 'bling/vim-airline'
" ----- Vim as a programmer's text editor -----------------------------
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'scrooloose/syntastic'

call vundle#end()

Expand Down Expand Up @@ -71,3 +72,12 @@ nmap <silent> <leader>t :NERDTreeTabsToggle<CR>
let g:nerdtree_tabs_open_on_console_startup = 0


" ----- scrooloose/syntastic settings -----
let g:syntastic_error_symbol = ''
let g:syntastic_warning_symbol = ""
augroup mySyntastic
au!
au FileType tex let b:syntastic_mode = "passive"
augroup END


10 comments on commit 144f979

@jez
Copy link
Owner Author

@jez jez commented on 144f979 Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(<-- prev step) ... (next step -->)

Not gonna lie, this plugin is pretty sick XD It also works basically out of the box, and in the background. For more information:

@asadali
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you maybe include a few screenshots as well to indicate the progress of your terminal as the packages start getting integrated?

@jez
Copy link
Owner Author

@jez jez commented on 144f979 Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can probably do that. It'll probably be the weekend before I have enough time to do it though.

@jez
Copy link
Owner Author

@jez jez commented on 144f979 Mar 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayedasadali Here's a link with a step-by-step list of screenshots. Enjoy!

@asadali
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey jez! thanks..
quick question: how much time does it take for vim to load with these plugins? NERDTree can slow it down. I am trying to gauge how much slower it may become or if there is a workaround.

@jez
Copy link
Owner Author

@jez jez commented on 144f979 Mar 11, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my MacBook Air it takes 0.1s to load vim -u NONE, and 0.5s to load vim with plugins.

The biggest performance related hit I take with these plugins comes from syntastic and vim-gitgutter, each of which have to run an external command every time I save. I was in the habit of saving very frequently (almost every time I made a change), and I started noticing that my cursor would start to lag somewhat after saving.

@dwlf
Copy link

@dwlf dwlf commented on 144f979 Mar 23, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lcd047 makes some great points in vim-syntastic/syntastic#1367 on how to get more out of syntastic, and how the configuration described here is insufficient.

@jez
Copy link
Owner Author

@jez jez commented on 144f979 Mar 24, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm interesting. I've never run into those specific issues; Syntastic has always worked for me with these preferences. Thanks for the reference though!

@aalireza
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You need to add "scriptencoding utf-8" since it contains utf-8 characters.

  2. Below is the recommended setting by Syntastic itself. Using below, one would know what the actual errors are, what's the line and column number etc.

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1

@anemadyan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only works if it's C, doesn't work for PHP or others. May I ask for solution?

Please sign in to comment.