五月综合激情婷婷六月,日韩欧美国产一区不卡,他扒开我内裤强吻我下面视频 ,无套内射无矿码免费看黄,天天躁,日日躁,狠狠躁

新聞動態(tài)

學習Vim合并行的方法和技巧

發(fā)布日期:2022-04-23 12:31 | 文章來源:gibhub

剛接觸 Vim 會覺得它的學習曲線非常陡峭,要記住很多命令。所以這個系列的分享,不會
教你怎么配置它,而是教你怎么快速的使用它。

在開發(fā)時為了代碼美觀,經(jīng)常會把屬性用換行的方式顯示。

<el-dialog 
 title="批量編輯所屬組織" 
 :visible.sync="isShow" 
 :before-close="beforeClose"
 >
...
</el-dialog>

這種場景適用于標簽屬性少,代碼量也少的情況。

如果標簽突然增多,閱讀起來就會很不方便。比如下面這樣:

<template>
 <el-table
 :data="tableData"
 border
 style="width: 100%">
 <el-table-column
  fixed
  prop="date"
  label="日期"
  width="150">
 </el-table-column>
 <el-table-column
  prop="name"
  label="姓名"
  width="120">
 </el-table-column>
 <el-table-column
  prop="province"
  label="省份"
  width="120">
 </el-table-column>
 <el-table-column
  prop="city"
  label="市區(qū)"
  width="120">
 </el-table-column>
 <el-table-column
  prop="address"
  label="地址"
  width="300">
 </el-table-column>
 <el-table-column
  prop="zip"
  label="郵編"
  width="120">
 </el-table-column>
 <el-table-column
  fixed="right"
  label="操作"
  width="100">
  <template scope="scope">
  <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
  <el-button type="text" size="small">編輯</el-button>
  </template>
 </el-table-column>
 </el-table>
</template>

所以我們就需要把標簽和屬性變?yōu)橐恍小?/p>

<template>
 <el-table :data="tableData" border style="width: 100%">
 <el-table-column fixed prop="date" label="日期" width="150"> </el-table-column>
 <el-table-column prop="name" label="姓名" width="120"> </el-table-column>
 <el-table-column prop="province" label="省份" width="120"> </el-table-column> 
 <el-table-column prop="city" label="市區(qū)" width="120"> </el-table-column>
 <el-table-column prop="address" label="地址" width="300"> </el-table-column>
 <el-table-column prop="zip" label="郵編" width="120"> </el-table-column>
 <el-table-column fixed="right" label="操作" width="100">
  <template scope="scope">
  <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
  <el-button type="text" size="small">編輯</el-button>
  </template>
 </el-table-column>
 </el-table>
</template>

多數(shù) IDE 在代碼格式化時,都不會處理標簽的屬性。

我們只能通過光標換行,然后在按刪除的方式進行解決。

那么接下來介紹的這個技巧,叫 “合并行”,能讓我們快速的解決這個問題。

其實我們可以看出來,這個VIM合并行,就好比是代碼格式化一樣的,讓寫出的代碼更加容易讀,格式更加好看,如果大家還有其他問題,可以在下面留言區(qū)討論。

版權(quán)聲明:本站文章來源標注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。

實時開通

自選配置、實時開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部