pluginlist

     1 set wildignorecase
     2 :map , oerror_log(print_r($array,1),3,"/tmp/1.txt");error_log("================",3,"/tmp/1.txt");<Esc>
     3 ":map . oecho "<pre>";print_r($array);echo "</pre>";<Esc>
     4
     5
     6 ""inoremap ' ''<ESC>i
     7 ""inoremap " ""<ESC>i
     8 ""inoremap ( ()<ESC>i
     9 ""inoremap [ []<ESC>i
    10 ""inoremap { {<CR>}<ESC>O
    11
    12 ""set cmdheight=2 
    13 "set lines=63 
    14 "columns=165 "设置窗口上下40行,左右能容下 155个字符
    15 "set laststatus=2
    16
    17
    18 "set cursorcolumn
    19 "highlight CursorColumn cterm=NONE ctermbg=black ctermfg=green guibg=NONE guifg=NONE
    20 "set cursorline
    21 "highlight CursorLine cterm=NONE ctermbg=darkgreen ctermfg=white guibg=NONE guifg=NONE
    22 "set foldmethod=indent
    23
    24
    25 set autoindent
    26 set tabstop=4
    27 set shiftwidth=4
    28 set softtabstop=4
    29 set expandtab
    30
    31
    32
    33 autocmd BufNewFile *.sh exec ":call SetTitle()"
    34 func SetTitle()
    35     if &filetype == "sh"
    36      call setline(1,"#!/bin/bash")
    37     endif
    38 endfunc
    39 set ruler
    40
    41 filetype plugin on
    42 filetype plugin indent on                                                     
    43 filetype on                                                                   
    44 let snippets_dir="~/.vim/snippets"
    45
    46 " 状态栏  
    47 "set laststatus=2      " 总是显示状态栏  
    48 "highlight StatusLine cterm=bold ctermfg=yellow ctermbg=blue  
    49 "" 获取当前路径,将$HOME转化为~  
    50 "function! CurDir()  
    51 "        let curdir = substitute(getcwd(), $HOME, "~", "g")  
    52 "        return curdir  
    53 "endfunction  
    54 "set statusline=[%n]\ %f%m%r%h\ \|\ \ pwd:\ %{CurDir()}\ \ \|%=\|\ %l,%c\ %p%%\ \|\ ascii=%b,hex=%b%{((&fenc==\"\")?\"\":\"\ \|\ \".&fenc)}\ \|\ %{$USER}\ @\ %{hostname()}\  
    55 "
    56 "set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%] "显示文件名:总行数,总的字符数  
    57 "set ruler "在编辑过程中,在右下角显示光标位置的状态行  
    58 "set noeol
    59
    60 "set fileformat=unix
    61 "autocmd BufWritePre *.php :!php %
    62 autocmd BufWritePost *.php :!cp %{,.bak}
    63 "autocmd BufWritePost *.php :!/tmp/test.sh %
    64 "autocmd BufWritePost *.php :!sz %
    65 autocmd FileType php nnoremap <buffer> <localleader>c I#<esc>
    66 "autocmd BufNewFile * :write
    67 iab xtime <c-r>=strftime("%Y-%m-%d %H:%M:%S")<cr>
    68 vmap <silent> ;c :s/^/\/\//<CR>:noh<CR>
    69 vmap <silent> ;u :s/\/\///<CR>:noh<CR>
    70 nmap ;s :%s/\<<C-R>=expand("<cword>")<CR>\>/
    71 nmap ;g :vimgrep <C-R>=expand("<cword>")<CR>
    72 map <silent>  \d a<C-R>=strftime("%Y/%m/%d %A")<CR>  
    73 map <silent>  \t a<C-R>=strftime("%Y/%m/%d %H:%M:%S")<CR>
    74 nnoremap <Leader>f :CtrlPFunky<Cr>
    75 " narrow the list down with a word under cursor
    76 nnoremap <Leader>fU :execute 'CtrlPFunky ' . expand('<cword>')<Cr>
    77 set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
    78 "set laststatus=2
    79 "set t_Co=256
    80
    81
    82 "-----------------------美化标签栏-----------------------
    83 "定义颜色
    84 "hi SelectTabLine term=Bold cterm=Bold gui=Bold ctermbg=red
    85 "hi SelectPageNum cterm=None ctermfg=Red ctermbg=None
    86 "hi SelectWindowsNum cterm=None ctermfg=DarkCyan ctermbg=None
    87 "
    88 "hi NormalTabLine cterm=Underline ctermfg=Black ctermbg=LightGray
    89 "hi NormalPageNum cterm=Underline ctermfg=DarkRed ctermbg=LightGray
    90 "hi NormalWindowsNum cterm=Underline ctermfg=DarkMagenta ctermbg=LightGray
    91 "
    92 "function! MyTabLabel(n, select)
    93 "    let label = ''
    94 "    let buflist = tabpagebuflist(a:n)
    95 "    for bufnr in buflist
    96 "        if getbufvar(bufnr, "&modified")
    97 "            let label = '+' 
    98 "            break
    99 "        endif
   100 "    endfor
   101 "
   102 "    let winnr = tabpagewinnr(a:n)
   103 "    let name = bufname(buflist[winnr - 1]) 
   104 "    if name == ''
   105 "        "为没有名字的文档设置个名字
   106 "        if &buftype == 'quickfix'
   107 "            let name = '[Quickfix List]'
   108 "        else
   109 "            let name = '[No Name]'
   110 "        endif
   111 "    else
   112 "        "只取文件名
   113 "        let name = fnamemodify(name, ':t')
   114 "    endif
   115 "
   116 "    let label .= name
   117 "    return label
   118 "endfunction
   119 "
   120 "function! MyTabLine()
   121 "    let s = ''
   122 "    for i in range(tabpagenr('$'))
   123 "        " 选择高亮
   124 "        let hlTab = ''
   125 "        let select = 0 
   126 "        if i + 1 == tabpagenr()
   127 "            let hlTab = '%#SelectTabLine#'
   128 "            " 设置标签页号 (用于鼠标点击)
   129 "            let s .= hlTab . "[%#SelectPageNum#%T" . (i + 1) . hlTab
   130 "            let select = 1
   131 "        else
   132 "            let hlTab = '%#NormalTabLine#'
   133 "            " 设置标签页号 (用于鼠标点击)
   134 "            let s .= hlTab . "[%#NormalPageNum#%T" . (i + 1) . hlTab
   135 "        endif
   136 "
   137 "        " MyTabLabel() 提供标签
   138 "        let s .= ' %<%{MyTabLabel(' . (i + 1) . ', ' . select . ')} '
   139 "
   140 "        "追加窗口数量
   141 "        let wincount = tabpagewinnr(i + 1, '$')
   142 "        if wincount > 1
   143 "            if select == 1
   144 "                let s .= "%#SelectWindowsNum#" . wincount
   145 "            else
   146 "                let s .= "%#NormalWindowsNum#" . wincount
   147 "            endif
   148 "        endif
   149 "        let s .= hlTab . "]"
   150 "    endfor
   151 "
   152 "    " 最后一个标签页之后用 TabLineFill 填充并复位标签页号
   153 "    let s .= '%#TabLineFill#%T'
   154 "
   155 "    " 右对齐用于关闭当前标签页的标签
   156 "    if tabpagenr('$') > 1
   157 "        let s .= '%=%#TabLine#%999XX'
   158 "    endif
   159 "    return s
   160 "endfunction
   161 "set tabline=%!MyTabLine()
   162 set hlsearch

   163 "set paste

let MRU_File = '/tmp/mru.txt' 
let MRU_Max_Entries = 10
let MRU_Max_Submenu_Entries = 15 
"let MRU_Filename_Format={'formatter':'v:val', 'parser':'.*'} 

   164 let MRU_Auto_Close = 1
   165 let MRU_Max_Menu_Entries = 20
   166 "let MRU_Use_Current_Window = 1
   167 " 按;h 打开历史记录
   168 nmap ;f :MRU<cr>    
   169 nmap ;v :FS<cr>    
   170 map <F10> :NERDTreeToggle<CR>
   171 autocmd VimEnter * NERDTree
   172 autocmd VimEnter * | wincmd w
   173 "let NERDTreeMapOpenInTab='<ENTER>'
   174 let g:nerdtree_tabs_open_on_console_startup=1
   175 let g:NERDTreeWinSize=31
   176 nnoremap <leader>w <c-w>
   177 nnoremap ;w <c-w>
   178 syntax enable
   179 :colorscheme default
   180 let g:bookmark_sign = '¶'
   181 let g:bookmark_annotation_sign = '§'
   182 let g:bookmark_auto_close = 1
   183 let g:bookmark_highlight_lines = 1
   184 let g:bookmark_center = 1
   185 highlight link BookmarkLine SpellBad
   186 highlight link BookmarkAnnotationLine SpellBad
   187 highlight BookmarkSign ctermbg=NONE ctermfg=160
   188 highlight BookmarkLine ctermbg=194 ctermfg=NONE
   189 let g:bookmark_sign = '♥'
   190 let g:bookmark_highlight_lines = 1
   191 let g:bookmark_auto_save = 1
   192 "highlight VarHl  ctermbg=darkred ctermfg=darkred guifg=#000000 guibg=#000000 ctermfg=LightRed gui=Underline
   193 "highlight Comment ctermbg=DarkGray
   194 "highlight Constant ctermbg=Blue
   195 "highlight Normal ctermbg=Black
   196 "highlight NonText ctermbg=Black
   197 "highlight Special ctermbg=DarkMagenta
   198 highlight Identifier guifg=red
   199 :map <C-X> <ESC>:x<CR>
   200 cnoreabbrev W w
   201 cnoreabbrev Q q
   202 cnoreabbrev Wq wq
   203 "colorscheme desert     "设置配色方案
   204 syntax on         "语法高亮
   205 syntax enable        set nobackup        "不生成备份文件
   206 set showmatch        "设置匹配模式
   207 set smartindent        "设置只能对齐
   208 set ai!            "设置自动缩进
   209 set fileencodings=utf-8,gbk
   210 set ambiwidth=double    "设置中文支持
   211 set guifont=consolas:h12 "设置字体及大小
   212 :command WQ wq
   213 map <C-D> :!sz %<CR>

    A+
发布日期:2019年08月13日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: