본문 바로가기

Visual Studio Code

[VS Code Extensions] Setting Sync 사용법

VS Code 설치시 기기 간의 설정이 달라서 매번 설정을 맞춰줘야하는 번거로움을 없애봅시다.

Settings Sync 를 이용하면 설정, 키바인딩, 코드조각 폴더 및 익스텐션 정보 등을 동기화할 수 있습니다.

 

https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync

 

Settings Sync - Visual Studio Marketplace

Settings Sync Previously known as Visual Studio Code Settings Sync Support While being free and open source, if you find it useful, please consider supporting it by donating via PayPal or Open Collective. If you are using it in office as a team, please ask

marketplace.visualstudio.com

Install Settings Sync extension

marketplace에서 code-settings-sync 검색해 첫번째 항목을 install 합니다.

gitHub에 로그인해 연결합니다.


Get the Github Personal Access Token

이 익스텐션은 Github 계정의 Personal Access Token 이용해서 gist를 업로드하거나 다운로드 하여 설정을 동기화하는데 이 동작을 하기 위해서 별도의 토큰을 생성해야 합니다.

아래 메뉴로 진입해서 새로운 토큰을 생성합니다.
Settings > Developer settings > Personal Access Tokens > Generate New Token

 

우측 상단의 Generate New Token

토큰에 대한 용도를 gits로 설정합니다.

Generate token!

 

Get Access Token

나오는 token은 다른 기기에서 설정을 업로드할 때 필요하므로 어딘가에 저장해 놓는 것이 좋습니다.

Upload your settings

VS Code로 돌아갑니다.

 

upload

Shift + Alt + U를 누르면 현재 설정이 gist로 업로드 됩니다.

 

CODE SETTINGS SYNC UPLOAD SUMMARY
Version: 3.4.3
--------------------
GitHub Token: your token
GitHub Gist: your gist id
GitHub Gist Type: Secret

Restarting Visual Studio Code may be required to apply color and file icon theme.
--------------------
Files Uploaded:
  extensions.json > extensions.json
  settings.json > settings.json

Extensions Ignored:
  No extensions ignored.

Extensions Removed:
  No extensions removed.

Extensions Added:
  atom-keybindings v3.0.6
  auto-close-tag v0.5.6
  autoimport v1.5.3
  beautify v1.5.0
  bracket-pair-colorizer v1.0.61
  code-settings-sync v3.4.3
  es7-react-js-snippets v2.7.1
  highlight-matching-tag v0.9.6
  prettier-vscode v3.20.0
  sublime-keybindings v4.0.6
  vscode-language-pack-ko v1.44.0
--------------------
Done.

 

gits id는 다른 기기에서 다운로드 할 때 사용됩니다.

Download your settings to other devices

Shift + Alt + D를 누르고 팔레트 창에 위에서 획득한 Gist ID를 입력한 다음 Enter를 입력하면 해당 gist로 부터 업로드 된 설정을 다운로드합니다.

 

이렇게 하면 다른 기기에서도 자신이 설정한 환경을 동기화하여 별도의 설정 없이 동일한 환경으로 vscode를 사용할 수 있습니다.

 

참고 - ttps://medium.com/@kyo504/gist를-이용하여-기기-간-vscode-설정-동기화-c856082b7362
 

gist를 이용하여 기기 간 vscode 설정 동기화

React Native 앱을 개발하면서 vscode를 에디터를 메인으로 사용하고 있습니다. 가볍고 다양한 익스텐션을 이용해서 개인적인 상황에 맞게 설정할 수 있기 때문인데요. 설정들이 많이지면서 생기는 문제가 있었습니다. 바로, 회사와 개인 컴퓨터…

medium.com

+) 컴퓨터를 바꾸고 오랜만에 다시 사용하려니 깃에 로그인이 안 돼서 한참 헤맸다.

그럴 때는 Shift + Alt + D(설정 다운로드 단축키)를 누르면 깃에 로그인하라고 뜨니 그 때 하면 됨.