one vim, use everythere, 強(qiáng)推!
vim is editor? no, a program language. (vim 只是個(gè)編輯器? 不, 它是一門(mén)編程語(yǔ)言. 和上一句呼應(yīng))
- idea
- 高效使用pycharm
- https://laracasts.com/series/how-to-be-awesome-in-phpstorm
- https://laravist.com/series/phpstorm-the-best-php-ide-you-ever-met
編輯器: vscode
IDE: idea全家桶
其他: sublime/atom/eclipse 棄用, 已投入 vscode/idea全家桶
建議使用 IDE, 開(kāi)箱即用, 而編輯器需要配置很多
phpstorm
界面配置: view|distraction-free-mode + setting|code-style|hard-wrap=500(如果發(fā)現(xiàn)代碼沒(méi)有最左顯示) + add-leading-space-to-comment
設(shè)置忽略文件夾:setting -> editor -> file type -> 添加 node_modules;
單行注釋: comment at first column
配置 psr: editor -> code style -> php -> set from
phpstorm EAP(Early Access Program)
修改快捷鍵: 通過(guò) 名字搜索/快捷鍵 搜索; remove -> add
多個(gè)文件夾: setting->directories-> add content root
spelling: setting->spelling-> application-level
快速找到當(dāng)前文件的目錄路徑: project 試圖里的 目標(biāo)圖標(biāo)
配置對(duì)所有 phpstorm 生效: profile store in IDE/project; preference for current/new project
preference for new project: 設(shè)置后, 就不用每次打開(kāi)新項(xiàng)目都得設(shè)置一遍了
代碼折疊(比如 php 的 use): code folding
phpdoc: setting-inspections, 關(guān)閉 phdoc 提示, 為了寫(xiě) doc 而寫(xiě) doc -> 需要寫(xiě) doc 的地方
setting - add package as lib: 允許編輯/定位 vendor 下的文件
C-d:復(fù)制當(dāng)前行
C-y:刪除當(dāng)前行(更通用的還是 C-x,導(dǎo)出通用)
C-S-j: 合并行
C-A-l:reformat,在設(shè)置中配置了代碼風(fēng)格之后,就可以一鍵搞定代碼風(fēng)格了
A-鼠標(biāo)左鍵:多點(diǎn)編輯
ct-g:select next occu
A-insert: generate -> getter/setter 接口方法
A-6:查看 todo,項(xiàng)目周期特別長(zhǎng)的時(shí)候添加
C-f12:查看文件結(jié)構(gòu),類似 sublime 里面的查看函數(shù)
A+enter: show intention action
A + num: 切換不同界面(Esc)
ideaVim: 無(wú)法使用->keymap->cmd-a-v; 如果還無(wú)法使用->keymap->exit insert mode
aceJump
live and code template|incude: Created: {DATE} ${TIME}
touch bar + fn: keymap -> always use fn
基礎(chǔ)概念
file: new open setting
edit: cut copy(path reference) paste(history) find(replace everywhere) line(join duplicate)
view: tool-window(alt-1~9 todo terminal) definition/document/paramter/context/error/source recent(file change) compare bar/editor mode/fullscreen
navigate(相當(dāng)于 sublime 中的 goto): everywhere/file/class/symbol/line back(file edit-location) next(error emmet type change method) hierarchy(path file type method call)
code: generate(override implement) move(line statement) reformat analysis
refactor: rename(property method) move copy
run: run debug
tool: template(sublime 中 snippet) database
vcs: git(compare confilct) local
window
help
action: C-S-a(vscode C-S-p) A-enter(show intention action)
toolbox
管理 idea 全家桶的利器
使用 release 版而非 EAP
會(huì)導(dǎo)致 Alfred 無(wú)法切換程序 -> brew cask install phpstorm
pycharm
project interpreter -> local/ssh/docker
datagrip
foreign key
export/import: file/db
推薦理由: 強(qiáng)大的自動(dòng)補(bǔ)全
data source: cmd+;
執(zhí)行當(dāng)前語(yǔ)句: cmd+enter
explain raw: ctrl+enter
參數(shù)綁定: parameter where id=:id
關(guān)鍵詞大小寫(xiě): setting->code style->sql
vim
Treat vim as a programming language, and use it everywhere.
練習(xí)工具: vimtutor(vim自帶) https://vim-adventures.com/
vim-galore 從入門(mén)到精通 https://yq.aliyun.com/articles/625429
vimrc: https://github.com/amix/vimrc
光標(biāo)上次編輯點(diǎn): C-O/I
刪除引號(hào)內(nèi)的內(nèi)容: di' -> c/d/y/v i/a/t/f '/"
合并多行: 3J 3gJ
格式化代碼/自動(dòng)縮進(jìn): =
選中單詞: v e
大小寫(xiě): gu gU
undo: u/U; redo: c-r
replace: r R; change word: ce
匹配括號(hào): %
exec ext command: :!
set option: :set xxx; :set noxxx
help: :help xxx
completion: :e -> c-d -> tab
use systemClipboard: `set clipboard=unnamed'
vimtutor
C-v # visio mod -> select -> edit
:sp :vsp C-w # 窗口
:{range}left [margin] # 代碼對(duì)齊
vscode
vscode 中文文檔
極客時(shí)間 - 玩轉(zhuǎn)VS Code
code --diff <file1> <file2>
更輕便的開(kāi)發(fā)編輯器選擇, 免去很多包管理的煩惱
f8: error
zen mode
shell command
reveal 自動(dòng)打開(kāi)文件所在位置: 取消全局配置, 設(shè)置keymap
雙手不離鍵盤(pán): 光標(biāo)移動(dòng)(單詞/行/代碼塊/文檔) 文本選擇(多加一個(gè) shift) 自定義快捷鍵
多光標(biāo)(同時(shí)編輯多處 https://www.jb51.net/softjc/609020.html): A+鼠標(biāo) C-d 復(fù)選+A-S-i
shell
shell 快捷鍵: http://blog.chinaunix.net/uid-361890-id-342066.html
光標(biāo)移動(dòng)單詞: esc-b/f
光標(biāo)移動(dòng)行: C-a/e
光標(biāo)刪除行: C-u/k
刪除光標(biāo)前單詞: C-w