1
0
mirror of https://github.com/akelge/zsh synced 2025-07-04 21:49:05 +00:00

Updated plugins

Added solarize colorscheme
This commit is contained in:
2013-04-11 15:36:38 +00:00
parent bfbaa2149d
commit f7c35d77ef
12 changed files with 1554 additions and 493 deletions

View File

@ -1,8 +1,8 @@
" AlignMaps.vim : support functions for AlignMaps
" Author: Charles E. Campbell, Jr.
" Date: Jun 18, 2012
" Version: 42
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell, Jr. {{{1
" Author: Charles E. Campbell
" Date: Mar 12, 2013
" Version: 43
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@ -16,7 +16,7 @@
if &cp || exists("g:loaded_AlignMaps")
finish
endif
let g:loaded_AlignMaps= "v42"
let g:loaded_AlignMaps= "v43"
let s:keepcpo = &cpo
set cpo&vim
"DechoTabOn
@ -111,6 +111,20 @@ fun! AlignMaps#WrapperEnd() range
" call Dret("AlignMaps#WrapperEnd : alignmaps_wrapcnt=".s:alignmaps_wrapcnt." my=".line("'y")." mz=".line("'z"))
endfun
" ---------------------------------------------------------------------
" AlignMaps#MakeMap: make both a normal-mode and a visual mode map for mapname {{{2
fun! AlignMaps#MakeMap(mapname)
if exists("g:maplocalleader")
let maplead= g:maplocalleader
elseif exists("g:mapleader")
let maplead= g:mapleader
else
let maplead= '\'
endif
exe "nmap <unique> ".maplead.a:mapname." <Plug>AM_".a:mapname
exe "vmap <silent> ".maplead.a:mapname.' :call AlignMaps#Vis("'.a:mapname.'")'."<cr>"
endfun
" ---------------------------------------------------------------------
" AlignMaps#StdAlign: some semi-standard align calls {{{2
fun! AlignMaps#StdAlign(mode) range
@ -169,15 +183,15 @@ endfun
" AlignMaps#Equals: supports \t= and \T= {{{2
fun! AlignMaps#Equals() range
" call Dfunc("AlignMaps#Equals()")
keepj 'a,'zs/\s\+\([*/+\-%|&\~^]\==\)/ \1/e
keepj 'a,'zs@ \+\([*/+\-%|&\~^]\)=@\1=@ge
keepj 'a,'zs/\s\+\([.*/+\-%|&\~^]\==\)/ \1/e
keepj 'a,'zs@ \+\([.*/+\-%|&\~^]\)=@\1=@ge
keepj 'a,'zs/==/\="\<Char-0x0f>\<Char-0x0f>"/ge
keepj 'a,'zs/\([!<>:]\)=/\=submatch(1)."\<Char-0x0f>"/ge
keepj norm g'zk
AlignCtrl mIp1P1=l =
AlignCtrl g =
keepj 'a,'z-1Align
keepj 'a,'z-1s@\([*/%|&\~^!=]\)\( \+\)=@\2\1=@ge
keepj 'a,'z-1s@\([.*/%|&\~^!=]\)\( \+\)=@\2\1=@ge
keepj 'a,'z-1s@[^+\-]\zs\([+\-]\)\( \+\)=@\2\1=@ge
keepj 'a,'z-1s/\( \+\);/;\1/ge
if &ft == "c" || &ft == "cpp"
@ -323,37 +337,6 @@ fun! AlignMaps#FixMultiDec()
let curline = getline(".")
" call Decho("curline<".curline.">")
" " Attempt to ignore function calls (ie. double x=pow(2.,3.),...
" let leader= substitute(curline,'^\s*\([a-zA-Z_ \t][a-zA-Z0-9<>_ \t]*\)\s\+.*$','\1','')
" let i = strlen(leader)
" let paren = 0
" let fmd = strpart(curline,i)
" let ifmd = i
" call Decho("fmd<".fmd."> ifmd=".ifmd)
" while i < strlen(curline)
" if strpart(curline,i,1) == '('
" let paren= paren+1
" elseif strpart(curline,i,1) == ')' && paren > 0
" let paren= paren-1
" elseif strpart(curline,i,1) == '='
" let eq= 1
" elseif strpart(curline,i,1) == ';'
" let paren = 0
" let eq = 0
" let fmd = fmd.strpart(fmd,ifmd,i-ifmd).";\<cr>"
" let ifmd = i + 2
" let i = i + 1
" let leader= substitute(curline,'^\s*\([a-zA-Z_ \t][a-zA-Z0-9<>_ \t]*\)\s\+.*$','\1','')
" elseif strpart(curline,i,1) == ','
" if paren == 0
" let fmd = fmd.strpart(fmd,ifmd,i-ifmd).";\<cr>"
" let ifmd = i + 2
" let i = i + 1
" endif
" endif
" let i= i + 1
" endwhile
" Get the type. I'm assuming one type per line (ie. int x; double y; on one line will not be handled properly)
let @x=substitute(curline,'^\(\s*[a-zA-Z_ \t][a-zA-Z0-9<>_ \t]*\)\s\+[(*]*\h.*$','\1','')
" call Decho("@x<".@x.">")
@ -386,6 +369,31 @@ fun! AlignMaps#AlignMapsClean()
" call Dret("AlignMaps#AlignMapsClean")
endfun
" ---------------------------------------------------------------------
" AlignMaps#Vis: interfaces with visual maps {{{2
fun! AlignMaps#Vis(plugmap) range
" call Dfunc("AlignMaps#VisCall(plugmap<".a:plugmap.">) ".a:firstline.",".a:lastline)
let amark= SaveMark("a")
exe a:firstline
ka
exe a:lastline
if exists("g:maplocalleader")
let maplead= g:maplocalleader
elseif exists("g:mapleader")
let maplead= g:mapleader
else
let maplead= '\'
endif
" call Decho("exe norm ".maplead.a:plugmap)
exe " norm ".maplead.a:plugmap
call RestoreMark(amark)
" call Dret("AlignMaps#VisCall")
endfun
" ---------------------------------------------------------------------
" Restore: {{{1
let &cpo= s:keepcpo