打造适合自己的System

作者: csbde 分类: SoftWare 发布时间: 2008-10-14 12:02

2 软件设置

  • 2.1 下载将firefox。
  • 2.2 firefox AddonList
  • 2.2.1 Ietab
  • *2.2.2 vimperator
  • 2.2.3 firebug
  • *2.2.4 google toolbar(只用书签功能)
  • 2.2.5 Adblock Plus
  • 2.2.6 Autofile Forms
  • *2.2.7 User Agent Switcher
  • *2.2.8 Web Developer
  • 2.2 下载VIM,下载自己的VIM配置文件
    "  author: feelinglucky
    "  modify:  Simon|  "  for Redo is kept in insert mode
        iunmap |  "  for Select-All is kept in normal mode
        " Key mapping to switch windows quickly ( is already mapped)
        nnoremap  W
        inoremap  W
        " 针对 Windows 的配置
        if has("win32")
            set guifont=新宋体:h10:cGB2312
           " set guifontwide=YaHei Consolas Hybrid:h10
            "au GUIEnter * simalt ~x " 最大化窗口
             set lines=30
            set columns=85
        elseif has("unix")
            set guifont=
            set guifontwide=
        elseif has("mac") || has("macunix")
            set guifont=
            set guifontwide=
        endif
        colorscheme desert
        set guioptions=
        set guioptions+=r
        set cursorline
    else
        " English messages only
        "language messages en
        " set the default theme in no-GUI
        colorscheme default
        " Do not increase the windows width in taglist
        let Tlist_Inc_Winwidth=0
        " Set text-mode menu
        if has('wildmenu')
            set wildmenu
            set cpoptions-=<
            set wildcharm=
            nmap       :emenu 
            imap  :emenu 
        endif
        " Change encoding according to the current console code page
        if &termencoding != '' && &termencoding != &encoding
            let &encoding=&termencoding
            let &fileencodings='ucs-bom,utf-8,' . &encoding
        endif
    endif
    if has("autocmd")
        filetype plugin indent on
       " autocmd FileType xml,html,c,cs,java,perl,shell,bash,cpp,python,vim,php,ruby set number
        augroup vimrcEx
            au!
            autocmd FileType text setlocal textwidth=80
            autocmd BufReadPost *
                         if line("'"") > 0 && line("'"") <= line("$") |
                           exe "normal g`"" |
                         endif
        augroup END
        function! AutoClose()
            :inoremap ( ()i
            :inoremap " ""i
            :inoremap ' ''i
            :inoremap { {}i
            :inoremap [ []i
            :inoremap ) =ClosePair(')')
            :inoremap } =ClosePair('}')
            :inoremap ] =ClosePair(']')
        endf
        function! ClosePair(char)
            if getline('.')[col('.') - 1] == a:char
                return ""
            else
                return a:char
            endif
        endf
        "auto close for PHP and Javascript script
        au FileType php,c,cpp,h,python,javascript exe AutoClose()
    endif
    "Other Setting
    "语法高亮
    syntax on
    " key stock
    "绑定自动补全的快捷键;
    imap ; 
    "ca日记h
    map ca :Calendar
    "设定开关Taglist插件的快捷键为F4,可以在VIM的左侧栏列出函数列表等
    map  :Tlist
    "设置程序的编译运行和调试的快捷键F5,F6,Ctrl-F5
    map  :call CompileRun()
    map  :call Debug()
    map  :call Run()
    "设置代码格式化快捷键F3
    map  :s/^////
    map  :s/^////
    "设置tab操作的快捷键,绑定:tabnew到t,绑定:tabn, :tabp到n,
    "p
    map t :tabnew
    map n :tabn
    map p :tabp
    "使用e打开当前文件同目录中的文件
    if has("unix")
    map ,e :e =expand("%:p:h") . "/" 
    else
    map ,e :e =expand("%:p:h") . "" 
    endif
    "定义CompileRun函数,用来调用进行编译和运行
    func CompileRun()
    exec "w"
    "C程序
    if &filetype == 'c'
    if has("win32")
        exec "!del %<.exe"
    else
        exec "!rm %<.exe"
    endif
    exec "!gcc % -o %<.exe"
    if has("win32")
        exec "!%<.exe"
    else
        exec "!./%<.exe"
    endif
    else
    if    &filetype == 'cpp'
    if has("win32")
        exec "!del %<.exe"
    else
        exec "!rm %<.exe"
    endif
    exec "!g++ % -o %<.exe"
    if has("win32")
        exec "!%<.exe"
    else
        exec "!./%<.exe"
    endif
    endif
    endif
    endfunc
    "结束定义CompileRun
    "定义Run函数,用来调用进行编译和运行
    func Run()
    exec "w"
    "C程序
    "
    if has("win32")
        exec "!%<.exe"
    else
        exec "!./%<.exe"
    endif
    endfunc
    "结束定义Run
    "定义Debug函数,用来调试程序
    func Debug()
    exec "w"
    if has("win32")
        exec "!del %<.exe"
    else
        exec "!rm %<.exe"
    endif
    exec "!g++ % -g -o %<.exe"
    exec "!gdb %<.exe"
    endfunc
    "结束定义Debug
    
    2.3 下载TC,以及TC设置文件]]>

    如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

    发表评论

    电子邮件地址不会被公开。 必填项已用*标注