카테고리 없음

Configuration of Ubuntu 18.04 Environment

Youngil_Koh_Ph.D 2020. 6. 13. 14:12

I have,

Laptop : MSI-GL64-8RC

OS : Ubuntu 18.04 (x64)

RAM : 8GB + 16GB = 24GB

CPU : Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz

GPU : NVIDIA GeForce GTX 1050

 

1. Switching the default repo mirror into the Kakao repo mirror

$ sudo vi /etc/apt/sources.list

Type the following command on the poped-up file "sources.list"

:%s/kr.archive.ubuntu.com/mirror.kakao.com

The above command means that searching all "kr.archive.ubuntu.com" , and changing into "mirror.kakao.com".

After the saving changes using ":wq", apply the changes with the following command.

$ sudo apt-get update

Switching the repo mirror makes the update process faster.

 

 

2. Installation/Configuration of Vim editor

$ sudo apt-get update
$ sudo apt-get install vim
$ vi ~/.vimrc

The last command among the above makes a vi file, ".vimrc" in the home(~) directory.

In order to write the configuration information, change the mode into "Insertion" using  "i".

Copy/Paste the configuration information below using "Ctrl+Insert"/"Shift+Insert".

set number    " line 표시

set ai    " auto indent

set si " smart indent

set cindent    " c style indent

set shiftwidth=4    " 자동 공백 채움 시 4칸

set tabstop=4    " tab을 4칸 공백으로

set ignorecase    " 검색 시 대소문자 무시

set hlsearch    " 검색 시 하이라이트

set nocompatible    " 방향키로 이동 가능

set fileencodings=utf-8,euc-kr    " 파일 저장 인코딩 : utf-8, euc-kr

set fencs=ucs-bom,utf-8,euc-kr    " 한글 파일은 euc-kr, 유니코드는 유니코드

set bs=indent,eol,start    " backspace 사용가능

set ruler    " 상태 표시줄에 커서 위치 표시

set title    " 제목 표시

set showmatch    " 다른 코딩 프로그램처럼 매칭되는 괄호 보여줌

set wmnu    " tab 을 눌렀을 때 자동완성 가능한 목록

syntax on    " 문법 하이라이트 on

filetype indent on    " 파일 종류에 따른 구문 강조

set mouse=a    " 커서 이동을 마우스로 가능하도록

Saving the ".vimrc" file and getting out from it using ":wq".

 

And then, I can find the colored code in the Vim editor as below: