If I want to select particular text of line and delete lines, how can I do that in vi (give the simplest means)?
Move to the line you want to delete, either using the arrow keys or the j/k keys, and type
dd. You can then save and exit by typing
ZZ). A number can also be prefixed to
dd to delete multiple lines, e.g.
3dd deletes 3 lines.
For more Vi commands, take a look at this handy Vi cheat sheet.