[20170617]vim 8.0插件安装.txt

[20170617]vim 8.0插件安装.txt

--//昨天晚上在自己的家里的机器上安装vim 8.0 for windows,定制化浪费许多时间,剩下就是插件的安装.
--//自己做一个记录:

1.ALign 插件:
http://www.vim.org/scripts/script.php?script_id=294
http://www.vim.org/scripts/download_script.php?src_id=19633

安装很简单:
vim Align.vba.gz
:so %
:q

--//主要SQLUtilities插件需要.

2.SQLUtilities 插件
--//SQL utilities - Formatting, generate - columns lists, procedures for databases
https://vim.sourceforge.net/scripts/script.php?script_id=492
https://vim.sourceforge.io/scripts/download_script.php?src_id=19113

install details
Put <SQLUtilities.vim> into your .vim/plugin or vimfiles/plugin directory.
Put <SQLUtilities.vim> into your .vim/autoload or vimfiles/autoload directory.
Put <SQLUtilities.txt> into your .vim/doc or vimfiles/doc directory, run :helptags $VIM/vimfiles/doc.

3.ClosePairs 插件
--//Auto closes pairs of characters
http://www.vim.org/scripts/script.php?script_id=2373
http://www.vim.org/scripts/download_script.php?src_id=9239

--//安装很简单,拷贝到plugin目录。

4.bccalc.vim : evaluate equations within vim
http://www.vim.org/scripts/script.php?script_id=219
http://www.vim.org/scripts/download_script.php?src_id=25077

--//我做了许多改动,参考链接:http://blog.itpub.net/267265/viewspace-2140602/
--//这个版本对于里面有()依旧存在问题.

5.increment.vim:
http://www.vim.org/scripts/script.php?script_id=842
http://www.vim.org/scripts/download_script.php?src_id=7541

--操作比原来复杂了,自己要再看看!注意doc文档在1.0版本中.执行如下才能生成.

:helptags d:\tools\vim\vim80\doc
:help Inc

6.gundo插件:
http://www.vim.org/scripts/script.php?script_id=3304
http://www.vim.org/scripts/download_script.php?src_id=24805

--//需要下载python 2.7 32位版本后一切ok!(注意版本的选择).
http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi

--//使用很简单:
:GundoToggle

--//具体操作就很简单了,减少记忆一些命令的问题:g- g+ :earlier :last等命令.

7.MRU插件:
http://www.vim.org/scripts/script.php?script_id=521
http://www.vim.org/scripts/download_script.php?src_id=22864

gvim可以从菜单访问
也可以通过:MRU命令打开。

技巧与问题:
--//可以使用/快速定位要修改的文件.按T可以在新的tab窗口打开文件。

8.word_complete.vim:
http://www.vim.org/scripts/script.php?script_id=73
http://www.vim.org/scripts/download_script.php?src_id=6504

To activate, choose "Word Completion" from the Tools menu, or type
  :call DoWordComplete()
To make it stop, choose "Tools/Stop Completion," or type
  :call EndWordComplete()
If you want to activate word completion for every buffer, add the line
  :autocmd BufEnter * call DoWordComplete()

--//我修改了,这样更加科学一点:
let g:WC_min_len = 3

--//如果你打开菜单,使用如下命令,我经常是关闭.再工具里面也可以调用 DoWordComplete(),EndWordComplete.
set guioptions+=m

--//大概就这些插件我经常使用.做一个记录.

9.visSum.vim
--//用来做总和的.
http://www.vim.org/scripts/script.php?script_id=1932

--//我自己现在很少用,我记忆里我修改许多,参看链接:
http://blog.itpub.net/267265/viewspace-777463/

--//链接贴的代码有问题,重新贴一次.

" vim:filetype=vim foldmethod=marker textwidth=78
" ==========================================================================
" File:         visSum.vim (global plugin)
" Last Changed: 2012-07-17
" Maintainer:   Erik Falor <ewfalor@gmail.com>
" Version:      1.0
" License:      Vim License
"
" A great big thanks to Christian Mauderer for providing a patch for
" floating-point support!
"
"                     ________                __        __
"                    /_  __/ /_  ____ _____  / /_______/ /
"                     / / / __ \/ __ `/ __ \/ //_/ ___/ /
"                    / / / / / / /_/ / / / / ,< (__  )_/
"                   /_/ /_/ /_/\__,_/_/ /_/_/|_/____(_)
"
" This plugin will work whether or not your Vim is compiled with support for
" floating-point numbers.  If your Vim doesn't has('float'), we'll just
" ignore whatever comes after the decimal point.
"
" Due to the way Vim parses floating-point numbers, the only valid separtator
" between the whole and fractional parts of the number is a period.  Vim
" won't accept a comma, even if that's your locale's preference.  This
" plugin follows that convention.
" ==========================================================================

" Exit quickly if the script has already been loaded
let s:this_version = '1.0'
if exists('g:loaded_visSum') && g:loaded_visSum == s:this_version
    finish
endif
let g:loaded_visSum = s:this_version

"Mappings {{{
" clean up existing key mappings upon re-loading of script
if hasmapto('<Plug>SumNum')
    nunmap \su
    vunmap \su
    nunmap <Plug>SumNum
    vunmap <Plug>SumNum
endif

" Key mappings
nmap <silent> <unique> <Leader>su <Plug>SumNum
vmap <silent> <unique> <Leader>su <Plug>SumNum

if has('float')
    " Call the floating-point version of the function
    nmap <silent> <unique> <script> <Plug>SumNum    :call <SID>SumNumbers_Float() <ESC>gv<ESC>o<ESC>"pp
    vmap <silent> <unique> <script> <Plug>SumNum    :call <SID>SumNumbers_Float() <ESC>gv<ESC>o<ESC>"pp
    command! -nargs=? -range -register VisSum call <SID>SumNumbers_Float("<reg>")
else
    " Call the integer version of the function
    nmap <silent> <unique> <script> <Plug>SumNum    :call <SID>SumNumbers_Int() <CR>
    vmap <silent> <unique> <script> <Plug>SumNum    :call <SID>SumNumbers_Int() <CR>
    command! -nargs=? -range -register VisSum call <SID>SumNumbers_Int("<reg>")
endif
"}}}

function! <SID>SumNumbers_Float(...) range  "{{{
    let l:sum = 0.0
    let l:cur = ""

    if visualmode() =~ '\cv'
        let y1      = line("'<")
        let y2      = line("'>")
        while y1 <= y2
            let l:cur = matchstr( getline(y1), '-\?\d\+\(\.\d\+\)\?' )
            if l:cur == ""
                let l:cur = "0"
            endif
            let l:sum += eval(l:cur)
            let y1 += 1
        endwhile
    elseif visualmode() == "\<c-v>"
        let y1      = line("'<")
        let y2      = line("'>")
        let x1        = col("'<") - 1
        let len        = col("'>") - x1 -1
        if len == 0
            let len = 1
        endif
        while y1 <= y2
            "let line = getline(y1)
            "let chunk = strpart(line, x1, len)
            let l:cur = matchstr( strpart(getline(y1), x1, len ), '-\?\d\+\(\.\d\+\)\?' )
            if l:cur == ""
                let l:cur = "0"
            endif
            let l:sum += eval(l:cur)
            let y1 += 1
        endwhile
    else
        echoerr "You must select some text in visual mode first"
        return
    endif

    "Drop the fractional amount if it's zero
    "TODO: When scientific notation is supported, this will need to be changed
    if abs(l:sum) == trunc(abs(l:sum))
        let l:sum = float2nr(l:sum)
    endif

    redraw
    "echo "sum = " l:sum
    "save the sum in the variable b:sum, and optionally
    "into the register specified by the user
    "let b:sum = l:sum
    "if a:0 == 1 && len(a:1) > 0
    "    execute "let @" . a:1 . " = printf('%g', b:sum)"
    "endif
    let @p = "sum = " . string(l:sum)
endfunction "}}}

function! <SID>SumNumbers_Int(...) range  "{{{
    let l:sum = 0
    let l:cur = 0

    if visualmode() =~ '\cv'
        let y1      = line("'<")
        let y2      = line("'>")
        while y1 <= y2
            let l:cur = matchstr( getline(y1), '-\{-}\d\+' )
            let l:sum += l:cur
            let y1 += 1
        endwhile
    elseif visualmode() == "\<c-v>"
        let y1      = line("'<")
        let y2      = line("'>")
        let x1        = col("'<") - 1
        let len        = col("'>") - x1
        while y1 <= y2
            let line = getline(y1)
            let chunk = strpart(line, x1, len)
            let l:cur = matchstr( strpart(getline(y1), x1, len ), '-\{-}\d\+' )
            let l:sum += l:cur
            let y1 += 1
        endwhile
    else
        echoerr "You must select some text in visual mode first"
        return
    endif
    redraw
    echo "sum = " l:sum
    "save the sum in the variable b:sum, and optionally
    "into the register specified by the user
    let b:sum = l:sum
    if a:0 == 1 && len(a:1) > 0
        execute "let @" . a:1 . " = b:sum"
    endif
endfunction "}}}

"Test Data "{{{
" <column width=\"24\"> The winter of '49</column>
" <column width=\"18\"> The Summer of '48</column>
" <column width=\"44\"/>123
" <column width=\"14\"/>123
"1.5                    123
"-2                      123.0
"3.1                   123.1
"-4.2                   123.2
"+5.9                    123.3
"-6.0
"7
"8
"8.2
"9.
"10.
"-11.
"+12.
"
"The pedant in me wants to make these numbers work as well;
"but if I've learned anything, it's that the perfect is the
"enemy of the good.
"Avogadro    6.0221415e23
"Planck      6.626068E-34 m^2 kg / s
"Borh Radius 5.2917721092e鈭?1 m
"}}}

时间: 2024-10-02 15:15:59

[20170617]vim 8.0插件安装.txt的相关文章

[20170616]vim 8.0的安装.txt

[20170616]vim 8.0的安装.txt --//晚上开始在自己的家里的机器上安装vim 8.0 for windows,事先做了备份,但是还是遇到许多问题,都是定制安装相关的问题,自己做 --//一个记录: --//里面的操作都是定制化的,可能不适合大家,我自己仅仅作为一个记录. 1.下载安装过程略. --//我仅仅把旧的安装做了一个备份.删除旧的安装,再安装8.0版本. 2.第一个问题就是右键无法选择vim的问题: --//编辑如下文件,导入注册表,注意自己gvim.exe的路径.这

[20170725]vim调用bccalc插件问题.txt

[20170725]vim调用bccalc插件问题.txt http://blog.itpub.net/267265/viewspace-2140886/ http://blog.itpub.net/267265/viewspace-2140823/ http://blog.itpub.net/267265/viewspace-2140602/ --//我个人很喜欢在vim调用bc做各种计算,使用插件bccale,参考前面的链接. --//今天在使用时遇到1个问题,做一个记录与分析: 1/300

[20170617]vim中使用bc计算器.txt

[20170617]vim中使用bc计算器.txt --//我以前也写一个脚本做行计算功能以及10,16进制的转换功能,简单一点不做复杂检测,如下: noremap  <Leader>cc Yp!!bc -lq<CR>kA = <ESC>J noremap  <Leader>ch YpIobase=16;<ESC>!!bc -lq<CR>kA = 0x<ESC>Jxguu noremap  <Leader>cd

【Linux基础】vim配置及插件安装管理

1 写在前面   Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用的IDE是何等的重要啊, 估计很多人就是卡在这个门槛上了, "工欲善其事, 必先利其器"嘛, 我想如果有一个很好用的IDE, 那些Linux牛人也会欢迎的. 这都是劳动人民的美好愿望罢了, 我今天教大家把gvim改装成一个简易IDE, 说它"简易"是界面上看起来&quo

[20170617]升级vim到8.0的问题.txt

[20170617]升级vim到8.0的问题.txt --//昨天升级家里的电脑到vim 8.0,遇到一个问题做一个记录: --//我定义的行计算器无法正常运行. noremap  <Leader>cc Yp!!bc -lq<CR>kA = <ESC>J noremap  <Leader>ch YpIobase=16;<ESC>!!bc -lq<CR>kA = 0x<ESC>Jxguu noremap  <Leade

[20131215]安装vim插件gundo.txt

[20131215]安装vim插件gundo.txt 今天想安装gundo.vim插件看看,我以前安装的vim 7.4版本,安装gundo插件需要python2.7版本. 我下载gvim7.4版本来自:http://www.vim.org/download.php#pc PC: MS-DOS and MS-Windows For modern MS-Windows systems (starting with XP) you can simply use the executable insta

[20170617]vim中调用sqlplus.txt

[20170617]vim中调用sqlplus.txt --//以前写过一篇emacs下调用sqlplus的文章,一直想学emacs,受限制自己掌握vim,对学习它没有兴趣,原链接如下: --//http://blog.itpub.net/267265/viewspace-1309032/ --//实际上vim也有插件连接数据库,我觉得不好用,一直没这样用. --//今天在整理vim相关设置时,发现我自己以前也定义一些方法,自己也拿出来分享: noremap  <Leader>q1 Yp!!s

vim 树形目录插件NERDTree安装

网上流传的那个nerdtree的安装方法并不是很实用,因为NERDTREE是依赖pathogen插件管理器的.如果没有安装pathogen的话,直接安装NERDTree是会报函数为声明之类的错误的 pathogen 我们首先来介绍这款用来管理插件的插件--pathogen. 下载地址 项目地址 https://github.com/tpope/vim-pathogen 官网 http://www.vim.org/scripts/script.php?script_id=2332 功能说明 一个插

MyEclipse10.0 android开发ADT插件安装方法

装了MyEclipse 10.0,想装个插件,却发现Help菜单下没有Install New Software-.最后发现,MyEclipse作了些修改,安装插件方法跟原版的Eclipse有些不同.点Help->MyEclipse Configuration Center,再点击Software选项卡,在左边的搜索插件输入框右边,有Add Site链接,在这添加插件安装地址.添加后,可以在下面的Personal Sites里看到,展开,双击要安装的项,右边的Pending Changes框内会有