Skip to content

Commit

Permalink
add Tools/vim
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Mar 4, 2011
1 parent f0489bf commit a7204b5
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 0 deletions.
60 changes: 60 additions & 0 deletions Tools/vim/colors/zmrok.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
" Maintainer: Krzysztof Goj <Krzysztof-dot-Goj-at-gmail-dot-com>
" Last Change: 27th March 2009

set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif

let g:colors_name="zmrok"

" general colors
hi Normal guifg=#F8F8F8 guibg=#141414
hi Cursor guifg=Black guibg=Green gui=none
hi LineNr guifg=#777777 guibg=Black
hi NonText guifg=#808080 guibg=#202020

hi StatusLine guifg=#F8F8F8 guibg=#202020 gui=bold
hi StatusLineNC guifg=#777777 guibg=#202020 gui=none
hi VertSplit guifg=#202020 guibg=#202020 gui=none

" Vim >= 7.0 specific colors
if version >= 700
hi CursorLine guibg=#0d0d0d
hi CursorColumn guibg=#0d0d0d
hi MatchParen guifg=Black guibg=#FFCC20 gui=bold

hi Pmenu guifg=#141414 guibg=#CDA869
hi PmenuSel guifg=#F8F8F8 guibg=#9B703F
hi PmenuSbar guibg=#DAEFA3
hi PmenuThumb guifg=#8F9D6A
endif

"Syntax hilighting

hi Comment guifg=#888888
hi Error guifg=red guibg=#141414
hi Todo guifg=red guibg=#141414 gui=bold

hi Constant guifg=#CF593C
hi Exception guifg=#CF593C
hi Operator guifg=#DFCC77

hi Special guifg=orange
hi SpecialChar guifg=orange
hi String guifg=#D9FF77
hi Character guifg=#FFCE43
hi Number guifg=#FACE43

hi Statement guifg=#A56A30 gui=bold
hi Keyword guifg=#A56A30 gui=bold
hi Label guifg=#A56A30 gui=bold

hi Identifier guifg=#C7CA87 gui=none
hi Type guifg=#C7CA87 gui=none
hi Function guifg=#C7CA87 gui=none
hi StorageClass guifg=#C7CA87 gui=none

hi PreProc guifg=khaki4

File renamed without changes.
118 changes: 118 additions & 0 deletions Tools/vim/mswin.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

"
" Original author: pig@ptt
"--------------------------------------
" Configuration file for vim

"-------------------------------------
" Vim UI
"-------------------------------------
set background=dark
syntax on
if exists(":colorscheme")
colorscheme zmrok
endif

set ttyfast

" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible " Use Vim defaults instead of 100% vi compatibility
set backspace=indent,eol,start " more powerful backspacing

" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup

" " Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup

syntax enable
set autoindent
set background=dark
set cmdheight=2
set softtabstop=2
set shiftwidth=2
set enc=taiwan
set fileencoding=taiwan
set cmdheight=2
set ruler
let s:cpo_save=&cpo
set cpo&vim

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction



"--------------------------------------
map! <xHome> <Home>
map! <xEnd> <End>
map! <S-xF4> <S-F4>
map! <S-xF3> <S-F3>
map! <S-xF2> <S-F2>
map! <S-xF1> <S-F1>
map! <xF4> <F4>
map! <xF3> <F3>
map! <xF2> <F2>
map! <xF1> <F1>
map <xHome> <Home>
map <xEnd> <End>
map <S-xF4> <S-F4>
map <S-xF3> <S-F3>
map <S-xF2> <S-F2>
map <S-xF1> <S-F1>
map <xF4> <F4>
map <xF3> <F3>
map <xF2> <F2>
map <xF1> <F1>
map <F9> :set paste!<bar>set paste?<cr>
let &cpo=s:cpo_save
unlet s:cpo_save

if has("autocmd")

filetype plugin indent on
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif

endif " has("autocmd")

" For FDP Indentation
"--------------------------------------
augroup sgmledit
autocmd FileType sgml set formatoptions=cq2l " Special formatting options
autocmd FileType sgml set textwidth=70 " Wrap lines at 70 columns
autocmd FileType sgml set shiftwidth=2 " Automatically indent
autocmd FileType sgml set softtabstop=2 " Tab key indents 2 spaces
autocmd FileType sgml set tabstop=8 " Replace 8 spaces with a tab
autocmd FileType sgml set autoindent " Automatic indentation
augroup END

0 comments on commit a7204b5

Please sign in to comment.