Last active
March 2, 2016 02:27
-
-
Save arsane/5208fc029fd0dc86e015 to your computer and use it in GitHub Desktop.
vim config file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Theme/Colors | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" in putty client, set the configuration: | |
" Connection -> Data -> Terminal-type string to "xterm-color" | |
" set term=sun-color | |
syntax on | |
set nu | |
"colorscheme vibrantink | |
"colorscheme default | |
"colorscheme wombat | |
"colorscheme blue | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set guioptions-=m | |
set guioptions-=l | |
set guioptions-=L | |
set guioptions-=t | |
set guioptions-=T | |
set updatecount=0 | |
set showmatch | |
set hlsearch | |
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L] | |
set laststatus=2 | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
"disable write backup | |
set nowritebackup | |
set nobackup | |
"set wrapmargin=80 | |
"set wrap | |
"set guifont=Monaco\ 12 | |
" | |
set cindent | |
set smartindent | |
set autoindent | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" File Explorer | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:explVertical=1 " should I split vertically | |
let g:explWinSize=35 " width of 35 pixels | |
let g:netrw_altv=1 | |
let g:netrw_winsize=120 | |
let g:netrw_browse_split=3 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Win Manager | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:winManagerWidth=35 " How wide should it be(pixels) | |
"let g:winManagerWindowLayout = 'FileExplorer,TagsExplorer|BufExplorer' " What windows should it | |
"let g:winManagerWindowLayout = 'FileExplorer,TagsExplorer' " What windows should it | |
let g:winManagerWindowLayout = 'FileExplorer' " What windows should it | |
let g:explSortBy='reverse name' " reverse alphabetically | |
"let g:explSortBy='order' " reverse alphabetically | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set encoding=utf-8 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" CTags | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let Tlist_Ctags_Cmd = '/usr/bin/ctags' " Location of ctags | |
"let Tlist_Sort_Type = "name" " order by | |
let Tlist_Sort_Type = "order" " order by | |
let Tlist_Use_Right_Window = 0 " split to the right side of the screen | |
let Tlist_Compart_Format = 1 " show small meny | |
let Tlist_Exist_OnlyWindow = 1 " if you are the last, kill yourself | |
let Tlist_File_Fold_Auto_Close = 0 " Do not close tags for other files | |
let Tlist_Enable_Fold_Column = 0 " Do not show folding tree | |
let Tlist_Show_One_File = 1 " Only show one file | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" CTags | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" set diff mode | |
set diffexpr=MyDiff() | |
function MyDiff() | |
let opt = "" | |
if &diffopt =~ "icase" | |
let opt = opt . "-i " | |
endif | |
if &diffopt =~ "iwhite" | |
let opt = opt . "-b " | |
endif | |
silent execute "!diff -a -b -B --binary " . opt . v:fname_in . " " . v:fname_new . | |
\ " > " . v:fname_out | |
endfunction | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" plugin manager: pathogen | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
execute pathogen#infect() | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" added by sam | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
autocmd BufEnter * lcd %:p:h | |
filetype plugin indent on | |
let c_space_errors=1 | |
highlight WhitespaceEOL ctermbg=red guibg=red | |
match WhitespaceEOL /\s\+$/ | |
highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
match OverLength /\%81v.*/ | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
vmap <silent> ,y y:new<CR>:call setline(1,getregtype())<CR>o<Esc>P:wq! ~/reg.txt<CR> | |
nmap <silent> ,y :new<CR>:call setline(1,getregtype())<CR>o<Esc>P:wq! ~/reg.txt<CR> | |
map <silent> ,p :sview ~/reg.txt<CR>"zdddG:q!<CR>:call setreg('"', @", @z)<CR>p | |
map <silent> ,P :sview ~/reg.txt<CR>"zdddG:q!<CR>:call setreg('"', @", @z)<CR>P | |
set visualbell t_vb= | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
func GitGrep(...) | |
let save = &grepprg | |
set grepprg=git\ grep\ -n\ $* | |
let s = 'grep' | |
for i in a:000 | |
let s = s . ' ' . i | |
endfor | |
exe s | |
let &grepprg = save | |
endfun | |
command -nargs=? G call GitGrep(<f-args>) | |
func GitGrepWord() | |
normal! "zyiw | |
call GitGrep('-w -e ', getreg('z')) | |
endf | |
nmap <C-x>G :call GitGrepWord()<CR> | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
if has("cscope") | |
set csto=0 | |
set cst | |
endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment