mirror of
1
0
Fork 0

add my_configs and taglist merge to nerdtree

This commit is contained in:
vsooda 2014-10-17 11:32:26 +08:00
parent fe77d23852
commit be37691443
6 changed files with 156 additions and 42 deletions

View File

@ -28,11 +28,11 @@
## 1\. Introduction
Syntastic is a syntax checking plugin for Vim that runs files through external
syntax checkers and displays any resulting errors to the user. This can be done
on demand, or automatically as files are saved. If syntax errors are detected,
the user is notified and is happy because they didn't have to compile their
code or execute their script to find them.
Syntastic is a syntax checking plugin for [Vim][13] that runs files through
external syntax checkers and displays any resulting errors to the user. This
can be done on demand, or automatically as files are saved. If syntax errors
are detected, the user is notified and is happy because they didn't have to
compile their code or execute their script to find them.
At the time of this writing, syntax checking plugins exist for ActionScript,
Ada, AppleScript, Arduino, AsciiDoc, ASM, BEMHTML, Bro, Bourne shell, C,
@ -64,16 +64,40 @@ enabled.
## 2\. Installation
Installing syntastic is easy but first you need to have the [pathogen][1]
plugin installed. If you already have [pathogen][1] working then skip
[Step 1](#step1) and go to [Step 2](#step2).
<a name="requirements"></a>
### 2.1\. Requirements
Syntastic itself has rather relaxed requirements: it doesn't have any external
dependencies, and it needs a version of [Vim][13] compiled with a few common
features: `autocmd`, `eval`, `file_in_path`, `modify_fname`, `quickfix`,
`reltime`, and `user_commands`. Not all possible combinations of features that
include the ones above make equal sense on all operating systems, but Vim
version 7 or later with the "normal", "big", or "huge" feature sets should be
fine.
Syntastic should work with any modern plugin managers for Vim, such as
[NeoBundle][14], [Pathogen][1], [Vim-Addon-Manager][15], [Vim-Plug][16], or
[Vundle][17]. Instructions for installing syntastic with [Pathogen][1] are
included below for completeness.
Last but not least: syntastic doesn't know how to do any syntax checks by
itself. In order to get meaningful results you need to install external
checkers corresponding to the types of files you use. Please consult the
[wiki][3] for a list of supported checkers.
<a name="installpathogen"></a>
### 2.2\. Installing syntastic with Pathogen
If you already have [Pathogen][1] working then skip [Step 1](#step1) and go to
[Step 2](#step2).
<a name="step1"></a>
### 2.1\. Step 1: Install pathogen.vim
#### 2.2.1\. Step 1: Install pathogen.vim
First I'll show you how to install Tim Pope's [pathogen][1] so that it's easy to
First I'll show you how to install Tim Pope's [Pathogen][1] so that it's easy to
install syntastic. Do this in your terminal so that you get the `pathogen.vim`
file and the directories it needs:
```sh
@ -87,7 +111,7 @@ execute pathogen#infect()
<a name="step2"></a>
### 2.2\. Step 2: Install syntastic as a pathogen bundle
#### 2.2.2\. Step 2: Install syntastic as a Pathogen bundle
You now have pathogen installed and can put syntastic into `~/.vim/bundle` like
this:
@ -100,7 +124,8 @@ Quit vim and start it back up to reload it, then type:
:Helptags
```
If you get an error when you do this, then you probably didn't install
[pathogen][1] right. Go back to [Step 1](#step1) and make sure you did the following:
[Pathogen][1] right. Go back to [Step 1](#step1) and make sure you did the
following:
1. Created both the `~/.vim/autoload` and `~/.vim/bundle` directories.
2. Added the `call pathogen#infect()` line to your `~/.vimrc` file
@ -328,6 +353,11 @@ a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9].
[10]: http://perldoc.perl.org/perlrun.html#*-c*
[11]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide
[12]: https://github.com/rust-lang/rust/
[13]: http://www.vim.org/
[14]: https://github.com/Shougo/neobundle.vim
[15]: https://github.com/MarcWeber/vim-addon-manager
[16]: https://github.com/junegunn/vim-plug/
[17]: https://github.com/gmarik/Vundle.vim
<!--
vim:tw=79:sw=4:

View File

@ -44,6 +44,7 @@ CONTENTS *syntastic-contents*
6.7.Using syntastic with the fizsh shell...|syntastic-fizsh|
6.8.Interaction with Eclim.................|syntastic-eclim|
6.9.Interaction with vim-virtualenv........|syntastic-vim-virtualenv|
6.10.Interaction with vim-auto-save........|syntastic-vim-auto-save|
7.About........................................|syntastic-about|
8.License......................................|syntastic-license|
@ -780,6 +781,19 @@ in Python virtual environments activated by 'vim-virtualenv' (see
https://github.com/jmcantrell/vim-virtualenv). This is a limitation of
'vim-virtualenv'.
------------------------------------------------------------------------------
6.10. Interaction with vim-auto-save *syntastic-vim-auto-save*
At the time of this writing, syntastic checks in active mode are not triggered
by 'vim-auto-save' (see https://github.com/907th/vim-auto-save). The reason is
a limitation in 'vim-auto-save', namely a missing flag to an 'autocmd' (see
|autocmd-nested|). Fortunately it's pretty easy to achieve a similar effect
without 'vim-auto-save'': >
augroup syntastic
autocmd CursorHold * nested update
augroup END
set updatetime=200
<
==============================================================================
7. About *syntastic-about*

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:syntastic_start
endif
let g:syntastic_version = '3.5.0-65'
let g:syntastic_version = '3.5.0-69'
lockvar g:syntastic_version
" Sanity checks {{{1
@ -180,10 +180,11 @@ command! -nargs=* -complete=custom,s:CompleteCheckerName SyntasticCheck
\ call syntastic#util#redraw(g:syntastic_full_redraws)
command! Errors call s:ShowLocList()
command! -nargs=? -complete=custom,s:CompleteFiletypes SyntasticInfo
\ call s:modemap.modeInfo(<f-args>) |
\ call s:registry.echoInfoFor(s:resolveFiletypes(<f-args>))
\ call s:modemap.modeInfo(<f-args>) <bar>
\ call s:registry.echoInfoFor(s:resolveFiletypes(<f-args>)) <bar>
\ call s:explainSkip(<f-args>)
command! SyntasticReset
\ call s:ClearCache() |
\ call s:ClearCache() <bar>
\ call s:notifiers.refresh(g:SyntasticLoclist.New([]))
command! SyntasticSetLoclist call g:SyntasticLoclist.current().setloclist()
@ -582,6 +583,35 @@ function! s:skipFile() " {{{2
return skip
endfunction " }}}2
" Explain why checks will be skipped for the current file
function! s:explainSkip(...) " {{{2
if !a:0 && s:skipFile()
let why = []
let fname = expand('%')
if get(b:, 'syntastic_skip_checks', 0)
call add(why, 'b:syntastic_skip_checks set')
endif
if &buftype != ''
call add(why, 'buftype = ' . string(&buftype))
endif
if !filereadable(fname)
call add(why, 'file not readable / not local')
endif
if getwinvar(0, '&diff')
call add(why, 'diff mode')
endif
if s:ignoreFile(fname)
call add(why, 'filename matching g:syntastic_ignore_files')
endif
if fnamemodify(fname, ':e') =~? g:syntastic_ignore_extensions
call add(why, 'extension matching g:syntastic_ignore_extensions')
endif
echomsg 'The current file will not be checked (' . join(why, ', ') . ')'
endif
endfunction " }}}2
" Take a list of errors and add default values to them from a:options
function! s:addToErrors(errors, options) " {{{2
for err in a:errors

View File

@ -1287,6 +1287,10 @@ function! s:Tlist_Window_Create()
let win_dir = 'botright'
" Horizontal window height
let win_size = g:Tlist_WinHeight
elseif g:Tlist_Use_Split_Window
" Open the window in a horizontal split of current window
let win_dir = 'abo'
let win_size = g:Tlist_WinWidth
else
if s:tlist_winsize_chgd == -1
" Open a vertically split window. Increase the window size, if

View File

@ -1,39 +1,75 @@
let g:airline#themes#murmur#palette = {}
let s:termbg = 237 " Background for branch and file format blocks
let s:termbg2= 234 " Background for middle block
let s:normalbg= 27 " Background for normal mode and file position blocks
let s:insertbg= 70 " Background for insert mode and file position blocks
let s:visualbg= 166 " Background for visual mode and file position blocks
let s:replacebg=88 " Background for replace mode and file position blocks
let s:alert= 88 " Modefied file alert color
" Color palette
let s:cterm_termbg = 237 " Background for branch and file format blocks
let s:gui_termbg = '#5F5F5F'
let s:cterm_termfg = 144 " Foreground for branch and file format blocks
let s:gui_termfg = '#AFAF87'
let s:BB = ['#AFAF87', '#5F5F5F', 144, s:termbg] " Branch and file format blocks
let s:cterm_termbg2 = 234 " Background for middle block
let s:gui_termbg2 = '#1C1C1C'
let s:cterm_termfg2 = 39 " Foreground for middle block
let s:gui_termfg2 = '#F5F5F5'
let s:N1 = ['#FFFFFF', '#5F87FF', 15, s:normalbg] " Outside blocks in normal mode
let s:N2 = ['#AFAF87', '#5F5F5F', 39, s:termbg2] " Middle block
let s:cterm_normalbg = 27 " Background for normal mode and file position blocks
let s:gui_normalbg = '#5F87FF'
let s:cterm_normalfg = 15 " Foreground for normal mode and file position blocks
let s:gui_normalfg = '#FFFFFF'
let s:cterm_insertbg = 70 " Background for insert mode and file position blocks
let s:gui_insertbg = '#87AF5F'
let s:cterm_insertfg = 15 " Foreground for insert mode and file position blocks
let s:gui_insertfg = '#FFFFFF'
let s:cterm_visualbg = 166 " Background for visual mode and file position blocks
let s:gui_visualbg = '#ff8c00'
let s:cterm_visualfg = 15 " Foreground for visual mode and file position blocks
let s:gui_visualfg = '#FFFFFF'
let s:cterm_replacebg = 88 " Background for replace mode and file position blocks
let s:gui_replacebg = '#870000'
let s:cterm_replacefg = 15 " Foreground for replace mode and file position blocks
let s:gui_replacefg = '#FFFFFF'
let s:cterm_alert = 88 " Modified file alert color
let s:gui_alert = '#870000'
let s:cterm_inactivebg = 234 " Background for inactive mode
let s:gui_inactivebg = '#1C1C1C'
let s:cterm_inactivefg = 239 " Foreground for inactive mode
let s:gui_inactivefg = '#4E4E4E'
" Branch and file format
let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] " Branch and file format blocks
" Normal mode
let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] " Outside blocks in normal mode
let s:N2 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] " Middle block
let g:airline#themes#murmur#palette.normal = airline#themes#generate_color_map(s:N1, s:BB, s:N2)
let g:airline#themes#murmur#palette.normal_modified = {'airline_c': ['#ffffff', '#5f005f', s:alert, s:termbg2, 'bold'] ,}
let g:airline#themes#murmur#palette.normal_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,}
let s:I1 = ['#FFFFFF', '#87AF5F', 15, s:insertbg] " Outside blocks in insert mode
let s:I2 = ['#AFAF87', '#5F5F5F', s:insertbg, s:termbg2] " Middle block
" Insert mode
let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] " Outside blocks in insert mode
let s:I2 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] " Middle block
let g:airline#themes#murmur#palette.insert = airline#themes#generate_color_map(s:I1, s:BB, s:I2)
let g:airline#themes#murmur#palette.insert_modified = {'airline_c': ['#AFAF87', '#5F5F5F', s:alert, s:termbg2, 'bold'] ,}
let g:airline#themes#murmur#palette.insert_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,}
let s:R1 = ['#FFFFFF', '#870000', 15, s:replacebg] " Outside blocks in replace mode
let s:R2 = ['#AFAF87', '#5F5F5F', 255, s:termbg2] " Middle block
" Replace mode
let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] " Outside blocks in replace mode
let s:R2 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] " Middle block
let g:airline#themes#murmur#palette.replace = airline#themes#generate_color_map(s:R1, s:BB, s:R2)
let g:airline#themes#murmur#palette.replace_modified = {'airline_c': ['#AFAF87', '#5f005f', s:alert, s:termbg2, 'bold'] ,}
let g:airline#themes#murmur#palette.replace_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,}
let s:V1 = ['#FFFFFF', '#AF5F00', 15, s:visualbg] " Outside blocks in visual mode
let s:V2 = ['#AFAF87', '#5F5F5F', s:visualbg, s:termbg2] " Middle block
" Visual mode
let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] " Outside blocks in visual mode
let s:V2 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] " Middle block
let g:airline#themes#murmur#palette.visual = airline#themes#generate_color_map(s:V1, s:BB, s:V2)
let g:airline#themes#murmur#palette.visual_modified = {'airline_c': [ '#AFAF87', '#5f005f', s:alert, s:termbg2, 'bold'] ,}
let g:airline#themes#murmur#palette.visual_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,}
" Inactive mode
let s:IA1 = ['#4E4E4E', '#1C1C1C', 239, 234, '']
let s:IA2 = ['#4E4E4E', '#1C1C1C', 239, 234, '']
let s:IA3 = ['#4E4E4E', '#1C1C1C', 239, 234, '']
let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, '']
let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, '']
let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, '']
let g:airline#themes#murmur#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
" CtrlP plugin colors
@ -41,6 +77,6 @@ if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#murmur#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
\ ['#FFFFFF', '#5F87FF', 15, s:normalbg, ''],
\ ['#AFAF87', '#5F5F5F', 144, s:termbg, ''],
\ ['#AFAF87', '#5F5F5F', 39, s:termbg2, 'bold'])
\ [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg, ''],
\ [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg, ''],
\ [s:gui_termfg2, s:gui_termbg2, s:cterm_termfg2, s:cterm_termbg2, 'bold'])