成人无码视频,亚洲精品久久久久av无码,午夜精品久久久久久毛片,亚洲 中文字幕 日韩 无码

資訊專欄INFORMATION COLUMN

Vim session

nanfeiyan / 2444人閱讀

摘要:練級(jí)攻略的縱向編輯模式第一步修改將數(shù)列中第二段所有數(shù)字修改為將游標(biāo)定位第一個(gè)行的進(jìn)入縱向編輯模式移動(dòng)游標(biāo)到最后一行,可視塊覆蓋所要修改的列進(jìn)入修改模式輸入數(shù)字第二步前添加在所有行之前添加將游標(biāo)定位到第一行第一列進(jìn)入縱向編輯模式

vimtutor

intro

vim history (where I can use vim, vi, git diff)

how to install vim on atom/vs/chrome/terminal

edit a file with vi

vim/unix shortcut

vim tips

vim vs other editors

so fast and lite
can open big file
write code without mouse
pipe(compose) everything (command, text)

related

http://www.vim.org/
http://www.openvim.com/

VIM 練級(jí)攻略
http://coolshell.cn/articles/...

vim cheatsheet
https://kapeli.com/cheat_shee...…

vim notes
http://www.boydwang.com/2016/...

vimscript
http://learnvimscriptthehardw...

vim skills
http://vimcasts.org/

vim tips
http://vim.wikia.com/wiki/Bes...

meet surround
https://github.com/tpope/vim-...

Vim 的縱向編輯模式

Demo:
10.1.5.214
10.1.5.212
10.1.5.210
->
ping -c 4 10.5.5.214 >> result0
ping -c 4 10.5.5.212 >> result0
ping -c 4 10.5.5.210 >> result0

Solution:

第一步:修改

將 IP 數(shù)列中第二段所有數(shù)字“1” 修改為“5”,將游標(biāo)定位第一個(gè)行的“1”,ctrl-v 進(jìn)入縱向編輯模式,G 移動(dòng)游標(biāo)到最后一行,可視塊覆蓋所要修改的列,r 進(jìn)入修改模式, 輸入數(shù)字“5”

第二步:前添加

在所有行之前添加“ping – c 4 ”,將游標(biāo)定位到第一行第一列,ctrl-v 進(jìn)入縱向編輯模式,G 移動(dòng)游標(biāo)到最后一行第一列,可視塊覆蓋了第一列, I 進(jìn)入行首插入模式,輸入所要求字符“ping – c 4

第三步:后添加“>> result0”:

將游標(biāo)定位到第一行最后一列, ctrl-v 進(jìn)入縱向編輯模式, G 移動(dòng)游標(biāo)到最后一行最后一列,覆蓋了最后一列, A 進(jìn)入行尾插入模式輸入所要求字符“>> result0”
以上三個(gè)步驟有一個(gè)共同特點(diǎn),就是都縱向?yàn)榫庉嫹较?/strong>

vim class1 -basic motions and commands

vim class2 宏

g+g (go to beginning)

G(jump to the end of file)

shift+z+z (= Esc+ : +wq)

Esc+q+! (force quit)

Esc(ctrl + c)

Mode

Insert

Normal

Command(:w filename - save the file)

Visual

Insert -> Normal : ESC/Ctrl+[ Insert -> Command : (Insert -> Normal) -> : Command -> Normal : Enter
Pen to the page

(i=insert、a=append、r=replace)

i-Enter insert mode at cursor

I-Enter insert mode at first non-blank character

a-Enter insert mode after cursor

A-Enter insert mode at the end of the line

o-Enter insert mode on the next line

O-Enter insert mode on the previous line

s-Delete character under cursor and enter insert mode

S-Delete line and begin insert at beginning of same line

C-Delete from cursor to end of line and begin insert

Scanning the canvas

------k

h-----------L

------j
2j(move down two lines)
Basics

w - Forward to the beginning of next word(Example, cw-change word, diw-delete word)

W-Forward to the beginning of next WORD(after whiteSpace)

b-Backward to the next beginning of a word

B-Backward to the next beginning of a WORD

e-Forword to the next end of word

E-Forword to the next end of WORD

0/home-Move to the zeroth character of the line

$-Move to the last character of the line

^-Move to the first non-blank character of the line

H-光標(biāo)移到當(dāng)前屏幕最上方行的第一個(gè)字符

M-光標(biāo)移到當(dāng)前屏幕最中間行的第一個(gè)字符

L-光標(biāo)移到當(dāng)前屏幕最下方行的第一個(gè)字符

G-到此文件最后一行

nG-移動(dòng)到第n行

gg-相當(dāng)于1G, 即回到行首

塊操作(ctrl + v)

ctrl + v(開(kāi)啟塊操作)

hjkl移動(dòng)光標(biāo)

I— (插入—)

ESC鍵來(lái)使每一行生效

n+Enter - 光標(biāo)下移n行

[n]f - Forward until (nth)(o) (Inclusive)

[n]F - Backward until (nth)(o) (Inclusive)

[n]t - Forward until (nth)(o) (Exclusive)

[n]T - Backward until (nth)(o) (Exclusive)

Search:

/ search forward

? search backward

"*" 聚焦當(dāng)前cursor forword(bounded)

n-next result, forward

N-next result, backward

"#" 當(dāng)前cursor下的指令 backward(bounded)

:set ignorecase -- will search ignore case /c forward -- will case insensitive to find forward
Replace

:%s/foo/bar/g (在當(dāng)前文件查找foo替換成bar)

:s/foo/bar/g (在當(dāng)前行查找foo替換成bar)

:%s/foo/bar/gc

:%s//bar/gci/I (foo only whole words, ask for confirmation, case insensitive/sensitive)

n1,n2s/foo/bar/g(在n1行n2行查找foo替換成bar)

Copy/Paste

y-Yank. Example: 2yy(copy current two lines)

p-將已復(fù)制的粘貼到光標(biāo)所在下一行

P-將已復(fù)制的粘貼到光標(biāo)所在上一行

v-visual selection

Delete:

x/X 刪除光標(biāo)處字符, 光標(biāo)前的字符

dd(刪除所在行)

ndd(刪除光標(biāo)所在行以下n行)

d1G(刪除光標(biāo)所在行到第一行所有數(shù)據(jù))

dG(刪除光標(biāo)所在行到最后一行所有數(shù)據(jù))

d$(刪除光標(biāo)所在行到同行最后一個(gè)字符)

d0(刪除光標(biāo)所在行到同行第一個(gè)字符)

:1,8d(刪除1~8行) OR VggGd

Undo

u恢復(fù)前一次所做的刪除

ctrl+R (undo change)

.(重復(fù)上一個(gè)操作)

Scroll

ctrl+f(屏幕向上滾動(dòng)一頁(yè))

ctrl+b(屏幕向下滾動(dòng)一頁(yè))

ctrl+u(屏幕向下滾動(dòng)半頁(yè))

ctrl+d(屏幕向下滾動(dòng)半頁(yè))

ifb

i向兩側(cè)擴(kuò)張選擇能match的string,Example,(, {, [

f/t向左側(cè)擴(kuò)張選擇, cursor就在當(dāng)前character下/前

b向右側(cè)擴(kuò)展選擇 Example:yiw(delete word)

vim symmary |

動(dòng)詞 y p d
操作 i f b
選擇 ( ) sentence(.)
選擇 { } paragraphs(empty line)
選擇 [[ ]] section
format =
convenient

zz center window

"+ y copy to system clipboard

*(search word)

:reg (look history copy record)

% (go to last matched braket)

VS

ctrl+"-"(last cursor)

ctrl+y(undo change in vs)

System

cmd+ctrl+f (maximum screen)

vim tips

:g/^/m0: reverse all lines http://vim.wikia.com/wiki/Rev...
= (indent)
copy to system clipboard "+y
clibboard history (:reg) "number p

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://m.hztianpu.com/yun/25010.html

相關(guān)文章

  • Git全局忽略和Vim Session的結(jié)合

    摘要:全局忽略和有一個(gè)功能,可以用來(lái)保存現(xiàn)在打開(kāi)的文件窗口布局等設(shè)置,相當(dāng)于是很多編輯器的下次登陸自動(dòng)打開(kāi)上次未關(guān)閉的文件的功能。 Git的全局忽略功能 我知道這個(gè)功能也是通過(guò)Google來(lái)的,Stack Overflow上的一個(gè)回答給出了方案,地址是:http://stackoverflow.com/questions/7335420/global-git-ignore。我這里就當(dāng)做是翻...

    Allen 評(píng)論0 收藏0
  • 用Nginx+Redis實(shí)現(xiàn)session共享的均衡負(fù)載

    摘要:于是乎,,,搜到最多的詞就是均衡負(fù)載,搭配的一般都是?;仡^再看看,先換個(gè)瀏覽器首次訪問(wèn)再次訪問(wèn)帶上首次訪問(wèn)帶上再次次訪問(wèn)可見(jiàn)的確是達(dá)到了均衡負(fù)載同時(shí)共享的目的。 前言 大學(xué)三年多,也做個(gè)幾個(gè)網(wǎng)站和APP后端,老是被人問(wèn)到,如果用戶多了服務(wù)器會(huì)不會(huì)掛,總是很尷尬的回答:哈哈,我們的用戶還少,到了服務(wù)器撐不住的時(shí)候,估計(jì)都上市了吧。說(shuō)是這么說(shuō),但是對(duì)于有強(qiáng)迫癥的我,這個(gè)問(wèn)題一直回響在我腦海...

    ZHAO_ 評(píng)論0 收藏0
  • 用Nginx+Redis實(shí)現(xiàn)session共享的均衡負(fù)載

    摘要:于是乎,,,搜到最多的詞就是均衡負(fù)載,搭配的一般都是。回頭再看看,先換個(gè)瀏覽器首次訪問(wèn)再次訪問(wèn)帶上首次訪問(wèn)帶上再次次訪問(wèn)可見(jiàn)的確是達(dá)到了均衡負(fù)載同時(shí)共享的目的。 前言 大學(xué)三年多,也做個(gè)幾個(gè)網(wǎng)站和APP后端,老是被人問(wèn)到,如果用戶多了服務(wù)器會(huì)不會(huì)掛,總是很尷尬的回答:哈哈,我們的用戶還少,到了服務(wù)器撐不住的時(shí)候,估計(jì)都上市了吧。說(shuō)是這么說(shuō),但是對(duì)于有強(qiáng)迫癥的我,這個(gè)問(wèn)題一直回響在我腦海...

    jifei 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

閱讀需要支付1元查看
<