File plugin/includefixer.vim changed (mode: 100644) (index 6a219ba..16365f6) |
... |
... |
function! s:IsCxxStd(include) |
139 |
139 |
return 0 |
return 0 |
140 |
140 |
endfunction |
endfunction |
141 |
141 |
|
|
|
142 |
|
function! s:IsSystem(include) |
|
143 |
|
return a:include =~# '<[^>]\+>' |
|
144 |
|
endfunction |
|
145 |
|
|
142 |
146 |
function! s:SetupCustom(list) |
function! s:SetupCustom(list) |
143 |
147 |
if exists('g:include_fixer_custom') == 0 |
if exists('g:include_fixer_custom') == 0 |
144 |
148 |
return |
return |
|
... |
... |
function! s:FixIncludes() |
209 |
213 |
let l:qt = [] |
let l:qt = [] |
210 |
214 |
let l:cstd = [] |
let l:cstd = [] |
211 |
215 |
let l:cxxstd = [] |
let l:cxxstd = [] |
|
216 |
|
let l:system = [] |
212 |
217 |
let l:custom = [] |
let l:custom = [] |
213 |
218 |
call <SID>SetupCustom(l:custom) |
call <SID>SetupCustom(l:custom) |
214 |
219 |
|
|
|
... |
... |
function! s:FixIncludes() |
227 |
232 |
call add(l:cstd,l:i) |
call add(l:cstd,l:i) |
228 |
233 |
elseif <SID>IsCxxStd(l:i) |
elseif <SID>IsCxxStd(l:i) |
229 |
234 |
call add(l:cxxstd,l:i) |
call add(l:cxxstd,l:i) |
|
235 |
|
elseif <SID>IsSystem(l:i) |
|
236 |
|
call add(l:system,l:i) |
230 |
237 |
elseif <SID>IsCustom(l:custom,l:i) |
elseif <SID>IsCustom(l:custom,l:i) |
231 |
238 |
else |
else |
232 |
239 |
call add(l:local,l:i) |
call add(l:local,l:i) |
|
... |
... |
function! s:FixIncludes() |
235 |
242 |
|
|
236 |
243 |
" write out all the groups |
" write out all the groups |
237 |
244 |
let l:next = <SID>WriteOut(l:start,l:module) |
let l:next = <SID>WriteOut(l:start,l:module) |
|
245 |
|
let l:next = <SID>WriteOut(l:next,l:system) |
238 |
246 |
let l:next = <SID>WriteOut(l:next,l:local) |
let l:next = <SID>WriteOut(l:next,l:local) |
239 |
247 |
|
|
240 |
248 |
let l:i = 0 |
let l:i = 0 |