linux 佛像脚本,好用的vim配置脚本 佛祖保佑

"""""""""""""""""""

"

"""""""""""""""""""

"set shortmess=atI "

"winpos 5 5 "

"set lines=40 columns=155 "

"set nu "

set go= "

"color asmanian2 "

set guifont=Courier_New:h10:cANSI "

"syntax on "

autocmd InsertLeave * se nocul "

autocmd InsertEnter * se cul "

"set ruler "

set showcmd "

"set cmdheight=1 " 1

"set whichwrap+=,h,l " backspace()

"set scrolloff=3 " buffer3

set novisualbell " ()

set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")} "

set laststatus=1 " (1),(2)

set foldenable "

set foldmethod=manual "

"set background=dark "

set nocompatible "vibug

"

if version >= 603

set helplang=cn

set encoding=utf-8

endif

colorscheme ron

"

"colorscheme murphy

"

"if (has("gui_running"))

" set guifont=Bitstream\ Vera\ Sans\ Mono\ 10

"endif

set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936

set termencoding=utf-8

set encoding=utf-8

set fileencodings=ucs-bom,utf-8,cp936

set fileencoding=utf-8

"""""""""""""""""""""""""

"""""""""""""""

".c,.h,.sh,.java

autocmd BufNewFile *.cpp,*.[ch],*.sh,*.java exec ":call SetTitle()"

""SetTitle

func SetTitle()

".sh

if &filetype == 'sh'

call setline(1,"\#########################################################################")

call append(line("."), "\#")

call append(line(".")+1, "\# _ooOoo_")

call append(line(".")+2, "\# o8888888o")

call append(line(".")+3, "\# 88\" . \"88")

call append(line(".")+4, "\# (| -_- |)")

call append(line(".")+5, "\# O\\ = /O")

call append(line(".")+6, "\# ____/`---'\\____")

call append(line(".")+7, "\# .' \\\| |// `.")

call append(line(".")+8, "\# / \\\||| : |||// \\")

call append(line(".")+9, "\# / _||||| -:- |||||- \\")

call append(line(".")+10, "\# | | \\\\ - /// | |")

call append(line(".")+11, "\# | \\_| ''\\---/'' | |")

call append(line(".")+12, "\# \\ .-\\__ `-` ___/-. /")

call append(line(".")+13, "\# ___`. .' /--.--\\ `. . __")

call append(line(".")+14, "\# .\"\" '< `.___\\__/___.' >'\"\".")

call append(line(".")+15, "\# | | : `- \\`.;`\ _ /`;.`/ - ` : | |")

call append(line(".")+16, "\# \\ \\ `-. \\_ __\\ /__ _/ .-` / /")

call append(line(".")+17, "\#======`-.____`-.___\\_____/___.-`____.-'======")

call append(line(".")+18, "\# `=---='")

call append(line(".")+19, "\#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")

call append(line(".")+20, "\# GOD BLESS NEVER BUG")

call append(line(".")+21, "\#")

call append(line(".")+22, "\# Author: test")

call append(line(".")+23, "\# mail: mailto:test@jbxue.com test@jbxue.com")

call append(line(".")+24, "\# Created Time: ".strftime("%c"))

call append(line(".")+25, "\#########################################################################")

call append(line(".")+26, "\#!/bin/bash")

call append(line(".")+27, "")

else

call setline(1, "/*************************************************************************")

call append(line("."), " ")

call append(line(".")+1, " _ooOoo_")

call append(line(".")+2, " o8888888o")

call append(line(".")+3, " 88\" . \"88")

call append(line(".")+4, " (| -_- |)")

call append(line(".")+5, " O\\ = /O")

call append(line(".")+6, " ____/`---'\\____")

call append(line(".")+7, " .' \\\| |// `.")

call append(line(".")+8, " / \\\||| : |||// \\")

call append(line(".")+9, " / _||||| -:- |||||- \\")

call append(line(".")+10, " | | \\\\ - /// | |")

call append(line(".")+11, " | \\_| ''\\---/'' | |")

call append(line(".")+12, " \\ .-\\__ `-` ___/-. /")

call append(line(".")+13, " ___`. .' /--.--\\ `. . __")

call append(line(".")+14, " .\"\" '< `.___\\__/___.' >'\"\".")

call append(line(".")+15, " | | : `- \\`.;`\ _ /`;.`/ - ` : | |")

call append(line(".")+16, " \\ \\ `-. \\_ __\\ /__ _/ .-` / /")

call append(line(".")+17, "======`-.____`-.___\\_____/___.-`____.-'======")

call append(line(".")+18, " `=---='")

call append(line(".")+19, " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")

call append(line(".")+20, " ###################################")

call append(line(".")+21, " GOD BLESS NEVER BUG")

call append(line(".")+22, "")

call append(line(".")+23, " > File Name: ".expand("%"))

call append(line(".")+24, " > Author: test")

call append(line(".")+25, " > Mail: mailto:test@jbxue.com")

call append(line(".")+26, " > Created Time: ".strftime("%c"))

call append(line(".")+27, " ************************************************************************/")

call append(line(".")+28, "")

endif

if &filetype == 'cpp'

call append(line(".")+29, "#include")

call append(line(".")+30, "using namespace std;")

call append(line(".")+31, "")

endif

if &filetype == 'c'

call append(line(".")+29, "#include")

call append(line(".")+30, "#include")

call append(line(".")+31, "#include")

call append(line(".")+32, "")

endif

"

autocmd BufNewFile * normal G

endfunc

"""""""""""""""""""""""""""""""

"

"""""""""""""""""""""""""""""""

nmap w :w!>

nmap f :find

" + ctrl+a

map ggVGY

map! ggVGY

map gg=G

" Ctrl+c

vmap "+y

"

nnoremap :g/^\s*$/d

"

nnoremap :vert diffsplit

"

map :tabnew

"

map :tabnew .

"

map \be

"CC++ F5

map :call CompileRunGcc()

func! CompileRunGcc()

exec "w"

if &filetype == 'c'

exec "!g++ % -o %

exec "! ./%

elseif &filetype == 'cpp'

exec "!g++ % -o %

exec "! ./%

elseif &filetype == 'java'

exec "!javac %"

exec "!java %

elseif &filetype == 'sh'

:!./%

endif

endfunc

"C,C++

map :call Rungdb()

Rungdb()

exec "w"

exec "!g++ % -g -o %

exec "!gdb ./%

endfunc

""""""""""""""""""""""""

""

""""""""""""""""""""""""

"

set autoread

" quickfix

autocmd FileType c,cpp map :w:make

"

set completeopt=preview,menu

"

filetype plugin on

"

set clipboard+=unnamed

"

set nobackup

"make

:set makeprg=g++\ -Wall\ \ %

"

set autowrite

set ruler "

set cursorline "

set magic "

set guioptions-=T "

set guioptions-=m "

"set statusline=\ %

"

" donot need fold

"set foldcolumn=0

"set foldmethod=indent

"set foldlevel=3

"set foldenable "

" vivim

set nocompatible

"

set syntax=on

"

set noeb

"

set confirm

"

set autoindent

set cindent

" Tab

set tabstop=4

" 4

set softtabstop=4

set shiftwidth=4

"

set noexpandtab

"

set smarttab

"

set number

"

set history=1000

"

set nobackup

set noswapfile

"

set ignorecase

"

set hlsearch

set incsearch

"

set gdefault

"

set enc=utf-8

set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936

"

set langmenu=zh_CN.UTF-8

set helplang=cn

"

"set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}

"set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%]

"

set laststatus=2

" 12

set cmdheight=2

"

filetype on

"

filetype plugin on

"

filetype indent on

"

set viminfo+=!

"

set iskeyword+=_,$,@,%,#,-

"

set linespace=0

"

set wildmenu

" backspaceindent, eol, start

set backspace=2

" backspace

set whichwrap+=,h,l

" bufferoffice

"ispsubb 20141105

"set mouse=a

set selection=exclusive

set selectmode=mouse,key

" : commands

set report=0

"

set fillchars=vert:\ ,stl:\ ,stlnc:\

"

set showmatch

"

set matchtime=1

" buffer3

set scrolloff=3

" C

set smartindent

" txttxt.vim

au BufRead,BufNewFile * setfiletype txt

"

"":inoremap ( ()i

"":inoremap ) =ClosePair(')')

"":inoremap { {}O

"":inoremap } =ClosePair('}')

"":inoremap [ []i

"":inoremap ] =ClosePair(']')

"":inoremap " ""i

"":inoremap ' ''i

""function! ClosePair(char)

""if getline('.')[col('.') - 1] == a:char

""return "\"

""else

""return a:char

""endif

""endfunction

filetype plugin indent on

",

set completeopt=longest,menu

""""""""""""""""""""""""""""""""

" CTags

""""""""""""""""""""""""""""""""

let Tlist_Sort_Type = "name" "

let Tlist_Use_Right_Window = 1 "

let Tlist_Compart_Format = 1 "

let Tlist_Exist_OnlyWindow = 1 " bufferkillkillbuffer

let Tlist_File_Fold_Auto_Close = 0 " tags

let Tlist_Enable_Fold_Column = 0 "

autocmd FileType java set tags+=D:\tools\java\tags

"autocmd FileType h,cpp,cc,c set tags+=D:\tools\cpp\tags

"let Tlist_Show_One_File=1 "tag

"tags

set tags=tags

"set autochdir

"""""""""""""""""""""""""

"

"""""""""""""""""""""""""

"Taglist

let Tlist_Auto_Open=1

""""""""""""""""""""""""""""""

" Tag list (ctags)

""""""""""""""""""""""""""""""""

let Tlist_Ctags_Cmd = '/usr/bin/ctags'

let Tlist_Show_One_File = 1 "tag

let Tlist_Exit_OnlyWindow = 1 "taglistvim

let Tlist_Use_Right_Window = 1 "taglist

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值