vim_notes
This is an old revision of the document!
Table of Contents
How can I
vertical alignment of columns
:%!column -t
will convert
1.33570301776, 3.61194e-06, 7.24503e-06, -9.91572e-06, 1.25098e-05, 0.0102828 1.34538754675, 3.3689e-06, 9.86066e-06, -9.12075e-06, 1.18058e-05, 0.00334344 1.34808186291, -1.99011e-06, 6.53026e-06, -1.18909e-05, 9.52337e-06, 0.00158065
to
1.33570301776, 3.61194e-06, 7.24503e-06, -9.91572e-06, 1.25098e-05, 0.0102828 1.34538754675, 3.3689e-06, 9.86066e-06, -9.12075e-06, 1.18058e-05, 0.00334344 1.34808186291, -1.99011e-06, 6.53026e-06, -1.18909e-05, 9.52337e-06, 0.00158065
It also works on visual selection
:'<,'>!column -t
show line endings
change the encoding to utf-8
:set fileencoding=utf8 :w myfilename
Ref:- https://stackoverflow.com/questions/9310274/how-can-i-use-vim-to-convert-my-file-to-utf8
insert newline in search and replace
- %s/29/\r29/gc
will insert a new line before each occurrence of 29.
join lines with a character
- nmap J :s/\n/, /^M
vim_notes.1625252119.txt.gz · Last modified: 2021/07/02 18:55 by admin