Browse Source

use Syntastic

I'm not sure if I'll stick with this or not, but its default mode of
operation seems to be about the right amount of in-your-face, at least
for the stuff I've tried it on today:  Write the buffer with a syntax
error, and you'll get strong visual indicators of the error along with
the specifics.

Useful for shortcircuiting that part of the cycle where you run the code
before realizing you're missing a paren or whatever.
exuberance
Brennen Bearnes 11 years ago
parent
commit
90165e9dce
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      .vimrc

+ 11
- 2
.vimrc View File

@ -20,6 +20,9 @@ set nocompatible
" really nice file tree:
Bundle 'scrooloose/nerdtree'
" syntax checking
Bundle 'scrooloose/syntastic'
" align text vertically on a string:
Bundle 'Align'
@ -169,6 +172,10 @@ au BufRead,BufNewFile *.t set filetype=php
" reformat a paragraph
nmap <leader>q gqip
" jump to next, previous errors
nmap <leader>n :cnext<CR>
nmap <leader>p :cprev<CR>
" write all changed buffers
nmap <leader>w :wa<CR>
@ -190,7 +197,7 @@ au BufRead,BufNewFile *.t set filetype=php
map <C-S-Tab> :tabprevious<CR>
map <C-Tab> :tabnext<CR>
imap <C-S-Tab> <Esc>:tabprevious<CR>i
imap <C-Tab> <Esc>:tabnext<CR>i
imap <C-Tab> <Esc>:tabnext<CR>i
" new tab:
nmap <leader>tn :tabnew<CR>
@ -198,7 +205,9 @@ au BufRead,BufNewFile *.t set filetype=php
nmap <leader>f :FufFile<CR>
" check PHP syntax - TODO: expand to syntax check [whatever filetype]
noremap <leader>c :!php -l %<CR>
" note that this is probably replaced by using Syntastic
" noremap <leader>c :echom system('php -l ' . bufname('%'))<CR>
noremap <leader>c :SyntasticCheck<CR>
" display tabs - ,s will toggle (redraws just in case)
nmap <silent> <leader>s :set nolist!<CR>:redr<CR>


|||||||
x
 
000:0
Loading…
Cancel
Save