Vim: Delete from cursor to next period -
is there shortcut in vim delete current cursor end of sentence?
cursor v half sentence. cursor here, delete period. not want delete part. ^ delete cursor here imagine cursor somewhere on text says my cursor here,. how can delete line way (and including) next .?
though there's no exact motion that, there several possibilities:
- the
)motion deletes remainder of sentence, includes whitespace after period. - if there no hard line break, use useful
fmotion (which works in current line, unless install plugin):f.useful if want keep period:t. - the general motion search via
/. need search literal period (\.), , include it, move end (/e) of it:/\./e<enter>.
all of these have appended d "delete" command, takes {motion}.
learn how commands , navigate built-in :help (here, :help motion.txt in particular); comprehensive , offers many tips. won't learn vim fast other editors, if commit continuous learning, it'll prove powerful , efficient editor.
Comments
Post a Comment