<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 67  文章 - 79  trackbacks - 0
    <2008年11月>
    2627282930311
    2345678
    9101112131415
    16171819202122
    23242526272829
    30123456

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    相冊

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    從網上東拼西湊的  沒多少是自己寫的  主要用來寫 python   使用pydiction來自動不全

    " ~/.vimrc
    "
     Last modified: Mon 27 Oct 2008 12:59:22 PM CST [zarra-desktop]
    "
     vim 配置文件

    " When started as "evim", evim.vim will already have done these settings.
    if v:progname =~"evim"
      finish
    endif

    " Use Vim settings, rather then Vi settings (much better!).
    "
     This must be first, because it changes other options as a side effect.
    set nocompatible
    set number
    " allow backspacing over everything in insert mode
    set backspace=indent,eol,start

    set autoindent          
    " always set autoindenting on
    if has("vms")
      set nobackup          
    " do not keep a backup file, use versions instead
    else
      set backup            
    " keep a backup file
      " 自動備份,我的備份大都在 ~/.backup 中,它好幾次都幫了我的大忙 :)
      set backupdir=./.backup,~/.backup,.,/tmp
    endif
    set history
    =50          " keep 50 lines of command line history
    set ruler               " show the cursor position all the time
    set showcmd             " display incomplete commands
    set incsearch           " do incremental searching

    " Don't use Ex mode, use Q for formatting
    "
     排版用的
    map Q gq

    " Switch syntax highlighting on, when the terminal has colors
    "
     Also switch on highlighting the last used search pattern.
    if &t_Co > 2 || has("gui_running")
      syntax on
      set hlsearch
    endif

    " 我常用的文本編碼 UTF-8 
    "
    set encoding=euc-cn
    set encoding=utf-8

    " DO NOT BELL!
    "
     不要用聲音煩我!
    set visualbell

    " 用鼠標畫文本表格用的
    :map <F1> :call ToggleSketch()<CR>

    "  樹形文本的展開、收縮
    if version >= 600
      
    " Reduce folding
      map <F2> zr
      map 
    <S-F2> zR
      
    " Increase folding
      map <F3> zm
      map 
    <S-F3> zM
    endif

    " Do not show help in file-explorer
    let explDetailedHelp=0
    " Open a file explorer
    "
     我喜歡用F4鍵打開一個文件瀏覽窗口
    if has("vertsplit")
      nnoremap 
    <silent> <F4> :call FileExplOpen()<CR>
      
    if !exists("*FileExplOpen")
        fun FileExplOpen()
          
    if @% == ""
            20vsp .
          
    else
            exe 
    "20vsp " . expand("%:p:h")
          endif
        endfun
      endif
    endif

    " 插入系統日期
    map <F5> :r !date +\%c<CR>

    " 函數,修改文件頭部的最后修改時間,就象這個文件的頭部一樣
    function! LastMod()
      
    if line("$"> 5
        let l 
    = 5
      
    else
        let l 
    = line("$")
      endif
      exe 
    "1," . l . "s/[Ll]ast [Mm]odified: .*/Last modified: " . strftime("%c") . " [" . hostname() . "]/e"
    endfunction

    " 手工更新文件最后修改時間
    map ,L :call LastMod()<CR>

    " Edit "Last modified"-comment in the top 5 lines of config files
    "
     自動更新文件修改時間
    if has("autocmd")
      augroup lastmod
        autocmd!
        autocmd BufWritePre,FileWritePre 
    * exec("normal ms")|call LastMod()|exec("normal `s")
      augroup END
    endif

    " Show TAB char and end space
    "
     我不喜歡 tab 和每行尾巴上的多余空格,如果文件里有,要記得告訴我
    set listchars=tab:>-,trail:~
    set list
    syntax match Trail 
    " +$"
    highlight 
    def link Trail Todo

    " python auto-complete code
    "
     Typing the following (in insert mode):
    "
       os.lis<Ctrl-n>
    "
     will expand to:
    "
       os.listdir(
    "
     Python 自動補全功能,只需要反覆按 Ctrl-N 就行了
    if has("autocmd")
      autocmd FileType python set complete
    +=k~/.vim/tools/pydiction/pydiction isk+=.,(
    endif

    " Only do this part when compiled with support for autocommands.
    if has("autocmd")

      
    " Enable file type detection.
      " Use the default filetype settings, so that mail gets 'tw' set to 72,
      " 'cindent' is on in C files, etc.
      " Also load indent files, to automatically do language-dependent indenting.
      " 自動檢測文件類型并加載相應的設置
      filetype plugin indent on

      
    " For all text files set 'textwidth' to 71 characters.
      autocmd FileType text setlocal textwidth=71

      
    " zope dtml
      autocmd BufNewFile,BufRead *.dtml setf dtml

      
    " python, not use <tab>
      " Python 文件的一般設置,比如不要 tab 等
      autocmd FileType python setlocal et | setlocal sta | setlocal sw=4
      
    " Python Unittest 的一些設置
      " 可以讓我們在編寫 Python 代碼及 unittest 測試時不需要離開 vim
      " 鍵入 :make 或者點擊 gvim 工具條上的 make 按鈕就自動執行測試用例
      autocmd FileType python compiler pyunit | setlocal makeprg=python\ %
      autocmd FileType python setlocal makeprg
    =python\ ./alltests.py
      autocmd BufNewFile,BufRead test
    *.py setlocal makeprg=python\ %
      
    " skeleton file
      " 自動使用新文件模板
      autocmd BufNewFile test*.py 0r ~/.vim/skeleton/test.py
      autocmd BufNewFile alltests.py 0r 
    ~/.vim/skeleton/alltests.py
      autocmd BufNewFile 
    *.py 0r ~/.vim/skeleton/skeleton.py

      
    " shell script
      autocmd fileType sh setlocal sw=4 | setlocal sta

      
    " RedHat spec file
      autocmd BufNewFile,BufReadPost *.spec setf spec

      
    " Brainfuck file
      autocmd BufNewFile,BufReadPost *.b setf brainfuck

      
    " When editing a file, always jump to the last known cursor position.
      " Don't do it when the position is invalid or when inside an event handler
      " (happens when dropping a file on gvim).
      " 記住上次的編輯位置
      autocmd BufReadPost *
        \ 
    if line("'\"") > 0 && line("'\"") <= line("$") |
        \   exe "normal g`\"" |
        \ endif

    endif 
    " has("autocmd")
     
    posted on 2008-11-06 16:00 zarra 閱讀(216) 評論(1)  編輯  收藏

    FeedBack:
    # re: Vimrc[未登錄] 2008-11-10 08:28 apple
    哎~~~還是一知半解~~~  回復  更多評論
      

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: a级毛片视频免费观看| 精品无码一区二区三区亚洲桃色| 亚洲中文无码av永久| 成全高清在线观看免费| 国产AV无码专区亚洲AV毛网站 | 美女被免费视频网站a| 四虎成人精品一区二区免费网站| 亚洲人成人77777在线播放| 青青青国产在线观看免费网站 | 亚洲欧洲国产综合AV无码久久| 国产成人无码免费看视频软件| 亚洲人成毛片线播放| 女人18毛片水真多免费播放| 亚洲jizzjizz少妇| 国产国拍亚洲精品福利| 插鸡网站在线播放免费观看| 国产∨亚洲V天堂无码久久久| 最近高清中文字幕免费| 国产亚洲sss在线播放| 国产片免费在线观看| 国产免费A∨在线播放| 亚洲精品线在线观看| AV免费网址在线观看| 国产成人无码精品久久久久免费| 婷婷亚洲综合五月天小说| 日韩欧毛片免费视频| 欧亚一级毛片免费看| 99久久亚洲精品无码毛片| 免费看AV毛片一区二区三区| 中文字幕不卡免费高清视频| 亚洲精品午夜久久久伊人| 国产99视频免费精品是看6| 中文字幕a∨在线乱码免费看| 亚洲一级毛片视频| 午夜国产大片免费观看| 久久国产精品免费网站| 亚洲国产成人精品无码区花野真一| 亚洲精品国产日韩无码AV永久免费网 | 久久久久亚洲AV无码专区桃色| 91成人免费观看| 男性gay黄免费网站|