Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- datascience
- h5py
- cython
- vi
- cygwin
- polyglot
- mpi4py
- Windows
- portforwarding
- virtual
- Anaconda
- hyperref
- jupyter
- HFS+
- arXiver
- intel compiler
- Matplotlib
- GSL
- conda
- SSH
- HDF5
- vim
- MAC
- c++
- tab space
- openmp
- python
- gfortran
- LaTeX
- Visual Studio
Archives
- Today
- Total
Astro Coke
[Vi] change the file type between dos and unix 본문
source: https://kb.iu.edu/d/acux
There are two methods for converting the file type between dos and unix.
1) vim, use :set ff=unix to convert to Unix; use :set ff=dos to convert to Windows.
2) show ^M and remove it:
:e ++ff=unix
It force-set the fileformat as unix without actually changing the contents.
So vim reads it like a Unix file, sees the CR characters as extra and displays them as ^M.
In vi, you can remove carriage return ( ^M ) characters with the following command:
:1,$s/^M//g
To input the ^M character, press Ctrl-v, and then press Enter or return.
'Computer Setup' 카테고리의 다른 글
| [Git] Merge Conflicts (0) | 2019.07.17 |
|---|---|
| [Conda] Install packages through anaconda (0) | 2019.07.12 |
| [Conda] Remove the environment title in the prompt (0) | 2019.05.05 |
| [Cygwin] Installing CYGWIN + SSHD for remote access through SSH on windows (0) | 2019.05.04 |
| [Vi & Visual Studio] Compatibility of tab space between vi and visual studio (0) | 2019.04.25 |