VSCode

下载 Visual Studio Code

https://code.visualstudio.com

下载慢:将下载地址中的 az764295.vo.msecnd.net 替换为 vscode.cdn.azure.cn

 

也可以安装 VS Code Web 版本

# vscode 配置目录
mkdir -p /home/code-server/.config

docker run -d --name code-server -p 1517:8080 \
-v /home/code-server/.config:/home/coder/.config \
-v /home/code-server/project:/home/coder/project \
-u "$(id -u):$(id -g)" \
-e PASSWORD=123456 \
codercom/code-server:latest

# 进入容器
docker exec -it code-server /bin/bash

cat /proc/version
cat /etc/apt/sources.list
# 换源 https://developer.aliyun.com/mirror/debian
sudo sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
sudo sed -i 's/snapshot.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
sudo sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
# 开启 https 访问
sudo sed -i s@'cert: false'@'cert: true'@g /home/coder/.config/code-server/config.yaml

# 更新安装列表
apt-get update
# 升级软件
apt-get upgrade
# 安装 php,python,go,ruby,r,c/c++ 等语言所需环境
apt-get install software_name

 

Linux 上启动 VS Code 缺少 libXss.so.1 问题

# 查看
ldd code
# libXss.so.1 => not found

# 安装
yum install -y libXScrnSaver

 

便携化

Windows,Linux
在 Code.exe 所在目录创建 data 目录

macOS
在 Code.exe 所在目录创建 code-portable-data 目录

https://code.visualstudio.com/docs/editor/portable

 

中文设置

安装中文语言包
Ctrl + Shift + X 搜索 Chinese (Simplified) Language Pack for Visual Studio Code
@category:"language packs"

设置中文语言
Ctrl + Shift + P 搜索 configure display language
"locale": "zh-cn"

https://code.visualstudio.com/docs/getstarted/locales

 

常用设置项

关闭右栏略缩图
editor.minimap.enabled

ctrl 加鼠标滚轮缩放文本
editor.mouseWheelZoom

 

把  VS Code 添加到右键菜单

有三种情况,按照需要把下面内容保存为 reg 后缀的文件,双击添加到注册表

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="使用 VSCode 打开"
"Icon"="D:\\XueXi\\VSCode\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="D:\\XueXi\\VSCode\\Code.exe %1"


[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="使用此目录做为 VSCode Project"
"Icon"="D:\\XueXi\\VSCode\\Code.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="D:\\XueXi\\VSCode\\Code.exe %V"


[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode] 
@="使用当前目录做为 VSCode Project" 
"Icon"="D:\\XueXi\\VSCode\\Code.exe,0" 
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command] 
@="D:\\XueXi\\VSCode\\Code.exe --extensions-dir D:\\XueXi\\VSCode\\extensions %V"

 

快捷键

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

 

Notepad++ 右键菜单

https://github.com/notepad-plus-plus/notepad-plus-plus/releases -> npp.x.x.x.Installer.x64.exe\contextMenu\NppShell.dll

https://github.com/notepad-plus-plus/nppShell
https://github.com/notepad-plus-plus/notepad-plus-plus/tree/v8.3.3/PowerEditor/bin

@Echo Off
cd /d %~dp0
title Notepad++ 右键菜单添加/删除工具
 
SetLocal EnableDelayedExpansion
echo 1. 添加 Notepad++ 右键菜单
echo ------------------------
echo 2. 删除 Notepad++ 右键菜单
echo ------------------------
 
Set /p u=请输入数字并按 Enter 确定:
 
If "%u%"=="1" Goto regnpp
If "%u%"=="2" Goto unregnpp
 
:regnpp
regsvr32 /i NppShell64.dll
exit
 
:unregnpp
regsvr32 /u NppShell64.dll
exit
View Code

 

SCIntilla

https://www.scintilla.org/SciTEDownload.html & https://www.scintilla.org/SciTEDoc.html

https://github.com/moltenform/scite-files

https://github.com/moltenform/scite-files/blob/main/files/files/translations/locale.zh_s.properties & https://scintilla.sourceforge.io/SciTETranslation.html & https://www.scintilla.org/locale.zh_gb.properties

https://scintilla.sourceforge.io/SciTEExtras.html

SciTEGlobal.properties

# https://www.scintilla.org/SciTEDoc.html

# 编码
code.page=65001
output.code.page=936
#character.set=134

buffers=100
# 自动换行
#wrap=1
# 设置 Home/End 跳行首/尾,即使开了自动换行
wrap.aware.home.end.keys=1
# 光标在最后一行时可以向下滚动
end.at.last.line=0
# 记住
save.session=1
save.recent=1
save.position=1
save.find=1
session.bookmarks=1
session.folds=1
# 检查当前文件是否已被另一个进程更新
load.on.activate=1
# 当此值和 load.on.activate 都设置为 1 时,会询问是否要重新载入文档
are.you.sure.on.reload=1
# 重新载入文档时保留还原信息
reload.preserves.undo=1
# 在现有 SciTE 实例中打开文件,而不总是打开新实例
check.if.already.open=1
# 文件大小
file.size.large=100000000
file.size.no.styles=1000000
# 异步打开临时目录中的文件
temp.files.sync.load=1

# 将 output pane 放到右方
split.vertical=1
#output.initial.hide=1
# 自动换行
#output.wrap=1
# 在输出区显示执行命令所用时间
#time.commands=1
# 文件->打开,为当前编辑文件相同目录
open.dialog.in.file.directory=1
# 执行命令前清空输出区的内容
#clear.before.execute=1

# 标题栏显示文件路径
title.full.path=1
# 标题栏显示当前 buffer 序号
title.show.buffers=1
# 显示工具栏
toolbar.visible=1
# 显示文件 tab 栏
tabbar.visible=1
# 打开一篇文档时隐藏 tab 栏
tabbar.hide.one=1
# 文件 tab 栏启用多行模式,同时打开较多文件时比较方便
tabbar.multiline=1
# 显示行号
line.margin.visible=1
# 显示状态栏
statusbar.visible=1
statusbar.text.1=$(LineNumber):$(ColumnNumber) | $(SelLength):$(SelHeight) | $(BufferLength) $(NbOfLines) | $(EOLMode) | $(OverType) | $(FileNameExt): $(FileDate)-$(FileTime) $(FileAttr)
# 颜色字体
style.*.32=back:#C7EDCC,size:14
# 光标所在行背景色
caret.line.back=#FCFAED
# 选中文本的背景色
selection.back=#A6D2FF
# 高亮所有选中
#highlight.current.word=1

# 正则表达式中 ( 和 ) 不用 \ 转义
find.replace.regexp.posix=1
# 打开替换高级开关,可以只搜索某个样式
#find.replace.advanced=1
# 使用内置条带而不是对话框来执行查找或替换命令
find.use.strip=1
replace.use.strip=1
# 不自动关闭查找框
find.close.on.find=0
find.in.files.close.on.find=0

# 自动完成
autocompleteword.automatic=1
# 自动补全 XML 标签
xml.auto.close.tags=1
# 启用折叠
fold=1
# 折叠符号
fold.symbols=3

# 文本类型
menu.language=$(star *language.)
# 加载语法高亮配置
imports.exclude=locale
import *
View Code

 


https://code.visualstudio.com/docs

https://www.typescriptlang.org

posted @ 2019-04-13 23:50  江湖小小白  阅读(775)  评论(0编辑  收藏  举报