First import
git-svn-id: http://photonzero.com/dotfiles/trunk@1 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
commit
83d40113d2
60 changed files with 4264 additions and 0 deletions
530
.vim/autoload/rubycomplete.vim
Normal file
530
.vim/autoload/rubycomplete.vim
Normal file
File diff suppressed because it is too large
Load diff
18
.vim/charm.vim
Normal file
18
.vim/charm.vim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
fu! SendToCharm(subject,mood)
|
||||
if a:subject == ""
|
||||
let subject=input("Subject: ")
|
||||
else
|
||||
let subject=a:subject
|
||||
endif
|
||||
if a:mood == ""
|
||||
let mood=input("Mood: ")
|
||||
else
|
||||
let mood=a:mood
|
||||
endif
|
||||
exe "w!"
|
||||
exe "!cat % | charm -q -s \"".subject."\" -m \"".mood."\""
|
||||
endf
|
||||
|
||||
if !exists(":PostToLJ")
|
||||
command PostToLJ :call SendToCharm("","")
|
||||
endif
|
||||
BIN
.vim/colors/.barak.vim.swp
Normal file
BIN
.vim/colors/.barak.vim.swp
Normal file
Binary file not shown.
99
.vim/colors/barak.vim
Normal file
99
.vim/colors/barak.vim
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" File: "/home/michener/.vim/barak.vim"
|
||||
" Version: 1.4
|
||||
" Created: "Sun Jul 30 23:54:41 PDT 2006"
|
||||
" Updated: "Sun Jan 7 02:12:52 PST 2007"
|
||||
" Copyright (C) 2006, Barak Michener <michener@csua.berkeley.edu>
|
||||
" Modified from colorscheme "dante":
|
||||
" Copyright (C) 2002, Caciano Machado <caciano@inf.ufrgs.br>
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Colorscheme Option:
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
hi clear
|
||||
if exists("syntax on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name = "barak"
|
||||
|
||||
" General colors
|
||||
hi Normal ctermfg=gray guifg=grey75 guibg=black
|
||||
hi Directory term=bold ctermfg=blue guifg=royalblue
|
||||
hi ErrorMsg term=standout ctermfg=white ctermbg=red guifg=white guibg=red3
|
||||
"hi NonText term=bold ctermfg=darkgray guibg=gray3 guifg=gray20
|
||||
hi NonText term=bold ctermfg=gray guibg=gray3 guifg=gray40
|
||||
hi SpecialKey term=bold ctermfg=darkgray guifg=gray30
|
||||
hi LineNr term=underline ctermfg=darkgray guifg=ivory4 guibg=gray4
|
||||
hi IncSearch term=reverse cterm=reverse gui=reverse,bold guifg=darkgoldenrod2
|
||||
hi Search term=reverse ctermfg=black ctermbg=yellow guifg=gray10 guibg=gold2
|
||||
hi Visual term=bold,reverse cterm=bold,reverse ctermfg=gray ctermbg=black gui=bold,reverse guifg=gray40 guibg=black
|
||||
hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline
|
||||
hi MoreMsg term=bold ctermfg=green gui=bold guifg=olivedrab1
|
||||
hi ModeMsg term=bold ctermfg=red cterm=bold gui=bold guifg=red
|
||||
hi Question term=standout ctermfg=green gui=bold guifg=olivedrab1
|
||||
hi WarningMsg term=standout ctermfg=red gui=bold guifg=red3
|
||||
hi WildMenu term=standout ctermfg=black ctermbg=yellow guifg=black guibg=gold2
|
||||
hi Folded term=standout ctermfg=blue ctermbg=white guifg=royalblue1 guibg=white
|
||||
hi FoldColumn term=standout ctermfg=blue ctermbg=white guifg=royalblue3 guibg=white
|
||||
hi DiffAdd term=bold ctermbg=blue guibg=royalblue2
|
||||
hi DiffChange term=bold ctermbg=darkmagenta guibg=maroon
|
||||
hi DiffDelete term=bold cterm=bold ctermfg=lightblue ctermbg=cyan gui=bold guifg=lightblue guibg=cyan4
|
||||
hi DiffText term=reverse cterm=bold ctermbg=red gui=bold guibg=red3
|
||||
hi Cursor guifg=bg guibg=fg
|
||||
hi lCursor guifg=bg guibg=fg
|
||||
hi StatusLine term=reverse cterm=reverse gui=reverse guifg=gray60
|
||||
hi StatusLineNC term=reverse cterm=reverse gui=reverse guifg=gray40
|
||||
hi VertSplit term=reverse cterm=reverse gui=bold,reverse guifg=gray40
|
||||
hi Title term=bold ctermfg=magenta gui=bold guifg=aquamarine
|
||||
|
||||
if version >= 700
|
||||
hi Pmenu ctermfg=white ctermbg=blue guifg=white guibg=MidnightBlue
|
||||
hi PmenuSel ctermfg=darkblue ctermbg=white guibg=white guifg=MidnightBlue
|
||||
hi PmenuSbar ctermfg=lightgray ctermbg=darkgray
|
||||
hi PmenuThumb cterm=reverse
|
||||
hi WildMenu term=standout ctermfg=white ctermbg=blue
|
||||
endif
|
||||
|
||||
" syntax hi colors
|
||||
hi Comment term=bold ctermfg=darkgreen guifg=ForestGreen
|
||||
hi PreProc term=underline ctermfg=darkmagenta guifg=magenta3
|
||||
hi Constant term=underline ctermfg=red guifg=firebrick3
|
||||
"hi Type term=underline ctermfg=darkcyan gui=none guifg=CadetBlue3
|
||||
hi Type term=underline ctermfg=darkcyan gui=none guifg=turquoise3
|
||||
hi Statement term=bold ctermfg=blue gui=none guifg=RoyalBlue1
|
||||
hi Identifier term=underline ctermfg=darkcyan guifg=DeepSkyBlue
|
||||
hi Function ctermfg=darkcyan guifg=MediumPurple2
|
||||
hi Ignore term=bold ctermfg=darkgray gui=bold guifg=gray45
|
||||
hi Special term=underline ctermfg=brown guifg=khaki3
|
||||
hi Error term=reverse ctermfg=gray ctermbg=red guifg=gray guibg=red3
|
||||
hi Todo term=standout ctermfg=black ctermbg=yellow gui=bold guifg=gray10 guibg=yellow4
|
||||
hi Underlined term=underline cterm=underline ctermfg=blue gui=underline guifg=slateblue
|
||||
hi Number term=underline ctermfg=darkyellow guifg=goldenrod1
|
||||
" syntax hi links
|
||||
hi link String Constant
|
||||
hi link Character Constant
|
||||
hi link Number Constant
|
||||
hi link Boolean Constant
|
||||
hi link Float Number
|
||||
"hi link Function Identifier
|
||||
hi link Number Constant
|
||||
hi link Conditional Statement
|
||||
hi link Repeat Statement
|
||||
hi link Label Statement
|
||||
hi link Keyword Statement
|
||||
hi link Exception Statement
|
||||
hi link Operator Statement
|
||||
hi link Include PreProc
|
||||
hi link Define PreProc
|
||||
hi link Macro PreProc
|
||||
hi link PreCondit PreProc
|
||||
"hi link StorageClass Type
|
||||
hi link StorageClass Statement
|
||||
"hi link Structure Type
|
||||
hi link Structure Statement
|
||||
hi link Typedef Type
|
||||
hi link Tag Special
|
||||
hi link SpecialChar Special
|
||||
hi link Delimiter Special
|
||||
hi link SpecialComment Special
|
||||
hi link Debug Special
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
83
.vim/colors/dante.vim
Normal file
83
.vim/colors/dante.vim
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" File: "/home/caciano/.vim/dante.vim"
|
||||
" Created: "Thu, 23 May 2002 00:12:20 -0300 (caciano)"
|
||||
" Updated: "Sat, 24 Aug 2002 14:04:21 -0300 (caciano)"
|
||||
" Copyright (C) 2002, Caciano Machado <caciano@inf.ufrgs.br>
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Colorscheme Option:
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
hi clear
|
||||
if exists("syntax on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name = "dante"
|
||||
|
||||
" General colors
|
||||
hi Normal ctermfg=gray guifg=peachpuff3 guibg=black
|
||||
hi Directory term=bold ctermfg=blue guifg=royalblue
|
||||
hi ErrorMsg term=standout ctermfg=white ctermbg=red guifg=white guibg=red3
|
||||
hi NonText term=bold ctermfg=darkgray guibg=gray3 guifg=gray20
|
||||
hi SpecialKey term=bold ctermfg=darkgray guifg=gray30
|
||||
hi LineNr term=underline ctermfg=darkgray guifg=ivory4 guibg=gray4
|
||||
hi IncSearch term=reverse cterm=reverse gui=reverse,bold guifg=darkgoldenrod2
|
||||
hi Search term=reverse ctermfg=black ctermbg=yellow guifg=gray10 guibg=gold2
|
||||
hi Visual term=bold,reverse cterm=bold,reverse ctermfg=gray ctermbg=black gui=bold,reverse guifg=gray40 guibg=black
|
||||
hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline
|
||||
hi MoreMsg term=bold ctermfg=green gui=bold guifg=olivedrab1
|
||||
hi ModeMsg term=bold cterm=bold gui=bold
|
||||
hi Question term=standout ctermfg=green gui=bold guifg=olivedrab1
|
||||
hi WarningMsg term=standout ctermfg=red gui=bold guifg=red3
|
||||
hi WildMenu term=standout ctermfg=black ctermbg=yellow guifg=black guibg=gold2
|
||||
hi Folded term=standout ctermfg=blue ctermbg=white guifg=royalblue1 guibg=white
|
||||
hi FoldColumn term=standout ctermfg=blue ctermbg=white guifg=royalblue3 guibg=white
|
||||
hi DiffAdd term=bold ctermbg=blue guibg=royalblue2
|
||||
hi DiffChange term=bold ctermbg=darkmagenta guibg=maroon
|
||||
hi DiffDelete term=bold cterm=bold ctermfg=lightblue ctermbg=cyan gui=bold guifg=lightblue guibg=cyan4
|
||||
hi DiffText term=reverse cterm=bold ctermbg=red gui=bold guibg=red3
|
||||
hi Cursor guifg=bg guibg=fg
|
||||
hi lCursor guifg=bg guibg=fg
|
||||
hi StatusLine term=reverse cterm=reverse gui=reverse guifg=gray60
|
||||
hi StatusLineNC term=reverse cterm=reverse gui=reverse guifg=gray40
|
||||
hi VertSplit term=reverse cterm=reverse gui=bold,reverse guifg=gray40
|
||||
hi Title term=bold ctermfg=magenta gui=bold guifg=aquamarine
|
||||
|
||||
" syntax hi colors
|
||||
hi Comment term=bold ctermfg=darkcyan guifg=cyan4
|
||||
hi PreProc term=underline ctermfg=darkblue guifg=dodgerblue4
|
||||
hi Constant term=underline ctermfg=darkred guifg=firebrick3
|
||||
hi Type term=underline ctermfg=darkgreen gui=none guifg=chartreuse3
|
||||
hi Statement term=bold ctermfg=darkyellow gui=none guifg=gold3
|
||||
hi Identifier term=underline ctermfg=darkgreen guifg=darkolivegreen4
|
||||
hi Ignore term=bold ctermfg=darkgray guifg=gray45
|
||||
hi Special term=underline ctermfg=brown guifg=sienna
|
||||
hi Error term=reverse ctermfg=gray ctermbg=red guifg=gray guibg=red3
|
||||
hi Todo term=standout ctermfg=black ctermbg=yellow gui=bold guifg=gray10 guibg=yellow4
|
||||
hi Underlined term=underline cterm=underline ctermfg=darkblue gui=underline guifg=slateblue
|
||||
hi Number term=underline ctermfg=darkred guifg=red2
|
||||
" syntax hi links
|
||||
hi link String Constant
|
||||
hi link Character Constant
|
||||
hi link Number Constant
|
||||
hi link Boolean Constant
|
||||
hi link Float Number
|
||||
hi link Function Identifier
|
||||
hi link Number Constant
|
||||
hi link Conditional Statement
|
||||
hi link Repeat Statement
|
||||
hi link Label Statement
|
||||
hi link Keyword Statement
|
||||
hi link Exception Statement
|
||||
hi link Operator Statement
|
||||
hi link Include PreProc
|
||||
hi link Define PreProc
|
||||
hi link Macro PreProc
|
||||
hi link PreCondit PreProc
|
||||
hi link StorageClass Type
|
||||
hi link Structure Type
|
||||
hi link Typedef Type
|
||||
hi link Tag Special
|
||||
hi link SpecialChar Special
|
||||
hi link Delimiter Special
|
||||
hi link SpecialComment Special
|
||||
hi link Debug Special
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
469
.vim/colors/ps_color.vim
Normal file
469
.vim/colors/ps_color.vim
Normal file
|
|
@ -0,0 +1,469 @@
|
|||
" Vim colour file --- PSC
|
||||
" Maintainer: Pan, Shi Zhu <Go to the following URL for my email>
|
||||
" URL: http://vim.sourceforge.net/scripts/script.php?script_id=760
|
||||
" Last Change: 18 July 2006
|
||||
" Version: 2.9
|
||||
"
|
||||
" Please prepend [VIM] in the title when writing e-mail to me, or it will
|
||||
" be automatically treated as spam and removed.
|
||||
"
|
||||
" See the help document for all details, the help document will be
|
||||
" installed after the script has been sourced once, do not open the
|
||||
" script when you source it for the first time.
|
||||
"
|
||||
|
||||
" Initializations: {{{1
|
||||
"
|
||||
|
||||
" without user_commands, all these are not possible
|
||||
if !has("user_commands")
|
||||
finish
|
||||
end
|
||||
|
||||
function! s:init_option(var, value)
|
||||
if !exists("g:psc_".a:var)
|
||||
execute "let s:".a:var." = ".a:value
|
||||
else
|
||||
let s:{a:var} = g:psc_{a:var}
|
||||
endif
|
||||
endfunction
|
||||
command! -nargs=+ InitOpt call s:init_option(<f-args>)
|
||||
|
||||
function! s:multi_hi(setting, ...)
|
||||
let l:idx = a:0
|
||||
while l:idx > 0
|
||||
let l:hlgroup = a:{l:idx}
|
||||
execute "highlight ".l:hlgroup." ".a:setting
|
||||
let l:idx = l:idx - 1
|
||||
endwhile
|
||||
endfunction
|
||||
command! -nargs=+ MultiHi call s:multi_hi(<f-args>)
|
||||
|
||||
InitOpt style 'cool'
|
||||
InitOpt inversed_todo 0
|
||||
InitOpt use_default_for_cterm 0
|
||||
InitOpt statement_different_from_type 0
|
||||
if s:style == 'warm'
|
||||
InitOpt fontface 'mixed'
|
||||
else
|
||||
InitOpt fontface 'plain'
|
||||
endif
|
||||
|
||||
if !has("gui_running")
|
||||
call s:init_option("cterm_style", "'".s:style."'")
|
||||
|
||||
" Forces 'cool' style when gui is not present Since the 'warm' style for
|
||||
" terminal isn't available now, and probably never will be.
|
||||
if s:cterm_style=='warm' | let s:cterm_style = 'cool'
|
||||
endif
|
||||
if s:use_default_for_cterm==1 | let s:cterm_style = 'default'
|
||||
elseif s:use_default_for_cterm==2 | let s:cterm_style = 'defdark'
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
InitOpt other_style 0
|
||||
|
||||
if has("gui_running")
|
||||
if s:style=='warm' || s:style=='default'
|
||||
set background=light
|
||||
elseif s:style=='cool' || s:style=='defdark'
|
||||
set background=dark
|
||||
else | let s:other_style = 1
|
||||
endif
|
||||
else
|
||||
if s:cterm_style=='cool' || s:cterm_style=='defdark'
|
||||
set background=dark
|
||||
elseif s:cterm_style=='default'
|
||||
set background=light
|
||||
else | let s:other_style = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
highlight clear
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let s:color_name = expand("<sfile>:t:r")
|
||||
|
||||
if s:other_style==0 | let g:colors_name = s:color_name
|
||||
" Go from console version to gui, the color scheme should be sourced again
|
||||
execute "autocmd TermChanged * if g:colors_name == '".s:color_name."' | "
|
||||
\."colo ".s:color_name." | endif"
|
||||
else
|
||||
execute "runtime colors/".s:style.".vim"
|
||||
endif
|
||||
|
||||
" Command to go different schemes easier.
|
||||
execute "command! -nargs=1 Colo if '".s:color_name."'!=\"<args>\" | "
|
||||
\'let g:psc_style = "<args>"| endif | colo '.s:color_name
|
||||
|
||||
" Give control to 'reloaded' scheme if possible
|
||||
if s:style == 'reloaded'
|
||||
finish
|
||||
endif
|
||||
|
||||
" }}}1
|
||||
|
||||
" Relevant Help:
|
||||
" :h highlight-groups
|
||||
" :h psc-cterm-color-table
|
||||
" :ru syntax/hitest.vim
|
||||
"
|
||||
" Hardcoded Colors Comment:
|
||||
" #aabbcc = Red aa, Green bb, Blue cc
|
||||
" we must use hard-coded colours to get more 'tender' colours
|
||||
"
|
||||
|
||||
|
||||
" GUI:
|
||||
"
|
||||
" I don't want to abuse folding, but here folding is used to avoid confusion.
|
||||
if s:style=='warm'
|
||||
" Warm style for gui here {{{2
|
||||
" LIGHT COLOR DEFINE START
|
||||
|
||||
highlight Normal guifg=#000000 guibg=#e0e0e0
|
||||
highlight Search guifg=#902000 guibg=#f8f8f8
|
||||
highlight Visual guifg=fg guibg=#a6caf0
|
||||
highlight Cursor guifg=#f0f0f0 guibg=#008000
|
||||
" The idea of CursorIM is pretty good, however, the feature is still buggy
|
||||
" in the current version (Vim 7.0).
|
||||
" The following line will be kept commented until the bug fixed.
|
||||
"
|
||||
" highlight CursorIM guifg=#f0f0f0 guibg=#800080
|
||||
highlight Special guifg=#907000 guibg=bg
|
||||
highlight Comment guifg=#606000 guibg=bg
|
||||
highlight Number guifg=#907000 guibg=bg
|
||||
highlight Constant guifg=#007068 guibg=bg
|
||||
highlight StatusLine guifg=fg guibg=#a6caf0
|
||||
highlight LineNr guifg=#686868 guibg=bg
|
||||
highlight Question guifg=fg guibg=#d0d090
|
||||
highlight PreProc guifg=#009030 guibg=bg
|
||||
if s:statement_different_from_type==1
|
||||
highlight Statement guifg=#4020a0 guibg=bg
|
||||
else
|
||||
highlight Statement guifg=#2060a8 guibg=bg
|
||||
endif
|
||||
highlight Type guifg=#0850a0 guibg=bg
|
||||
if s:inversed_todo==1
|
||||
highlight Todo guifg=#e0e090 guibg=#000080
|
||||
else
|
||||
highlight Todo guifg=#800000 guibg=#e0e090
|
||||
endif
|
||||
" NOTE THIS IS IN THE WARM SECTION
|
||||
highlight Error guifg=#c03000 guibg=bg
|
||||
highlight Identifier guifg=#a030a0 guibg=bg
|
||||
highlight ModeMsg guifg=fg guibg=#b0b0e0
|
||||
highlight VisualNOS guifg=fg guibg=#b0b0e0
|
||||
highlight SpecialKey guifg=#1050a0 guibg=bg
|
||||
highlight NonText guifg=#002090 guibg=#d0d0d0
|
||||
highlight Directory guifg=#a030a0 guibg=bg
|
||||
highlight ErrorMsg guifg=fg guibg=#f0b090
|
||||
highlight MoreMsg guifg=#489000 guibg=bg
|
||||
highlight Title guifg=#a030a0 guibg=bg
|
||||
highlight WarningMsg guifg=#b02000 guibg=bg
|
||||
highlight WildMenu guifg=fg guibg=#d0d090
|
||||
highlight Folded guifg=fg guibg=#b0e0b0
|
||||
highlight FoldColumn guifg=fg guibg=#90e090
|
||||
highlight DiffAdd guifg=fg guibg=#b0b0e0
|
||||
highlight DiffChange guifg=fg guibg=#e0b0e0
|
||||
highlight DiffDelete guifg=#002090 guibg=#d0d0d0
|
||||
highlight DiffText guifg=fg guibg=#c0e080
|
||||
highlight SignColumn guifg=fg guibg=#90e090
|
||||
highlight IncSearch guifg=#f0f0f0 guibg=#806060
|
||||
highlight StatusLineNC guifg=fg guibg=#c0c0c0
|
||||
highlight VertSplit guifg=fg guibg=#c0c0c0
|
||||
highlight Underlined guifg=#6a5acd guibg=bg gui=underline
|
||||
highlight Ignore guifg=bg guibg=bg
|
||||
" NOTE THIS IS IN THE WARM SECTION
|
||||
if v:version >= 700
|
||||
highlight SpellBad guifg=NONE guibg=NONE guisp=#c03000
|
||||
highlight SpellCap guifg=NONE guibg=NONE guisp=#2060a8
|
||||
highlight SpellRare guifg=NONE guibg=NONE guisp=#a030a0
|
||||
highlight SpellLocal guifg=NONE guibg=NONE guisp=#007068
|
||||
highlight Pmenu guifg=fg guibg=#e0b0e0
|
||||
highlight PmenuSel guifg=#f0f0f0 guibg=#806060
|
||||
highlight PmenuSbar guifg=fg guibg=#c0c0c0
|
||||
highlight PmenuThumb guifg=fg guibg=#c0e080
|
||||
highlight TabLine guifg=fg guibg=#c0c0c0 gui=underline
|
||||
highlight TabLineFill guifg=fg guibg=#c0c0c0 gui=underline
|
||||
highlight TabLineSel guifg=fg guibg=bg
|
||||
highlight CursorColumn guifg=NONE guibg=#f0b090
|
||||
highlight CursorLine guifg=NONE guibg=NONE gui=underline
|
||||
highlight MatchParen guifg=NONE guibg=#c0e080
|
||||
endif
|
||||
|
||||
" LIGHT COLOR DEFINE END
|
||||
" }}}2
|
||||
elseif s:style=='cool'
|
||||
" Cool style for gui here {{{2
|
||||
" DARK COLOR DEFINE START
|
||||
|
||||
highlight Normal guifg=#d0d0d0 guibg=#202020
|
||||
highlight Comment guifg=#d0d090 guibg=bg
|
||||
highlight Constant guifg=#80c0e0 guibg=bg
|
||||
highlight Number guifg=#e0c060 guibg=bg
|
||||
highlight Identifier guifg=#f0c0f0 guibg=bg
|
||||
if s:statement_different_from_type==1
|
||||
highlight Statement guifg=#98a8f0 guibg=bg
|
||||
else
|
||||
highlight Statement guifg=#c0d8f8 guibg=bg
|
||||
endif
|
||||
highlight PreProc guifg=#60f080 guibg=bg
|
||||
highlight Type guifg=#b0d0f0 guibg=bg
|
||||
highlight Special guifg=#e0c060 guibg=bg
|
||||
highlight Error guifg=#f08060 guibg=bg
|
||||
if s:inversed_todo==1
|
||||
highlight Todo guifg=#d0d090 guibg=#000080
|
||||
else
|
||||
highlight Todo guifg=#800000 guibg=#d0d090
|
||||
endif
|
||||
highlight Search guifg=#e0e0e0 guibg=#800000
|
||||
highlight Visual guifg=#000000 guibg=#a6caf0
|
||||
highlight Cursor guifg=#000000 guibg=#00f000
|
||||
" NOTE THIS IS IN THE COOL SECTION
|
||||
" highlight CursorIM guifg=#000000 guibg=#f000f0
|
||||
highlight StatusLine guifg=#000000 guibg=#a6caf0
|
||||
highlight LineNr guifg=#b0b0b0 guibg=bg
|
||||
highlight Question guifg=#000000 guibg=#d0d090
|
||||
highlight ModeMsg guifg=fg guibg=#000080
|
||||
highlight VisualNOS guifg=fg guibg=#000080
|
||||
highlight SpecialKey guifg=#b0d0f0 guibg=bg
|
||||
highlight NonText guifg=#6080f0 guibg=#101010
|
||||
highlight Directory guifg=#80c0e0 guibg=bg
|
||||
highlight ErrorMsg guifg=#d0d090 guibg=#800000
|
||||
highlight MoreMsg guifg=#c0e080 guibg=bg
|
||||
highlight Title guifg=#f0c0f0 guibg=bg
|
||||
highlight WarningMsg guifg=#f08060 guibg=bg
|
||||
highlight WildMenu guifg=#000000 guibg=#d0d090
|
||||
highlight Folded guifg=#d0d0d0 guibg=#004000
|
||||
highlight FoldColumn guifg=#e0e0e0 guibg=#008000
|
||||
highlight DiffAdd guifg=fg guibg=#000080
|
||||
highlight DiffChange guifg=fg guibg=#800080
|
||||
highlight DiffDelete guifg=#6080f0 guibg=#202020
|
||||
highlight DiffText guifg=#000000 guibg=#c0e080
|
||||
highlight SignColumn guifg=#e0e0e0 guibg=#008000
|
||||
highlight IncSearch guifg=#000000 guibg=#d0d0d0
|
||||
highlight StatusLineNC guifg=#000000 guibg=#c0c0c0
|
||||
highlight VertSplit guifg=#000000 guibg=#c0c0c0
|
||||
highlight Underlined guifg=#80a0ff guibg=bg gui=underline
|
||||
highlight Ignore guifg=#000000 guibg=bg
|
||||
" NOTE THIS IS IN THE COOL SECTION
|
||||
if v:version >= 700
|
||||
highlight SpellBad guifg=NONE guibg=NONE guisp=#f08060
|
||||
highlight SpellCap guifg=NONE guibg=NONE guisp=#6080f0
|
||||
highlight SpellRare guifg=NONE guibg=NONE guisp=#f0c0f0
|
||||
highlight SpellLocal guifg=NONE guibg=NONE guisp=#c0d8f8
|
||||
highlight Pmenu guifg=fg guibg=#800080
|
||||
highlight PmenuSel guifg=#000000 guibg=#d0d0d0
|
||||
highlight PmenuSbar guifg=fg guibg=#000080
|
||||
highlight PmenuThumb guifg=fg guibg=#008000
|
||||
highlight TabLine guifg=fg guibg=#008000 gui=underline
|
||||
highlight TabLineFill guifg=fg guibg=#008000 gui=underline
|
||||
highlight TabLineSel guifg=fg guibg=bg
|
||||
highlight CursorColumn guifg=NONE guibg=#800000
|
||||
highlight CursorLine guifg=NONE guibg=NONE gui=underline
|
||||
highlight MatchParen guifg=NONE guibg=#800080
|
||||
endif
|
||||
|
||||
" DARK COLOR DEFINE END
|
||||
" }}}2
|
||||
elseif s:style=='defdark'
|
||||
highlight Normal guifg=#f0f0f0 guibg=#000000
|
||||
endif
|
||||
|
||||
" Take NT gui for example, If you want to use a console font such as
|
||||
" Lucida_Console with font size larger than 14, the font looks already thick,
|
||||
" and the bold font for that will be too thick, you may not want it be bolded.
|
||||
" The following code does this.
|
||||
"
|
||||
" All of the bold font may be disabled, since continuously switching between
|
||||
" bold and plain font hurts consistency and will inevitably fatigue your eye!
|
||||
|
||||
" Maximum 20 parameters for vim script function
|
||||
"
|
||||
MultiHi gui=NONE ModeMsg Search Cursor Special Comment Constant Number LineNr Question PreProc Statement Type Todo Error Identifier Normal
|
||||
|
||||
MultiHi gui=NONE VisualNOS SpecialKey NonText Directory ErrorMsg MoreMsg Title WarningMsg WildMenu Folded FoldColumn DiffAdd DiffChange DiffDelete DiffText SignColumn
|
||||
|
||||
" Vim 7 added stuffs
|
||||
if v:version >= 700
|
||||
MultiHi gui=NONE Ignore PmenuSel PmenuSel PmenuSbar PmenuThumb TabLine TabLineFill TabLineSel
|
||||
|
||||
" the gui=undercurl guisp could only support in Vim 7
|
||||
MultiHi gui=undercurl SpellBad SpellCap SpellRare SpellLocal
|
||||
if s:style=="cool" || s:style=="warm"
|
||||
MultiHi gui=underline TabLine TabLineFill Underlined CursorLine
|
||||
else
|
||||
MultiHi gui=underline TabLine Underlined
|
||||
endif
|
||||
endif
|
||||
|
||||
" For reversed stuffs
|
||||
MultiHi gui=NONE IncSearch StatusLine StatusLineNC VertSplit Visual
|
||||
|
||||
if s:style=="cool" || s:style=="warm"
|
||||
if s:fontface=="mixed"
|
||||
MultiHi gui=bold IncSearch StatusLine StatusLineNC VertSplit Visual
|
||||
endif
|
||||
else
|
||||
if s:fontface=="mixed"
|
||||
hi StatusLine gui=bold,reverse
|
||||
else
|
||||
hi StatusLine gui=reverse
|
||||
endif
|
||||
MultiHi gui=reverse IncSearch StatusLineNC VertSplit Visual
|
||||
endif
|
||||
|
||||
" Enable the bold style
|
||||
if s:fontface=="mixed"
|
||||
MultiHi gui=bold Question DiffText Statement Type MoreMsg ModeMsg NonText Title VisualNOS DiffDelete TabLineSel
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
" Color Term:
|
||||
|
||||
" It's not quite possible to support 'cool' and 'warm' simultaneously, since
|
||||
" we cannot expect a terminal to have more than 16 color names.
|
||||
"
|
||||
|
||||
" I assume Vim will never go to cterm mode when has("gui_running") returns 1,
|
||||
" Please enlighten me if I am wrong.
|
||||
"
|
||||
if !has('gui_running')
|
||||
" cterm settings {{{1
|
||||
if s:cterm_style=='cool'
|
||||
|
||||
highlight Normal ctermfg=LightGrey ctermbg=Black
|
||||
highlight Search ctermfg=White ctermbg=DarkRed
|
||||
highlight Visual ctermfg=Black ctermbg=DarkCyan
|
||||
highlight Cursor ctermfg=Black ctermbg=Green
|
||||
highlight Special ctermfg=Yellow ctermbg=Black
|
||||
highlight Comment ctermfg=DarkYellow ctermbg=Black
|
||||
highlight Constant ctermfg=Blue ctermbg=Black
|
||||
highlight Number ctermfg=Yellow ctermbg=Black
|
||||
highlight StatusLine ctermfg=Black ctermbg=DarkCyan
|
||||
highlight LineNr ctermfg=DarkGrey ctermbg=Black
|
||||
highlight Question ctermfg=Black ctermbg=DarkYellow
|
||||
highlight PreProc ctermfg=Green ctermbg=Black
|
||||
highlight Statement ctermfg=Cyan ctermbg=Black
|
||||
highlight Type ctermfg=Cyan ctermbg=Black
|
||||
if s:inversed_todo==0
|
||||
highlight Todo ctermfg=DarkRed ctermbg=DarkYellow
|
||||
else
|
||||
highlight Todo ctermfg=DarkYellow ctermbg=DarkBlue
|
||||
endif
|
||||
highlight Error ctermfg=Red ctermbg=Black
|
||||
highlight Identifier ctermfg=Magenta ctermbg=Black
|
||||
highlight Folded ctermfg=White ctermbg=DarkGreen
|
||||
highlight ModeMsg ctermfg=Grey ctermbg=DarkBlue
|
||||
highlight VisualNOS ctermfg=Grey ctermbg=DarkBlue
|
||||
highlight SpecialKey ctermfg=Cyan ctermbg=Black
|
||||
highlight NonText ctermfg=Blue ctermbg=Black
|
||||
highlight Directory ctermfg=Blue ctermbg=Black
|
||||
highlight ErrorMsg ctermfg=DarkYellow ctermbg=DarkRed
|
||||
highlight MoreMsg ctermfg=Green ctermbg=Black
|
||||
highlight Title ctermfg=Magenta ctermbg=Black
|
||||
highlight WarningMsg ctermfg=Red ctermbg=Black
|
||||
highlight WildMenu ctermfg=Black ctermbg=DarkYellow
|
||||
highlight FoldColumn ctermfg=White ctermbg=DarkGreen
|
||||
highlight SignColumn ctermfg=White ctermbg=DarkGreen
|
||||
highlight DiffText ctermfg=Black ctermbg=DarkYellow
|
||||
highlight DiffDelete ctermfg=Blue ctermbg=Black
|
||||
|
||||
if v:version >= 700
|
||||
highlight SpellBad ctermfg=NONE ctermbg=DarkRed
|
||||
highlight SpellCap ctermfg=NONE ctermbg=DarkBlue
|
||||
highlight SpellRare ctermfg=NONE ctermbg=DarkMagenta
|
||||
highlight SpellLocal ctermfg=NONE ctermbg=DarkGreen
|
||||
highlight Pmenu ctermfg=fg ctermbg=DarkMagenta
|
||||
highlight PmenuSel ctermfg=bg ctermbg=fg
|
||||
highlight PmenuSbar ctermfg=fg ctermbg=DarkBlue
|
||||
highlight PmenuThumb ctermfg=fg ctermbg=DarkGreen
|
||||
highlight TabLine ctermfg=fg ctermbg=DarkGreen cterm=underline
|
||||
highlight TabLineFill ctermfg=fg ctermbg=DarkGreen cterm=underline
|
||||
highlight TabLineSel ctermfg=fg ctermbg=bg
|
||||
highlight CursorColumn ctermfg=NONE ctermbg=DarkRed
|
||||
highlight CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
highlight MatchParen ctermfg=NONE ctermbg=DarkMagenta
|
||||
endif
|
||||
if &t_Co==8
|
||||
" 8 colour terminal support, this assumes 16 colour is available through
|
||||
" setting the 'bold' attribute, will get bright foreground colour.
|
||||
" However, the bright background color is not available for 8-color terms.
|
||||
"
|
||||
" You can manually set t_Co=16 in your .vimrc to see if your terminal
|
||||
" supports 16 colours,
|
||||
MultiHi cterm=none DiffText Visual Cursor Comment Todo StatusLine Question DiffChange ModeMsg VisualNOS ErrorMsg WildMenu DiffAdd Folded DiffDelete Normal PmenuThumb
|
||||
MultiHi cterm=bold Search Special Constant Number LineNr PreProc Statement Type Error Identifier SpecialKey NonText MoreMsg Title WarningMsg FoldColumn SignColumn Directory DiffDelete
|
||||
|
||||
else
|
||||
" Background > 7 is only available with 16 or more colors
|
||||
|
||||
" Only use the s:fontface option when there is 16-colour(or more)
|
||||
" terminal support
|
||||
|
||||
MultiHi cterm=none WarningMsg Search Visual Cursor Special Comment Constant Number LineNr PreProc Todo Error Identifier Folded SpecialKey Directory ErrorMsg Normal PmenuThumb
|
||||
MultiHi cterm=none WildMenu FoldColumn SignColumn DiffAdd DiffChange Question StatusLine DiffText
|
||||
MultiHi cterm=reverse IncSearch StatusLineNC VertSplit
|
||||
|
||||
" Well, well, bold font with color 0-7 is not possible.
|
||||
" So, the Question, StatusLine, DiffText cannot act as expected.
|
||||
|
||||
call s:multi_hi("cterm=".((s:fontface=="plain") ? "none" : "bold"), "Statement", "Type", "MoreMsg", "ModeMsg", "NonText", "Title", "VisualNOS", "DiffDelete", "TabLineSel")
|
||||
|
||||
endif
|
||||
|
||||
elseif s:cterm_style=='defdark'
|
||||
highlight Normal ctermfg=LightGrey ctermbg=Black
|
||||
endif
|
||||
" }}}1
|
||||
endif
|
||||
|
||||
|
||||
" Term:
|
||||
" For console with only 4 colours (term, not cterm), we'll use the default.
|
||||
" ...
|
||||
" The default colorscheme is good enough for terms with no more than 4 colours
|
||||
"
|
||||
|
||||
|
||||
" Links:
|
||||
"
|
||||
if (s:style=='cool') || (s:style == 'warm')
|
||||
" COLOR LINKS DEFINE START
|
||||
|
||||
highlight link String Constant
|
||||
" Character must be different from strings because in many languages
|
||||
" (especially C, C++) a 'char' variable is scalar while 'string' is pointer,
|
||||
" mistaken a 'char' for a 'string' will cause disaster!
|
||||
highlight link Character Number
|
||||
highlight link SpecialChar LineNr
|
||||
highlight link Tag Identifier
|
||||
" The following are not standard hi links,
|
||||
" these are used by DrChip
|
||||
highlight link Warning MoreMsg
|
||||
highlight link Notice Constant
|
||||
" these are used by Calendar
|
||||
highlight link CalToday PreProc
|
||||
" these are used by TagList
|
||||
highlight link MyTagListTagName IncSearch
|
||||
highlight link MyTagListTagScope Constant
|
||||
|
||||
" COLOR LINKS DEFINE END
|
||||
endif
|
||||
|
||||
|
||||
" Clean:
|
||||
"
|
||||
delcommand InitOpt
|
||||
delcommand MultiHi
|
||||
|
||||
" vim:et:nosta:sw=2:ts=8:
|
||||
" vim600:fdm=marker:fdl=1:
|
||||
603
.vim/doc/ps_color.txt
Normal file
603
.vim/doc/ps_color.txt
Normal file
File diff suppressed because it is too large
Load diff
28
.vim/doc/tags
Normal file
28
.vim/doc/tags
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
ps_color.txt ps_color.txt /*ps_color.txt*
|
||||
ps_colour ps_color.txt /*ps_colour*
|
||||
psc ps_color.txt /*psc*
|
||||
psc-about-background ps_color.txt /*psc-about-background*
|
||||
psc-change-background ps_color.txt /*psc-change-background*
|
||||
psc-contents ps_color.txt /*psc-contents*
|
||||
psc-cterm ps_color.txt /*psc-cterm*
|
||||
psc-cterm-color-table ps_color.txt /*psc-cterm-color-table*
|
||||
psc-cterm-incompatible ps_color.txt /*psc-cterm-incompatible*
|
||||
psc-cterm-nt ps_color.txt /*psc-cterm-nt*
|
||||
psc-cterm-others ps_color.txt /*psc-cterm-others*
|
||||
psc-cterm-xterm ps_color.txt /*psc-cterm-xterm*
|
||||
psc-faq ps_color.txt /*psc-faq*
|
||||
psc-faq-ffothers ps_color.txt /*psc-faq-ffothers*
|
||||
psc-features ps_color.txt /*psc-features*
|
||||
psc-options ps_color.txt /*psc-options*
|
||||
psc-overview ps_color.txt /*psc-overview*
|
||||
psc-release-notes ps_color.txt /*psc-release-notes*
|
||||
psc-tips ps_color.txt /*psc-tips*
|
||||
psc-todo ps_color.txt /*psc-todo*
|
||||
psc-usage ps_color.txt /*psc-usage*
|
||||
psc_cterm_style ps_color.txt /*psc_cterm_style*
|
||||
psc_fontface ps_color.txt /*psc_fontface*
|
||||
psc_inversed_todo ps_color.txt /*psc_inversed_todo*
|
||||
psc_statement_different_from_type ps_color.txt /*psc_statement_different_from_type*
|
||||
psc_style ps_color.txt /*psc_style*
|
||||
psc_use_default_for_cterm ps_color.txt /*psc_use_default_for_cterm*
|
||||
pscolor ps_color.txt /*pscolor*
|
||||
211
.vim/supertab.vim
Normal file
211
.vim/supertab.vim
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
" Author: Gergely Kontra <kgergely@mcl.hu>
|
||||
" You may direct issues regarding version 0.4+ to
|
||||
" Eric Van Dewoestine (ervandew@yahoo.com).
|
||||
" Version: 0.41
|
||||
" Description:
|
||||
" Use your tab key to do all your completion in insert mode!
|
||||
" The script remembers the last completion type, and applies that.
|
||||
" Eg.: You want to enter /usr/local/lib/povray3/
|
||||
" You type (in insert mode):
|
||||
" /u<C-x><C-f>/l<Tab><Tab><Tab>/p<Tab>/i<Tab>
|
||||
" You can also manipulate the completion type used by changing g:complType
|
||||
" variable.
|
||||
" You can cycle forward and backward with the <Tab> and <S-Tab> keys
|
||||
" (<S-Tab> will not work in the console version)
|
||||
" Note: you must press <Tab> once to be able to cycle back
|
||||
" History:
|
||||
" 0.41 Fixed couple bugs introduced in last version (Eric Van Dewoestine).
|
||||
" 0.4 Added the following functionality (Eric Van Dewoestine)
|
||||
" - support for vim 7 omni, user, and spelling completion modes
|
||||
" (should be backwards compatible with vim 6.x).
|
||||
" - command :SuperTabHelp which opens a window with available
|
||||
" completion types that the user can choose from.
|
||||
" - variable g:SuperTabRetainCompletionType setting for determining if
|
||||
" and for how long to retain completion type.
|
||||
" 0.32 Corrected tab-insertion/completing decidion (thx to: Lorenz Wegener)
|
||||
" 0.31 Added <S-Tab> for backward cycling. (req by: Peter Chun)
|
||||
" 0.3 Back to the roots. Autocompletion is another story...
|
||||
" Now the prompt appears, when showmode is on
|
||||
|
||||
if !exists('complType') "Integration with other completion functions...
|
||||
|
||||
" This variable determines if, and for how long, the current completion type
|
||||
" is retained. The possible values include:
|
||||
" 0 - The current completion type is only retained for the current completion.
|
||||
" Once you have chosen a completion result or exited the completion
|
||||
" mode, the default completion type is restored.
|
||||
" 1 - The current completion type is saved for the duration of your vim
|
||||
" session or until you enter a different completion mode.
|
||||
" (SuperTab default).
|
||||
" 2 - The current completion type is saved until you exit insert mode (via
|
||||
" ESC). Once you exit insert mode the default completion type is
|
||||
" restored.
|
||||
if !exists("g:SuperTabRetainCompletionType")
|
||||
let g:SuperTabRetainCompletionType = 1
|
||||
endif
|
||||
|
||||
" This variable is used to set the default completion type.
|
||||
" There is no need to escape this value as that will be done for you when
|
||||
" the type is set.
|
||||
" Ex. let g:SuperTabDefaultCompletionType = "<C-X><C-U>"
|
||||
if !exists("g:SuperTabDefaultCompletionType")
|
||||
let g:SuperTabDefaultCompletionType = "<C-P>"
|
||||
endif
|
||||
|
||||
" construct the help text.
|
||||
let s:tabHelp =
|
||||
\ "Hit <CR> or CTRL-] on the completion type you wish to swith to.\n" .
|
||||
\ "Use :help ins-completion for more information.\n" .
|
||||
\ "\n" .
|
||||
\ "|<C-N>| - Keywords in 'complete' searching down.\n" .
|
||||
\ "|<C-P>| - Keywords in 'complete' searching up (SuperTab default).\n" .
|
||||
\ "|<C-X><C-L>| - Whole lines.\n" .
|
||||
\ "|<C-X><C-N>| - Keywords in current file.\n" .
|
||||
\ "|<C-X><C-K>| - Keywords in 'dictionary'.\n" .
|
||||
\ "|<C-X><C-T>| - Keywords in 'thesaurus', thesaurus-style.\n" .
|
||||
\ "|<C-X><C-I>| - Keywords in the current and included files.\n" .
|
||||
\ "|<C-X><C-]>| - Tags.\n" .
|
||||
\ "|<C-X><C-F>| - File names.\n" .
|
||||
\ "|<C-X><C-D>| - Definitions or macros.\n" .
|
||||
\ "|<C-X><C-V>| - Vim command-line."
|
||||
if v:version >= 700
|
||||
let s:tabHelp = s:tabHelp . "\n" .
|
||||
\ "|<C-X><C-U>| - User defined completion.\n" .
|
||||
\ "|<C-X><C-O>| - Occult completion.\n" .
|
||||
\ "|<C-X>s| - Spelling suggestions."
|
||||
endif
|
||||
|
||||
" set the available completion types and modes.
|
||||
let s:types =
|
||||
\ "\<C-E>\<C-Y>\<C-L>\<C-N>\<C-K>\<C-T>\<C-I>\<C-]>\<C-F>\<C-D>\<C-V>\<C-N>\<C-P>"
|
||||
let s:modes = '/^E/^Y/^L/^N/^K/^T/^I/^]/^F/^D/^V/^P'
|
||||
if v:version >= 700
|
||||
let s:types = s:types . "\<C-U>\<C-O>\<C-N>\<C-P>s"
|
||||
let s:modes = s:modes . '/^U/^O/s'
|
||||
endif
|
||||
let s:types = s:types . "np"
|
||||
let s:modes = s:modes . '/n/p'
|
||||
|
||||
" Globally available function that user's can use to create mappings to
|
||||
" quickly switch completion modes. Useful when a user wants to restore the
|
||||
" default or switch to another mode without having to kick off a completion
|
||||
" of that type or use SuperTabHelp.
|
||||
" Example mapping to restore SuperTab default:
|
||||
" nmap <F6> :call SetSuperTabCompletionType("<C-P>")<cr>
|
||||
fu! SuperTabSetCompletionType (type)
|
||||
exec "let g:complType = \"" . escape(a:type, '<') . "\""
|
||||
endf
|
||||
|
||||
call SuperTabSetCompletionType(g:SuperTabDefaultCompletionType)
|
||||
|
||||
im <C-X> <C-r>=CtrlXPP()<CR>
|
||||
|
||||
" Setup mechanism to restore orignial completion type upon leaving insert
|
||||
" mode if g:SuperTabDefaultCompletionType == 2
|
||||
if g:SuperTabRetainCompletionType == 2
|
||||
" pre vim 7, must map <esc>
|
||||
if v:version < 700
|
||||
im <silent> <ESC>
|
||||
\ <ESC>:call SuperTabSetCompletionType(g:SuperTabDefaultCompletionType)<cr>
|
||||
|
||||
" since vim 7, we can use InsertLeave autocmd.
|
||||
else
|
||||
augroup supertab
|
||||
autocmd InsertLeave *
|
||||
\ call SuperTabSetCompletionType(g:SuperTabDefaultCompletionType)
|
||||
augroup END
|
||||
endif
|
||||
endif
|
||||
|
||||
fu! CtrlXPP()
|
||||
if &smd
|
||||
echo '' | echo '-- ^X++ mode (' . s:modes . ')'
|
||||
endif
|
||||
let complType=nr2char(getchar())
|
||||
if stridx(s:types, complType) != -1
|
||||
if stridx("\<C-E>\<C-Y>",complType)!=-1 " no memory, just scroll...
|
||||
return "\<C-x>".complType
|
||||
elseif stridx('np',complType)!=-1
|
||||
let complType=nr2char(char2nr(complType)-96) " char2nr('n')-char2nr("\<C-n")
|
||||
else
|
||||
let complType="\<C-x>".complType
|
||||
endif
|
||||
|
||||
if g:SuperTabRetainCompletionType
|
||||
let g:complType = complType
|
||||
endif
|
||||
|
||||
return complType
|
||||
else
|
||||
echohl "Unknown mode"
|
||||
return complType
|
||||
endif
|
||||
endf
|
||||
|
||||
" From the doc |insert.txt| improved
|
||||
im <Tab> <C-n>
|
||||
inore <S-Tab> <C-p>
|
||||
|
||||
" This way after hitting <Tab>, hitting it once more will go to next match
|
||||
" (because in XIM mode <C-n> and <C-p> mappings are ignored)
|
||||
" and wont start a brand new completion
|
||||
" The side effect, that in the beginning of line <C-n> and <C-p> inserts a
|
||||
" <Tab>, but I hope it may not be a problem...
|
||||
ino <C-n> <C-R>=<SID>SuperTab('n')<CR>
|
||||
ino <C-p> <C-R>=<SID>SuperTab('p')<CR>
|
||||
|
||||
fu! <SID>SuperTab(command)
|
||||
if (strpart(getline('.'),col('.')-2,1)=~'^\s\?$')
|
||||
return "\<Tab>"
|
||||
else
|
||||
" exception: if in <c-p> mode, then <c-n> should move up the list, and
|
||||
" <c-p> down the list.
|
||||
if a:command == 'p' && g:complType == "\<C-P>"
|
||||
return "\<C-N>"
|
||||
endif
|
||||
return g:complType
|
||||
endif
|
||||
endf
|
||||
|
||||
fu! <SID>SuperTabHelp()
|
||||
if bufwinnr("SuperTabHelp") == -1
|
||||
botright split SuperTabHelp
|
||||
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nowrite
|
||||
setlocal bufhidden=delete
|
||||
|
||||
let saved = @"
|
||||
let @" = s:tabHelp
|
||||
silent put
|
||||
call cursor(1,1)
|
||||
silent 1,delete
|
||||
call cursor(4,1)
|
||||
let @" = saved
|
||||
exec "resize " . line('$')
|
||||
|
||||
syntax match Special "|.\{-}|"
|
||||
|
||||
setlocal readonly
|
||||
setlocal nomodifiable
|
||||
|
||||
nmap <silent> <buffer> <cr> :call <SID>SetCompletionType()<cr>
|
||||
nmap <silent> <buffer> <c-]> :call <SID>SetCompletionType()<cr>
|
||||
else
|
||||
exec bufwinnr("SuperTabHelp") . "winc w"
|
||||
endif
|
||||
endf
|
||||
|
||||
fu! s:SetCompletionType ()
|
||||
let chosen = substitute(getline('.'), '.*|\(.*\)|.*', '\1', '')
|
||||
if chosen != getline('.')
|
||||
call SuperTabSetCompletionType(chosen)
|
||||
close
|
||||
winc p
|
||||
endif
|
||||
endf
|
||||
|
||||
if !exists(":SuperTabHelp")
|
||||
command SuperTabHelp :call <SID>SuperTabHelp()
|
||||
endif
|
||||
en
|
||||
23
.vim/syntax/motd.vim
Normal file
23
.vim/syntax/motd.vim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
" Vim syntax file
|
||||
" Language: MotD Public
|
||||
" Maintainer: David Bushong <david@bushong.net>
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match motdSig "\(\s\s\+\|\t\)--\?.\+$\|\s--\?\w\+\s*$"
|
||||
syn match motdThread "^\s\+\\[_-]"
|
||||
syn match motdDate "^\d\+/\d\+\s"
|
||||
syn match motdLink "https\?://\S\+"
|
||||
|
||||
hi link motdSig String
|
||||
hi link motdThread Type
|
||||
hi link motdDate Number
|
||||
hi link motdLink Underlined
|
||||
|
||||
let b:current_syntax = "motd"
|
||||
Loading…
Add table
Add a link
Reference in a new issue