Vim Shortcut

来源:互联网 发布:mac 上传图片失败 反复 编辑:程序博客网 时间:2024/06/14 04:47

Vim:
Ctrl+o:返回jumplist中的上一个位置
d$:删除至行尾
dG:删除至文档尾

Tab:
直接在编辑的时候输入:
vim -p 要编辑的文件名
多个标签间进行切换时向右切换gt,向左切换用gT
在编辑的时候想增加一个标签就可以:tabnew filename
:tabc       关闭当前的tab
:tabo       关闭所有其他的tab
:tabs       查看所有打开的tab
:tabp      前一个
:tabn      后一个

python-mode:

[[                Jump to previous class or function (normal, visual, operator modes)

]]                Jump to next class or function  (normal, visual, operator modes)
[M                Jump to previous class or method (normal, visual, operator modes)
]M                Jump to next class or method (normal, visual, operator modes)
aC                Select a class. Ex: vaC, daC, yaC, caC (normal, operator modes)
iC                Select inner class. Ex: viC, diC, yiC, ciC (normal, operator modes)
aM                Select a function or method. Ex: vaM, daM, yaM, caM (normal, operator modes)
iM                Select inner function or method. Ex: viM, diM, yiM, ciM (normal, operator modes)


<leader>+r: Run the code

<leader>+b: Set breakpoint

:PymodeLint -- Check code in current buffer
:PymodeLintToggle -- Toggle code checking
:PymodeLintAuto -- Fix PEP8 errors in current buffer automatically


jedi-vim:

<Ctrl+Space>:  Autocomplete

<Leader+g>: Go to assignment

<Leader+d>: Go to definition

<K>: Show pydoc documentation

<Leader+r>: Rename variables

<Leader+n>: Show usages of a name

:Pyimport--open module by name










0 0
原创粉丝点击