Sunday, 15 July 2012

Vim: Delete from cursor to next period -


Is there a shortcut in the VIM to remove from the current cursor at the end of the sentence?

  Cursor v This is half sentence that's my cursor here, but I want to remove this period. I do not want to delete this part. ^ Remove from the cursor here  my cursor is here, . How can I remove this line from (and in this) next .  

Although there are no exact proposals for this, there are several possibilities:

  1. ) The speed removes the remainder of the sentence, but it also includes the white space after the period.
  2. If there is no hard line break, you can use the useful f speed (which only works on the existing row, unless you install a plug-in Do not): F. This is also useful if you want to keep the period: t.
  3. The most common speed is / . You need to search for a lexical duration (. ), and to include it, at the end ( / e ) go to: /. ./ e & lt; Enter & gt; .

All of these have to be added to the D "Delete" command, in which {speed} . .

Look at the command and find the underlying : help (here, in : help motion.txt learn how to navigate)); It is comprehensive and offers many suggestions that you will not learn VIM as the fasting of other editors, but if you want to learn continuously, then it will prove to be a very powerful and efficient editor.


No comments:

Post a Comment