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:

  1. the ) motion deletes remainder of sentence, includes whitespace after period.
  2. if there no hard line break, use useful f motion (which works in current line, unless install plugin): f. useful if want keep period: t.
  3. 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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -