VIMRC-我喜欢的

"  author: feelinglucky<i.feelinglucky@gmail.com>
" website: http://www.gracecode.com
"    date: 2007-12-28

set linebreak
set textwidth=80
set nocompatible
set history=400
set ruler
set number
set hlsearch
set noincsearch
set expandtab
set noerrorbells
set novisualbell
set t_vb= "close visual bell
"set foldmethod=marker
set tabstop=4
set shiftwidth=4
set nobackup
set nowritebackup
"set noswapfile
set smarttab
set smartindent
set autoindent
set cindent
set wrap
syntax on "highlight
syntax enable "for fold?
set autoread
set cmdheight=1
set showtabline=2 
"set clipboard+=unnamed
set tabpagemax=20
set laststatus=2
"set statusline=\ [File]\ %F%m%r%h\ %w\ \ [PWD]\ %r%{CurrectDir()}%h\ \ %=[Line]\ %l,%c\ %=\ %P

"x#"function! CurrectDir()
"   let curdir = substitute(getcwd(), "", "", "g")
"  return curdir
"endfunction

if has("multi_byte")
    set encoding=utf-8
    set termencoding=utf-8
    set formatoptions+=mM
    set fencs=utf-8,gbk

    if v:lang =~? '^\(zh\)\|\(ja\)\|\(ko\)'
        set ambiwidth=double
    endif

    if has("win32")
        source $VIMRUNTIME/delmenu.vim
        source $VIMRUNTIME/menu.vim
        language messages zh_CN.utf-8
    endif 
else
    echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte"
endif

if has("gui_running")
    set guioptions=
    colorscheme oceandeep
    set cursorline
    if has("win32")
        set gfn=Raize
        au GUIEnter * simalt ~x
    else
        set guifont=Raize\ 13
        set guifontwide=WenQuanYi\ Bitmap\ Song\ 12
    endif
else
    colorscheme vylight
    "colorscheme zellner
endif

" 2012-11-26 for omnicpp
set nocp
filetype plugin on
filetype plugin indent on
if has("autocmd")
    filetype plugin indent on
    augroup vimrcEx
        au!
        autocmd FileType text setlocal textwidth=78
        autocmd BufReadPost *
                    \ if line("'\"") > 0 && line("'\"") <= line("$") |
                    \   exe "normal g`\"" |
                    \ endif
    augroup END
endif

" key stock
map tn :tabnext<cr>
map tp :tabprevious<cr>
map td :tabnew .<cr>
map te :tabedit
map tc :tabclose<cr>
map cs :!php -l %<cr>

map <F10> :VSTreeExplore<cr>
map <F11> :x<cr>
map <F12> :q!<cr>
" vim: set et sw=4 ts=4 sts=4 fdm=marker ff=unix fenc=utf8

"set for ctags
set tags=tags,/usr/local/Trolltech/Qt-4.6.3/include/qtx86tagscpp;
set autochdir
"end set ctags
"set for Tlist
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
"end set Tlist

"set for under line
set cursorline

"set for zz
set foldmethod=indent
"set foldlevel=1


let Tlist_Show_One_FIle=0
let Tlist_Exit_OnlyWindow=1

"map for omni
inoremap <expr> <CR> pumvisible()?"\<C-Y>":"\<CR>"
inoremap <expr> <C-J> pumvisible()?"\<C-N>\<C-P>\<PageDown>":"\<C-X><C-O>"
inoremap <expr> <C-K> pumvisible()?"\<C-P>\<C-N>\<PageUp>":"\<C-N><C-K>"
inoremap <expr> <C-U> pumvisible()?"\<C-E>":"\<C-U>"

set completeopt=longest,menu

""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"cscope setting
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("cscope")
    set csprg=/usr/bin/cscope
    set csto=1
    set cst
    set nocsverb
    "add any database in current directory
    if filereadable("cscope.out")
        cs add cscope.out
    endif
    set csverb
endif
nmap <C-@>s : cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>g : cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c : cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>t : cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>e : cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>f : cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-@>i : cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-@>d : cs find d <C-R>=expand("<cword>")<CR><CR>

"2013-03-21
set incsearch
"high light when search
set hlsearch 
set ignorecase

"powerline{
"set guifont=PowerlineSymbols\ for\ Powerline
"set nocompatible
"set t_Co=256
"let g:Powerline_symbols='fancy'
"}

"help doc chinese
set helplang=cn

" --------configuration for  neocomplcache-------------
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplcache.
let g:neocomplcache_enable_at_startup = 1 
" Use smartcase.
let g:neocomplcache_enable_smart_case = 1
" Use camel case completion.
let g:neocomplcache_enable_camel_case_completion = 1
" Use underbar completion.
let g:neocomplcache_enable_underbar_completion = 1
" Set minimum syntax keyword length.
let g:neocomplcache_min_syntax_length = 1
" set the max list in the popup menu. increase the speed
let g:neocomplcache_max_list=20
" Define keyword.
if !exists('g:neocomplcache_keyword_patterns')
    let g:neocomplcache_keyword_patterns = {}
endif
let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
let g:neocomplcache_auto_completion_start_length=1
" ignore letter case
let g:neocomplcache_enable_ignore_case=1
" --------configuration for  neocomplcache-------------

"set terminal 256 color
"set t_Co=256
"

"minibufexpl setting
let g:miniBufExplForceSyntaxEnable=1
let g:miniBufExplModSelTarget=1

"statusline setting
set laststatus=2 "2:总是显示状态栏 0:隐藏状态栏  
let statusHead         ="%-.50f\ %h%m%r"  
let statusBreakPoint   ="%<"  
let statusSeparator    ="|"  
let statusFileType     ="%{((&ft\ ==\ \"help\"\ \|\|\ &ft\ ==\ \"\")?\"\":\"[\".&ft.\"]\")}"  
let statusFileFormat   ="[%{(&ff\ ==\ \"unix\")?\"u\":\"d\"}]"  
let statusAscii        ="\{%b:0x%B\}"  
let statusCwd          ="%-.50{getcwd()}"  
let statusBody         =statusFileType.statusFileFormat.statusSeparator.statusAscii.statusSeparator."\ ".statusBreakPoint.statusCwd  
let statusEncoding     ="[%{(&fenc\ ==\ \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}]"  
let statusBlank        ="%="  
let statusKeymap       ="%k"  
let statusRuler        ="%-12.(%lL,%c%VC%)\ %P"  
let statusTime         ="%{strftime(\"%Y/%m/%d\ -\ %H:%M\")}"  
let statusEnd=statusKeymap."\ ".statusEncoding.statusRuler."\ ".statusTime  
"" 最终状态栏的模式字符串  
let statusString=statusHead.statusBody.statusBlank.statusEnd  
set statusline=%!statusString  
highlight StatusLine cterm=bold ctermfg=yellow  ctermbg=black"状态栏颜色设置

" author: feelinglucky<i.feelinglucky@gmail.com>" website: http://www.gracecode.com" date: 2007-12-28set linebreakset textwidth=80set nocompatibleset history=400set rulerset numberset hlsearchset noincsearchset expandtabset noerrorbellsset novisualbellset t_vb= "close visual bell"set foldmethod=markerset tabstop=4set shiftwidth=4set nobackupset nowritebackup"set noswapfileset smarttabset smartindentset autoindentset cindentset wrapsyntax on "highlightsyntax enable "for fold?set autoreadset cmdheight=1set showtabline=2 "set clipboard+=unnamedset tabpagemax=20set laststatus=2"set statusline=\ [File]\ %F%m%r%h\ %w\ \ [PWD]\ %r%{CurrectDir()}%h\ \ %=[Line]\ %l,%c\ %=\ %P"x#"function! CurrectDir()" let curdir = substitute(getcwd(), "", "", "g")" return curdir"endfunctionif has("multi_byte") set encoding=utf-8 set termencoding=utf-8 set formatoptions+=mM set fencs=utf-8,gbk if v:lang =~? '^\(zh\)\|\(ja\)\|\(ko\)' set ambiwidth=double endif if has("win32") source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim language messages zh_CN.utf-8 endif else echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte"endifif has("gui_running") set guioptions= colorscheme oceandeep set cursorline if has("win32") set gfn=Raize au GUIEnter * simalt ~x else set guifont=Raize\ 13 set guifontwide=WenQuanYi\ Bitmap\ Song\ 12 endifelse colorscheme vylight "colorscheme zellnerendif" 2012-11-26 for omnicppset nocpfiletype plugin onfiletype plugin indent onif has("autocmd") filetype plugin indent on augroup vimrcEx au! autocmd FileType text setlocal textwidth=78 autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif augroup ENDendif" key stockmap tn :tabnext<cr>map tp :tabprevious<cr>map td :tabnew .<cr>map te :tabeditmap tc :tabclose<cr>map cs :!php -l %<cr>map <F10> :VSTreeExplore<cr>map <F11> :x<cr>map <F12> :q!<cr>" vim: set et sw=4 ts=4 sts=4 fdm=marker ff=unix fenc=utf8"set for ctagsset tags=tags,/usr/local/Trolltech/Qt-4.6.3/include/qtx86tagscpp;set autochdir"end set ctags"set for Tlistlet Tlist_Show_One_File=1let Tlist_Exit_OnlyWindow=1"end set Tlist"set for under lineset cursorline"set for zzset foldmethod=indent"set foldlevel=1let Tlist_Show_One_FIle=0let Tlist_Exit_OnlyWindow=1"map for omniinoremap <expr> <CR> pumvisible()?"\<C-Y>":"\<CR>"inoremap <expr> <C-J> pumvisible()?"\<C-N>\<C-P>\<PageDown>":"\<C-X><C-O>"inoremap <expr> <C-K> pumvisible()?"\<C-P>\<C-N>\<PageUp>":"\<C-N><C-K>"inoremap <expr> <C-U> pumvisible()?"\<C-E>":"\<C-U>"set completeopt=longest,menu"""""""""""""""""""""""""""""""""""""""""""""""""""""""""cscope setting""""""""""""""""""""""""""""""""""""""""""""""""""""""""if has("cscope") set csprg=/usr/bin/cscope set csto=1 set cst set nocsverb "add any database in current directory if filereadable("cscope.out") cs add cscope.out endif set csverbendifnmap <C-@>s : cs find s <C-R>=expand("<cword>")<CR><CR>nmap <C-@>g : cs find g <C-R>=expand("<cword>")<CR><CR>nmap <C-@>c : cs find c <C-R>=expand("<cword>")<CR><CR>nmap <C-@>t : cs find t <C-R>=expand("<cword>")<CR><CR>nmap <C-@>e : cs find e <C-R>=expand("<cword>")<CR><CR>nmap <C-@>f : cs find f <C-R>=expand("<cfile>")<CR><CR>nmap <C-@>i : cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>nmap <C-@>d : cs find d <C-R>=expand("<cword>")<CR><CR>"2013-03-21set incsearch"high light when searchset hlsearch set ignorecase"powerline{"set guifont=PowerlineSymbols\ for\ Powerline"set nocompatible"set t_Co=256"let g:Powerline_symbols='fancy'"}"help doc chineseset helplang=cn" --------configuration for neocomplcache-------------" Disable AutoComplPop.let g:acp_enableAtStartup = 0" Use neocomplcache.let g:neocomplcache_enable_at_startup = 1 " Use smartcase.let g:neocomplcache_enable_smart_case = 1" Use camel case completion.let g:neocomplcache_enable_camel_case_completion = 1" Use underbar completion.let g:neocomplcache_enable_underbar_completion = 1" Set minimum syntax keyword length.let g:neocomplcache_min_syntax_length = 1" set the max list in the popup menu. increase the speedlet g:neocomplcache_max_list=20" Define keyword.if !exists('g:neocomplcache_keyword_patterns') let g:neocomplcache_keyword_patterns = {}endiflet g:neocomplcache_keyword_patterns['default'] = '\h\w*'let g:neocomplcache_auto_completion_start_length=1" ignore letter caselet g:neocomplcache_enable_ignore_case=1" --------configuration for neocomplcache-------------"set terminal 256 color"set t_Co=256""minibufexpl settinglet g:miniBufExplForceSyntaxEnable=1let g:miniBufExplModSelTarget=1"statusline settingset laststatus=2 "2:总是显示状态栏 0:隐藏状态栏 let statusHead ="%-.50f\ %h%m%r" let statusBreakPoint ="%<" let statusSeparator ="|" let statusFileType ="%{((&ft\ ==\ \"help\"\ \|\|\ &ft\ ==\ \"\")?\"\":\"[\".&ft.\"]\")}" let statusFileFormat ="[%{(&ff\ ==\ \"unix\")?\"u\":\"d\"}]" let statusAscii ="\{%b:0x%B\}" let statusCwd ="%-.50{getcwd()}" let statusBody =statusFileType.statusFileFormat.statusSeparator.statusAscii.statusSeparator."\ ".statusBreakPoint.statusCwd let statusEncoding ="[%{(&fenc\ ==\ \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}]" let statusBlank ="%=" let statusKeymap ="%k" let statusRuler ="%-12.(%lL,%c%VC%)\ %P" let statusTime ="%{strftime(\"%Y/%m/%d\ -\ %H:%M\")}" let statusEnd=statusKeymap."\ ".statusEncoding.statusRuler."\ ".statusTime "" 最终状态栏的模式字符串 let statusString=statusHead.statusBody.statusBlank.statusEnd set statusline=%!statusString highlight StatusLine cterm=bold ctermfg=yellow ctermbg=black"状态栏颜色设置


inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
资源下载链接为: https://pan.quark.cn/s/d9ef5828b597 在本文中,我们将探讨如何通过 Vue.js 实现一个带有动画效果的“回到顶部”功能。Vue.js 是一款用于构建用户界面的流行 JavaScript 框架,其组件化和响应式设计让实现这种交互功能变得十分便捷。 首先,我们来分析 HTML 代码。在这个示例中,存在一个 ID 为 back-to-top 的 div 元素,其中包含两个 span 标签,分别显示“回到”和“顶部”文字。该 div 元素绑定了 Vue.js 的 @click 事件处理器 backToTop,用于处理点击事件,同时还绑定了 v-show 指令来控制按钮的显示与隐藏。v-cloak 指令的作用是在 Vue 实例渲染完成之前隐藏该元素,避免出现闪烁现象。 CSS 部分(backTop.css)主要负责样式设计。它首先清除了一些默认的边距和填充,对 html 和 body 进行了全屏布局,并设置了相对定位。.back-to-top 类则定义了“回到顶部”按钮的样式,包括其位置、圆角、阴影、填充以及悬停时背景颜色的变化。此外,与 v-cloak 相关的 CSS 确保在 Vue 实例加载过程中隐藏该元素。每个 .page 类代表一个页面,每个页面的高度设置为 400px,用于模拟多页面的滚动效果。 接下来是 JavaScript 部分(backTop.js)。在这里,我们创建了一个 Vue 实例。实例的 el 属性指定 Vue 将挂载到的 DOM 元素(#back-to-top)。data 对象中包含三个属性:backTopShow 用于控制按钮的显示状态;backTopAllow 用于防止用户快速连续点击;backSeconds 定义了回到顶部所需的时间;showPx 则规定了滚动多少像素后显示“回到顶部”按钮。 在 V
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值