Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function! s:SortStyles(i1, i2)
- if a:i1 =~ '^-'
- let i1 = substitute(a:i1, '^\s*-\w\+-', '', '')
- else
- let i1 = a:i1
- endif
- if a:i2 =~ '^-'
- let i2 = substitute(a:i2, '^\s*-\w\+-', '', '')
- else
- let i2 = a:i2
- endif
- if i1 == i2
- return 0
- elseif i1 < i2
- return -1
- else
- return 1
- endif
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment