tags:

views:

70

answers:

2

In Eclipse, there is the nice feature of deleting the word until the next capital letter when you press Ctrl+Backspace. For example:

ThisIsSomeText

If you press Ctrl-Backspace, only "Text" will be deleted, where as in VS all the "ThisIsSomeText" will be deleted.

Is there anyway to implement the same in VIM?

If yes, is there similar method for Ctrl-Del also? That as, pressing Ctrl-Del at the beginning of the previous example will only delete "This", rather than all the "ThisIsSomeText".

+3  A: 

I don't think it's a native vim feature, but I think this script might help (note: I haven't actually used it myself): http://www.vim.org/scripts/script.php?script_id=1356&rating=life_changing

Update:

Another script: http://www.vim.org/scripts/script.php?script_id=1905

FrustratedWithFormsDesigner
+1  A: 

This might do what you want:

nnoremap <C-BS> d?[A-Z]

There may be some fiddliness with the last character in the word. Also, you didn't mention whether you wanted it for Normal mode or Insert mode.

Ned Batchelder