Vim 学习笔记之cvim hot key

文章介绍使用Vim插件c-support作为C/C++开发环境的辅助工具,通过快捷键实现函数插入、注释调整等功能,提高开发效率。详细列举了插件的多种操作命令及应用场景,帮助开发者快速上手并有效利用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

据说这货很吊的样子,就学习了下,确实很难上手,要记很多命令的说,不过功能确实强大,

我准备先把这货弄成C/C++的一个开发环境,所以选择了叫cvim的一个插件,这个插件的好处在于

可以用快捷键插入函数,用起来很爽

网上的快捷键参考的过时了,

所以去官方网站http://www.vim.org/scripts/script.php?script_id=213上下了一个来看看

先存在这,自己慢慢记下来

V IM -P LUGIN
c-support.vim
V ERSION 6.0
H OT KEYS
Key mappings for Vim with and without GUI.
Plugin: http://vim.sourceforge.net
(i) insert mode, (n) normal mode, (v) visual mode
\hm
\hp
[n]\cl
[n]\cj
\cs
[n]\c*
[n]\cc
[n]\co
\cfr
\cfu
\cme
\ccl
\cfdi
\cfdh
\ccs
\chs
\ckc
\csc
\cma
\cd
\ct
[n]\cx
Help
manual for word under cursor
(n,i)
help (c-support)
(n,i)
Comments
end-of-line comment
(n,v,i)
adjust end-of-line comment
(n,v,i)
set end-of-line comment column (n)
code ⇒ comment /* */
(n,v)
code ⇒ comment //
(n,v,o)
comment ⇒ code
(n,v,o)
frame comment
(n,i)
function comment
(n,i)
method description
(n,i)
class description
(n,i)
file description (implementation) (n,i)
file description (header)
(n,i)
C/C++–file sections (tab compl.) (n,i)
H–file sections
(tab compl.)
(n,i)
keyword comment (tab compl.) (n,i)
special comment
(tab compl.) (n,i)
template macros
(tab compl.)
(n,i)
date
(n,v,i)
date & time
(n,v,i)
exch. comment style: C ↔ C++ (n,v,i)
July 23, 2012
\sd
\sf
\sfo
\si
\sif
\sie
\sife
\se
\sw
\swh
\ss
\sc
\sb
\pih
\pg
\pl
\pd
\pu
\pif
\pie
\pid
\pin
\pind
\pe
\pli
\pp
\pw
\pi0
\pr0
Statements
(n,v,i)
(n,i)
(n,v,i)
(n,i)
(n,v,i)
(n,v,i)
(n,v,i)
(n,v,i)
(n,i)
(n,v,i)
(n,v,i)
(n,i)
(n,v,i)
Preprocessor
include Std. Lib. header
(n,i)
#include<...> (global)
(n,i)
#include"..." (local)
(n,i)
#define
(n,i)
#undef
(n,i)
#if #endif
(n,v,i)
#if #else #endif
(n,v,i)
#ifdef #else #endif
(n,v,i)
#ifndef #else #endif
(n,v,i)
#ifndef #def #endif
(n,v,i)
#error
(n,i)
#line
(n,i)
#pragma
(n,i)
#warning
(n,i)
#if 0 #endif
(n,v,i)
remove #if 0 #endif
(n,i)
do { } while
for
for { }
if
if { }
if else
if { } else { }
else { }
while
while { }
switch
case
{ }
c-support.vim
\nr
\nv
\nw
\ne
[n]\nf
[n]\np
[n]\nm
\ni
\nc
\ns
\ntl
\ntr
\njt
\if
\isf
\im
\ie
\is
\iu
\ipr
\isc
\ica
\ima
\ire
\isi
\ias
\ii
\io
\ifsc
\ifpr
[n]\i0
[n]\in
Snippet
(n,i)
(n,v,i)
(n,v,i)
(n,i)
(n,v,i)
(n,v,i)
pick up method prototype
(n,v,i)
insert prototype(s)
(n,i)
clear prototype(s)
(n,i)
show prototype(s)
(n,i)
edit local templates
(n,i)
reread the templates
(n,i)
insert jump tag
(n,i)
Idioms
function
(n,v,i)
static function
(n,v,i)
main()
(n,v,i)
enum + typedef
(n,v,i)
struct + typedef
(n,v,i)
union + typedef
(n,v,i)
printf()
(n,i)
scanf()
(n,i)
p=calloc()
(n,i)
p=malloc()
(n,i)
p=realloc()
(n,i)
sizeof()
(n,v,i)
assert()
(n,v,i)
open input file
(n,v,i)
open output file
(n,v,i)
fscanf
(n,i)
fprintf
(n,i)
for( x=0; x<n; x+=1 )
(n,v,i)
for( x=n-1; x>=0; x-=1 ) (n,v,i)
read code snippet
view code snippet
write code snippet
edit code snippet
pick up function prototype
Page 1 / 2\+ih
\+ich
\+om
\+fb
\+c
\+cn
\+tc
\+tcn
\+ec
\+tf
\+tr
\+ca
\+caa
\+ex
\+oif
\+oof
\+uns
\+un
\+unb
\+na
\+rt
\+ic
\+icn
\+im
\+ia
\+itc
\+itcn
\+itm
\+ita
\+ioi
\+ioo
C++
#include C++ Std. Lib. header (n,i)
#include C Std. Lib. header
(n,i)
output manipulators
(n,i)
ios flagbits
(n,i)
class
(n,i)
class (using new)
(n,i)
template class
(n,i)
template class (using new)
(n,i)
error class
(n,i)
template function
(n,i)
try . . . catch
(n,v,i)
catch
(n,v,i)
catch(...)
(n,v,i)
extern "C" { }
(n,v,i)
open input file
(n,v,i)
open output file
(n,v,i)
using namespace std;
(n,v,i)
using namespace xxx;
(n,v,i)
namespace xxx { }
(n,v,i)
namespace alias
(n,v,i)
RTTI
(n,v,i)
class implementation
(n,i)
class (using new) implementation (n,i)
method implementation
(n,i)
accessor implementation
(n,i)
template class implementation
(n,i)
template class (using new) impl. (n,i)
template method implementation (n,i)
template accessor implementation (n,i)
operator »
(n,i)
operator «
(n,i)
July 23, 2012
\rc
\rl
\rr
\ra
\rm
\rmc
\rcm
\rme
\rma
\rp
\rpa
\rcc
\rccs
\rk
\rka
\ri
[n]\rh
\rs
\rx
\ro
typing
/*
/*
/*<CR>
{<CR>
{<CR>
Run
save and compile
(n,i)
link
(n,i)
run
(n,i)
set comand line arguments
(n,i)
run make1
(n,i)
1
run make clean
(n,i)
choose a makefile 1
(n,i)
1
executable to run
(n,i)
cmd. line arg. for make1
(n,i)
run splint2
(n,i)
cmd. line arg. for splint
(n,i)
3
run cppcheck
(n,i)
severity for cppcheck
(n,i)
4
run CodeCheck
(n,i)
cmd. line arg. for CodeCheck (n,i)
run indent
(n,i)
hardcopy buffer
(n,i,v)
show plugin settings
(n,i)
set xterm size (n,i, only Unix & GUI)
change output destination
(n,i)
Additional Mappings5
expansion
/* */
(i)
/* (multiline) marked text */
(v)
/*
(i)
* |
*/
{
|
}
{
(multiline) marked text
}
c-support.vim
1
2
3
4
5
also working for filetype make
www.splint.org
cppcheck.sourceforge.net
CodeCheckT M is a product of Abraxas Software, Inc.
defined in ~/ftplugin/c.vim
(i)
(v)
Page 2 / 2

转载于:https://www.cnblogs.com/wejex/p/3270641.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值