[20170617]vim 8.0外掛安裝.txt
[20170617]vim 8.0外掛安裝.txt
--//昨天晚上在自己的家裡的機器上安裝vim 8.0 for windows,定製化浪費許多時間,剩下就是外掛的安裝.
--//自己做一個記錄:
1.ALign 外掛:
安裝很簡單:
vim Align.vba.gz
:so %
:q
--//主要SQLUtilities外掛需要.
2.SQLUtilities 外掛
--//SQL utilities - Formatting, generate - columns lists, procedures for databases
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
--//安裝很簡單,複製到plugin目錄。
4.bccalc.vim : evaluate equations within vim
--//我做了許多改動,參考連結:http://blog.itpub.net/267265/viewspace-2140602/
--//這個版本對於裡面有()依舊存在問題.
5.increment.vim:
--操作比原來複雜了,自己要再看看!注意doc文件在1.0版本中.執行如下才能生成.
:helptags d:\tools\vim\vim80\doc
:help Inc
6.gundo外掛:
--//需要下載python 2.7 32位版本後一切ok!(注意版本的選擇).
--//使用很簡單:
:GundoToggle
--//具體操作就很簡單了,減少記憶一些命令的問題:g- g+ :earlier :last等命令.
7.MRU外掛:
gvim可以從選單訪問
也可以透過:MRU命令開啟。
技巧與問題:
--//可以使用/快速定位要修改的檔案.按T可以在新的tab視窗開啟檔案。
8.word_complete.vim:
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://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
"}}}
--//昨天晚上在自己的家裡的機器上安裝vim 8.0 for windows,定製化浪費許多時間,剩下就是外掛的安裝.
--//自己做一個記錄:
1.ALign 外掛:
安裝很簡單:
vim Align.vba.gz
:so %
:q
--//主要SQLUtilities外掛需要.
2.SQLUtilities 外掛
--//SQL utilities - Formatting, generate - columns lists, procedures for databases
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
--//安裝很簡單,複製到plugin目錄。
4.bccalc.vim : evaluate equations within vim
--//我做了許多改動,參考連結:http://blog.itpub.net/267265/viewspace-2140602/
--//這個版本對於裡面有()依舊存在問題.
5.increment.vim:
--操作比原來複雜了,自己要再看看!注意doc文件在1.0版本中.執行如下才能生成.
:helptags d:\tools\vim\vim80\doc
:help Inc
6.gundo外掛:
--//需要下載python 2.7 32位版本後一切ok!(注意版本的選擇).
--//使用很簡單:
:GundoToggle
--//具體操作就很簡單了,減少記憶一些命令的問題:g- g+ :earlier :last等命令.
7.MRU外掛:
gvim可以從選單訪問
也可以透過:MRU命令開啟。
技巧與問題:
--//可以使用/快速定位要修改的檔案.按T可以在新的tab視窗開啟檔案。
8.word_complete.vim:
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://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
"}}}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2140889/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VIM 外掛安裝
- 如何安裝 Vim 外掛
- vim 外掛的安裝
- vim外掛的安裝
- vim外掛 NERDTree安裝使用
- [20170616]vim 8.0的安裝.txt
- vim實戰:外掛安裝(Vundle,NerdTree)
- Vim常用外掛安裝及配置方法
- [20131215]安裝vim外掛gundo.txt
- vim Vundle 外掛管理器的安裝
- vim外掛的安裝方式 -- vim註釋外掛和doxygen函式註釋生成外掛-ctrlp外掛-tabular等號對齊 外掛...函式
- [20170617]vim中使用bc計算器.txt
- [20170617]vim中呼叫sqlplus.txtSQL
- 如何使用 Ansible 配置 Vim並安裝外掛
- 安裝Vim自動補全外掛YouCompleteMe
- VIM安裝NERDTree外掛顯示工程目錄
- [20170612]vim bccalc外掛.txt
- 如何安裝最新的Vim8.2與Vim外掛管理器vim-plug
- ros環境搭建及vim-plug外掛安裝ROS
- VIM安裝TagList外掛顯示檔案函式列表函式
- [20170725]vim呼叫bccalc外掛問題.txt
- [20200424]vim visSum.vim合計外掛.txt
- [20220316]完善vim gdb.vim外掛.txt
- Vim 外掛管理
- VIM外掛AutoClose
- Redmine外掛的安裝與解除安裝,知識庫外掛安裝。
- Sublime Text3工具的安裝、破解、VIM功能vintage外掛教程
- vim外掛之Taglist
- 關於vim外掛
- 如何管理 Vim 外掛
- Vim外掛入門
- vim的外掛SuperTab
- eclipse vim外掛Eclipse
- retdec 外掛安裝
- Elasticsearch外掛安裝Elasticsearch
- [20190909]完善vim的bccacl外掛.txt
- [20210507]完善vim bccalc_win外掛.txt
- flash外掛怎麼安裝 電腦安裝flash外掛步驟