博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Vim学习笔记
阅读量:7223 次
发布时间:2019-06-29

本文共 2754 字,大约阅读时间需要 9 分钟。

主要内容来自 vimtutor.

## vimtutorx d - del    - dd - del whole linei a - addA = $aw - to next word    - space 分割    - 连续标点看做一个单词, 包括汉字标点    - 汉字看做一个单词    - exclusivee - to end of word    - inclusiveu c-r - undo/redop - paste    - insert after cursor    - = a c-v/A c-v(whole line)y - copyr - replace one charR - replace modec = d&i    - ce = dei/a (a when reach end of line)    - caw = dwi/a (not to use cw)G - jump to line    - G - end of file    - gg - first line of file/ ? - search forward/backward    - n/N - next/prevc-o c-i - back/reback ---- % - go to {}()[] matched    - or go to next ]}):s - replace    - #,# / % range    - g - all    - c - ask:! - outside commandv - visual    - inclusiveo = A
O = kA
:set ic (ignore case) hls (hlsearch) is (incsearch):r file - o && append file :r file - o && append file :help
tab - 补全
jump among windows## Inserti I a A o O## Copy/Pastey yyp s-pv V
## Deletex d dd## File:o file## Multiple Windows:[n]sp file = vim -o files:[n]vs file = vim -O files ^ lines
h/j/k/l - move
+ - = < >
q## Multiple Tabs:tabe tabc tabo
## cmdset xx/noxx/invxxset list "show invisible characters"hex:%!xxd "show hex:%!xxd -r "convert backu "alternative:redir (([>] / >>) filename) / (@xx ([>] / >>)) "redirect to file/register:redir END "end:| "execute multiple commands; not pipe:expand(expr) "expand wildcards and keywords to string:let @"=expand("% [:p] ") "copy file name/path## register1. The unnamed register "" - `"` = ``; which means `p` = `""p` 2. 10 numbered registers "0 to "9 - `y` -> `0` - `d`/`c`/`s`/`x` -> '1' ~ '9' - only when deling whole line - otherwise, -> `-`3. The small delete register "-4. 26 named registers "a to "z or "A to "Z - when `p`: 'a' = 'A' - when `y` and so on: 'a': overwrite, 'A': append5. three read-only registers ":, "., "% - `.`: str in the insert mode - `%`: file name6. alternate buffer register "#7. the expression register "=8. The selection and drop registers "*, "+ and "~ 9. The black hole register "_10. Last search pattern register "/@xx : string in the registerc-r + register: paste## 宏录制q + register q[n + ]@ + register## Code foldingset fdm=manualzc zozC zOzf + sw. - foldzd zD - del## variablesdisplay: echo $xxx - environment variable echo &xxx - option value echo @xxx - register echo xxx - other variablesset + [no]optionlet var = value## encodingset encoding=xxxset fileencoding=xxx "change the encoding of fileset fileencodings=xxx,xxx:e ++enc=xxx "reload"about encoding : http://www.fmddlmyy.cn/text6.html## linebreakunix: \n dos: \r\n mac: \r:e ++ff=xx "dos/unix/mac:set ff=xx "convert

参考

  • Vim 的 help 文档
  • vimtutor

转载于:https://www.cnblogs.com/ubospica/p/10647896.html

你可能感兴趣的文章
PHP正则表达式及实例
查看>>
iOS - Swift NSPoint 位置
查看>>
2018(2017)美图java服务端笔试(回忆录)
查看>>
C++语言基础(10)-虚继承
查看>>
LINUX PID 1和SYSTEMD 专题
查看>>
linux CentOS6.5 yum安装mysql 5.6(转载&删改)
查看>>
Mongodb基础用法及查询操作[转载]
查看>>
马老师 生产环境mysql主从复制、架构优化方案
查看>>
ZXing工具类v1.0
查看>>
CXF Spring 实现WebService - 观千剑而后识器,操千曲而后晓声。 - 博客频道
查看>>
jquery--递增--年份的选择
查看>>
http://blog.csdn.net/huang_xw/article/details/7090173
查看>>
lua学习例子
查看>>
软件测试思想浅谈
查看>>
Linux入门基础 #8:Linux拓展权限
查看>>
Mac Pro 软件收藏
查看>>
斯内德将出任2020欧洲杯荷兰地区形象大使
查看>>
司法部:做好春节期间在押罪犯的离监探亲工作
查看>>
研究:印度气候变暖速度加剧 2040年或面临重灾
查看>>
中俄蒙三国六方签订白鹤研究与保护合作备忘录
查看>>