/new-install-configs

config 파일을 새로운 Mac에 설치할 수 있도록 모아둠

Primary LanguageVim Script

new-install-configs

Download Single Directory

https://downgit.github.io/ 에 접속하여, directory의 url을 입력하여 zip파일로 다운로드 받습니다.

https://github.com/devstefancho/new-install-configs/tree/main/.config

image

다운로드 받은 zip 파일을 unzip 합니다.

unzip <zip-file>

(참고 : stackoverflow)

Download Single File

curl -o ~/<your_directory>/<file_name> --create-dirs \
  https://raw.githubusercontent.com/<username>/<repo-name>/<branch-name>/path/to/file

Download Dot files

Raw 파일의 url을 입력해야합니다.

copy .zshrc

curl -o ~/.zshrc --create-dirs \
  https://raw.githubusercontent.com/devstefancho/new-install-configs/main/.zshrc

copy .vimrc

curl -o ~/.vimrc --create-dirs \
  https://raw.githubusercontent.com/devstefancho/new-install-configs/main/.vimrc

copy .vimrc_vscode

curl -o ~/.vimrc_vscode --create-dirs \
  https://raw.githubusercontent.com/devstefancho/new-install-configs/main/.vimrc_vscode

copy .ideavimrc

curl -o ~/.ideavimrc --create-dirs \
  https://raw.githubusercontent.com/devstefancho/new-install-configs/main/.ideavimrc

vim-plug 설치하기

여기를 참고

vim에서 vim-plug 설치

# vim-plug 설치하기
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

# vimrc 다운로드
curl -o ~/.vimrca --create-dirs \
  https://raw.githubusercontent.com/devstefancho/new-install-configs/main/.vimrc

# vimrc에서 :PlugInstall
vim .vimrc

neovim에서 vim-plug 설치

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

.config/nvim을 다운로드 받았다면, 아래와 같이 PlugInstall을 합니다.

nvim .config/nvim/init.vim # init.vim에서 :PlugInstall

Explain Command

use \ for new line

curl option desc
O Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)
o Write output to instead of stdout.
L means that curl follows the redirection
--create-dirs You can use curl –create-dirs option in conjunction with the -o option to create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the -o option, nothing else. If the -o file name uses no dir or if the dirs it mentions already exist, no dir will be created.