Reputation: 31
Where can I find the source code for C-W operation (delete a word in insert mode) of GVim? I tried to search in the Vim repository http://vim.svn.sourceforge.net/viewvc/vim/vim7/ but I am not able to find it there. I need the implementation in vimscript and not c++.
Some help would be appreciated.
Upvotes: 1
Views: 621
Reputation: 141988
Ctrl-w is not specific to gVim.
The code is in edit()
in src/edit.c
.
Upvotes: 1
Reputation: 2560
Vim is written in C (not C++), and the code for the insert mode command is therefore written in C, not Vimscript. If you look at line 1074 in src/edit.c
you can see that the ins_bs()
function is used:
case Ctrl_W: /* delete word before the cursor */
did_backspace = ins_bs(c, BACKSPACE_WORD, &inserted_space);
auto_format(FALSE, TRUE);
break;
You should probably just explain what you really want to do, though…
Upvotes: 5
Reputation: 62588
It's bound to be in there. It's all in there. That being said, it is probably not coded in Vimscript but in ... (C++ ?). Vimscript is Vim's internal scripting language, not the language most of Vim is written in.
Upvotes: 0