新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:pythonvim模塊的函數(shù)接口
1、Vim.command(str)

創(chuàng)新互聯(lián)專注于惠安網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供惠安營銷型網(wǎng)站建設,惠安網(wǎng)站制作、惠安網(wǎng)頁設計、惠安網(wǎng)站官網(wǎng)定制、小程序開發(fā)服務,打造惠安網(wǎng)絡公司原創(chuàng)品牌,更為您提供惠安網(wǎng)站排名全網(wǎng)營銷落地服務。
執(zhí)行vim中的命令str(ex-mode),返回值為None,例如:
:py vim.command("%s/\s\+$//g")
:py vim.command("set shiftwidth=4")
:py vim.command("normal! dd")2、vim.eval(str)
求vim表達式str的值,返回結果類型為:
string: 如果vim表達式的值的類型是string或number
list:如果vim表達式的值的類型是一個vim list(:h list)
dictionary:如果vim表達式的值的類型是一個vim dictionary(:h dict)
:py sw = vim.eval("&shiftwidth")
:py print vim.eval("expand('%:p')")
:py print vim.eval("@a")以上就是python vim模塊函數(shù)接口的介紹,希望對大家有所幫助。更多Python學習指路:創(chuàng)新互聯(lián)python教程
本文教程操作環(huán)境:windows7系統(tǒng)、Python 3.9.1,DELL G3電腦。
當前標題:創(chuàng)新互聯(lián)Python教程:pythonvim模塊的函數(shù)接口
URL標題:http://m.5511xx.com/article/cdihegd.html


咨詢
建站咨詢
