반응형

# plugin tags

for Plug 'preservim/tagbar' " Tagbar about the code structure

sudo apt install exuberant-ctags   

 

for Plug 'neoclide/coc.nvim' " Autocompletion

in coc.nvim,

npm install

or

yarn install

 

coc-clangd for C/C++/Objective-C, use clangd
coc-clang-format-style-options coc.nvim extension, helps you write .clang-format more easily.
coc-cmake for cmake code completion
coc-copilot for GitHub Copilot completion

 

https://builtin.com/software-engineering-perspectives/neovim-configuration

https://github.com/NeuralNine/config-files/blob/master/init.vim

 

 

https://www.youtube.com/watch?v=stqUbv-5u2s&t=159s

https://github.com/nvim-lua/kickstart.nvim

반응형
반응형

Updates: November 6, 2024
Contents: Steps to install Node.js on Linux (Ubuntu)

 

Install Node.js

To ensure you have the latest stable version of Node.js, follow these steps:

  1. Update package lists:
    sudo apt update
  2. Install npm (Node Package Manager):
    sudo apt install npm
  3. Install 'n', the Node.js version manager:
    sudo npm install -g n
  4. Install the latest stable version of Node.js:
    sudo n lts
  5. Verify the installation:This command should display the version number of Node.js, confirming the installation.
    node -v

References

반응형
반응형

Updates: November 6, 2024
Contents: Steps to install GitHub Copilot in NVim or Vim (Linux, Ubuntu)

Prerequisites

To use GitHub Copilot in Neovim / Vim, you must have:

  • Neovim version 0.6 or above or Vim version 9.0.0185 or above
  • Node.js version 18 or above

For more information, see the Vim/Neovim documentation and the Node.js website.

Download GitHub Copilot Plugin

  • For NVim:
    git clone https://github.com/github/copilot.vim \
    ~/.config/nvim/pack/github/start/copilot.vim
  • For Vim:
    git clone https://github.com/github/copilot.vim \
    ~/.vim/pack/github/start/copilot.vim
 

Install GitHub Copilot

  1. Open NVim or Vim.
  2. Run the command:
    :Copilot setup
    :Copilot enable

    This command will download and install all the plugins listed in your configuration file.

GitHub Authentication

If GitHub authentication is required, follow these steps:

  1. Update package lists and install GitHub CLI:
    sudo apt update
    sudo apt install gh
  2. For Windows users using WSL, install wslu:
    sudo apt install wslu
  3. Authenticate with GitHub:
    BROWSER=/mnt/c/Windows/explorer.exe gh auth login
     This command sets the browser to Windows Explorer and initiates the GitHub authentication process.

References

 

사용자 환경에 GitHub Copilot 확장 설치 - GitHub Docs

선호하는 코딩 환경에서 Copilot을(를) 사용하려면 GitHub Copilot 확장을 설치해야 합니다.

docs.github.com

 

반응형
반응형

Updates: November 6, 2024
Contents: Steps to install vim-plug on Linux including Ubuntu

Set Up Environment for NVim Installation

Before installing plugins, ensure that NVim or Vim is installed on your system.

Install vim-plug

vim-plug is a minimalist Vim plugin manager that supports parallel installation of plugins.

  • For NVim:
    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'
  • For Vim:
    curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
        https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Download Result

 

Configure Plugins

After installing vim-plug, configure your plugins by editing the appropriate configuration file.

  • For NVim:
    nvim ~/.config/nvim/init.vim
  • For Vim:
    vim ~/.vimrc

In the configuration file, add the following lines to initialize vim-plug and specify your desired plugins:

" in init.nvim or .vimrc
call plug#begin('~/.vim/plugged')

" List your plugins here
Plug 'tpope/vim-sensible'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }

call plug#end()
 

Install Plugins

After saving the configuration file, install the specified plugins:

  1. Open NVim or Vim.
  2. Run the command:
    :PlugInstall

    This command will download and install all the plugins listed in your configuration file.

Managing Plugins with vim-plug

After installing vim-plug, you can manage your plugins using the following commands:

  • :PlugInstall to install the plugins
  • :PlugUpdate to install or update the plugins
  • :PlugDiff to review the changes from the last update
  • :PlugClean to remove plugins no longer in the list

In WSL or WSL2 on Windows, the plugged folder is located at ~/.local/share/nvim/plugged

 

References

 

GitHub - junegunn/vim-plug: :hibiscus: Minimalist Vim Plugin Manager

:hibiscus: Minimalist Vim Plugin Manager. Contribute to junegunn/vim-plug development by creating an account on GitHub.

github.com

 

반응형
반응형

Updates: November 5, 2024

Contents: Steps to install the latest version of NVim from source (v0.10.2)

 

Set Up Environment for NVim Installation

Update your package list and install necessary packages:

sudo apt update
sudo apt install curl python-dev python-pip python3-dev python3-pip -y

 

Install NVim:

mkdir -p /opt/nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage

 

Optional: Exposing nvim globally

# Optional: exposing nvim globally
mkdir -p /opt/nvim
mv nvim.appimage /opt/nvim/nvim

 

Add the following line to your shell config (~/.bashrc, ~/.zshrc, ...):

# And the following line to your shell config (~/.bashrc, ~/.zshrc, ...):
export PATH="$PATH:/opt/nvim/"

 

If the above method doesn't work (as it didn't in my case), try the following:

./nvim.appimage --appimage-extract
./squashfs-root/AppRun --version

 

Optional: Exposing nvim globally

# Optional: exposing nvim globally.
sudo mv squashfs-root /
sudo ln -s /squashfs-root/AppRun /usr/bin/nvim
nvim --version

 

 

References

 

GitHub - nvim-lua/kickstart.nvim: A launch point for your personal nvim configuration

A launch point for your personal nvim configuration - nvim-lua/kickstart.nvim

github.com

 

반응형
반응형

Updates: November 5, 2024
Contents: Steps to install the latest version of Vim from source (version 9.1)

This guide includes additional configurations considering future plugin setups. 

It assumes that Vim is already installed on your system.

 

Remove Existing Vim Installation
Before installing the latest version, remove any existing Vim installations:

sudo apt-get remove --purge vim vim-runtime vim-tiny vim-gtk vim-gtk3 vim-gnome vim-nox vim-common

 

Set Up Environment for Vim Installation

Update your package list and install necessary packages:

sudo apt update
sudo apt install git make clang libtool-bin libxt-dev libpython3-dev valgrind -y

 

Configure Vim Dependencies

Enable source repositories and install build dependencies:

(from https://mebadong.tistory.com/92)

sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update
sudo apt-get build-dep vim

 

Clone Vim Source Code

Download the Vim source code from the official repository:

git clone https://github.com/vim/vim.git
cd vim/src

 

Clean Previous Build Configurations

If you've previously built Vim, clean the build environment:

sudo make distclean

 

Configure Vim Build Options

Set up the build configuration with Python3 support:

./configure --with-features=huge \
            --enable-multibyte \
            --enable-python3interp=yes \
            --with-python3-config-dir=$(python3-config --configdir) \
            --prefix=/usr/local

 

Compile and Install Vim

Build and install Vim:

sudo make
sudo make install

 

Create Symbolic Link for 'vi' Command

To allow the 'vi' command to invoke Vim:

sudo ln -s /usr/local/bin/vim /usr/local/bin/vi

 

References

반응형
반응형

Updates: 2024. 11. 05

Contents: 최신 버전 Vim 설치 방법 && source에서 설치 (version 9.1)

 

본 글에서는 추후 설정할 Plugin 등을 고려한 몇 가지를 추가한 설정을 포함하고 있습니다.

또한, 일전에 vim이 설치되었을 것을 가정하고 작성하였습니다.

 

기존의 vim 설치 제거

sudo apt-get remove --purge vim vim-runtime vim-tiny vim-gtk vim-gtk3 vim-gnome vim-nox vim-common

 

vim 설치 환경 세팅

sudo apt update
sudo apt install git make clang libtool-bin libxt-dev libpython3-dev valgrind -y

 

vim 의존성 환경 설정 (from https://mebadong.tistory.com/92)

sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update
sudo apt-get build-dep vim

 

vim source 복사

git clone https://github.com/vim/vim.git
cd vim/src


vim 이전 설치 대비 설치 환경 초기화

sudo make distclean

 

vim 설치 config 설정 (python 환경 포함)

./configure --with-features=huge \
            --enable-multibyte \
            --enable-python3interp=yes \
            --with-python3-config-dir=$(python3-config --configdir) \
            --prefix=/usr/local


vim 설치

sudo make
sudo make install

 

필요한 경우, (vim 과 vi 모두 동작하게, 두 개의 명령어 연동)

sudo ln -s /usr/local/bin/vim /usr/local/bin/vi

 

References

반응형
반응형

Content: 윈도우 터미널 항상 관리자 권한으로 여는 방법

Updates: 2024.09.09

 

Windows에서 터미널을 항상 관리자 권한으로 실행하려면 다음 단계를 따르세요:

  1. 시작 메뉴에서 터미널 찾기:
    • 시작 메뉴를 열고 '터미널'을 검색합니다.
    • 검색 결과에서 '터미널' 아이콘을 마우스 오른쪽 버튼으로 클릭합니다.
  2. 설정 열기:
    • 파일 위치가 열리면, '터미널' 바로 가기를 다시 우클릭하고 '속성'을 선택합니다.
  3. 이 프로필을 관리자 권한으로 실행 설정:
    • '설정' 창에서 '기본값' / '이 프로필을 관리자 권한으로 실행' 옵션을 체크하고 '저장'을 누릅니다.

 

외부 공유하실 경우, 출처 반드시 밝혀주시기 바랍니다!

도움이 되셨다면 공감 꾸욱 부탁드립니다👍

반응형
반응형

 

Update : 24.07.07

Content : Vim 9.1 기준

 

https://julian-dev.tistory.com/1

 

Vim, gvim 설치 및 .vimrc 설정

Ubuntu를 설치하고 먼저 했던 일이 vim을 설치하고 vimrc를 설정했던 것 같다.학교 다닐 때는 거의 windows 환경에서 작업을 했기 때문에 vim editor를 쓸 일이 없었다.물론, windows용 vim editor도 있긴 하지

julian-dev.tistory.com

https://medium.com/sunhyoups-story/vim-%EC%97%90%EB%94%94%ED%84%B0-%EC%9D%B4%EC%81%98%EA%B2%8C-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0-5b6b8d546017

 

vim 에디터 이쁘게 사용하기

.vimrc 편집을 통해 vim 에디터의 모습을 바꿔봅시다

medium.com

https://m.blog.naver.com/onevibe12/222003789290

 

 

https://www.vim.org/download.php

 

download : vim online

Downloading Vim Vim is available for many different systems and there are several versions. This page will help you decide what to download. Most popular: Details and options for: Mirrors Alternative sites to download Vim files from. Sources Build Vim your

www.vim.org

 

 

다운로드 64비트 인스톨러

 

리눅스의 경우 

sudo apt-get install vim

 

 

해당 칸 체크해줘야 파워 쉘에서도 vi 사용 가능

C:\Windows에 .bat 파일이 있어야 명령어 사용 가능

copy C:\Windows \vim.bat C:\Windows\vi.bat 로 vi만 쳐도 vim이 실행되게 해보자

 

영어로 변경하고 싶다면 C:\Program Files (x86)\Vim\vim90\lang 폴더를 삭제하자.😑

삭제하지 않고 변경하려면 관리자 권한으로 vi C:\Program Files (x86)\Vim\_vimrc (혹은 Vim 설치 경로에서 _vimrc 파일을 찾아보자, 필자의 경우에는 D:\Vim\이다)

를 실행하고 첫 줄에 language messages enCopy to clipboard를 추가하자.
vi 실행후 :e $VIM/_vimrcCopy to clipboard로 열어도 된다.

 

https://meganad.github.io/2020-07-10-powershell-cmd-vi/#download-vim

 

Powershell, Cmd 에서 Vi 사용

요즘 윈도우즈 터미널을 써보고 있는데, 여러가지 면에서 꽤 편리하다. WSL도 그렇고 점점 개발을 위해 맥을 사야할 이유가 줄어드는것 같다. 그런데, Powershell이나 cmd 를 사용하다보면 가끔 vi 가

meganad.github.io

 

 

$ vi _vimrc

 

윈도우 클립보드를 이용한 복사 및 붙이기

"+$COMMAND

"+8yy 8개의 라인을 복사해서 윈도우 클립보드에 저장하라

ggVG"+y 전체 파일 내용 복사

"+p 윈도우 클립보드에 저장된 내용을 vim에서 붙여넣으라

 

https://m.blog.naver.com/weekamp/221863691208

 

gVim 에디터 - 윈도우용 Vim(빔) 설치 및 사용 방법

gVim 에디터 - 윈도우용 Vim(빔) 설치 및 사용 방법 윈도우용 Vim 에디터를 설치하고 사용하는 방법을 ...

blog.naver.com

 

 

# _vimrc 수정

" Syntax Highlighting
if has(“syntax”)
    syntax on
endif

 

" 은 _vimrc에서 주석을 의미한다

 

https://github.com/naver/d2codingfont

 

GitHub - naver/d2codingfont: D2 Coding 글꼴

D2 Coding 글꼴. Contribute to naver/d2codingfont development by creating an account on GitHub.

github.com

Ver 1.3.2 (2018.06.01 배포)

 

https://github.com/naver/d2codingfont/releases/download/VER1.3.2/D2Coding-Ver1.3.2-20180524.zip

 

~\Downloads\D2Coding-Ver1.3.2-20180524\D2CodingAll\D2Coding-Ver1.3.2-20180524-all.ttc

파일을 클릭하자

설치하면 끝!

 

 

반응형

+ Recent posts