多版本语言环境

npm: nvm python: pyenv go: asdf asdf可用于多个语言的多版本环境管理

September 5, 2022 · 1 min · 李昌

vim配置

1. 安装插件系统 使用的是vim-plug curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 2. 安装插件 打开~/.vimrc, 在其中写入: " Specify a directory for plugins " - For Neovim: stdpath('data') . '/plugged' " - Avoid using standard Vim directory names like 'plugin' call plug#begin('~/.vim/plugged') " Make sure you use single quotes " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align Plug 'junegunn/vim-easy-align' " Any valid git URL is allowed Plug 'https://github.com/junegunn/vim-github-dashboard.git' " Multiple Plug commands can be written in a single line using | separators Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' } " Using a non-default branch Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } " Using a tagged release; wildcard allowed (requires git 1....

December 29, 2021 · 2 min · 李昌

WSL2-不输Mac的开发体验(一):WSL2的安装及基本配置

1. WSL的安装 1.1 升级Windows WSL需要高版本的windows,可使用微软官方的易升工具或直接从设置中升级,升级需要一定的时间。 1.2 安装WSL 使用管理员模式打开power shell, 使用如下命令开启WSL功能 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 重启你的机器 启用虚拟机功能 以管理员身份打开powershell,使用如下命令: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 重新启动电脑 下载Linux内核更新包 适用于 x64 计算机的 WSL2 Linux 内核更新包 运行你下载的更新包。 将WSL2设置为默认版本 以管理员身份打开powershell,使用如下命令: wsl --set-default-version 2 选择你要安装的发行版 这里我选择了Ubuntu18.04,获取后安装 启动安装的发行版即可 2. 使用WSL图形界面(可选) 设置环境变量 export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 export LIBGL_ALWAYS_INDIRECT=1 安装Xserver,这里选择的软件是vcxsrv, 可在sourceforge中下载安装。 安装完成后直接启动即可...

June 1, 2021 · 1 min · 李昌