Vim Tips

1. remove the last character, if it presents in vim: The following command removes the "," from the end of the line if it presents.
:%s/,$//g
2. ^M in vim
to remove the ^M use %s/<ctrl+V>+ <Enter>//g
press ctrl+v key and then hit Enter key to input ^M in vim command mode.
3. Replace ^with #:
:set number
:10,12s/^/#

Finish replacing you may find that the first column of the file is still in highlight mode, to clear:

use :noh

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...