Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
VSVimの間合いですよ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
anozon
November 22, 2021
Programming
0
100
VSVimの間合いですよ
VSCode Vim の縦移動を強化する VSCode 拡張を開発した話
anozon
November 22, 2021
Tweet
Share
More Decks by anozon
See All by anozon
PWAを活用している_ガジェットアプリの話.pdf
anozon
0
23
埼玉県の描き方.pdf
anozon
0
34
Other Decks in Programming
See All in Programming
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Package Management Learnings from Homebrew
mikemcquaid
0
220
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
290
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
CSC307 Lecture 06
javiergs
PRO
0
690
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
710
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
dchart: charts from deck markup
ajstarks
3
990
組織で育むオブザーバビリティ
ryota_hnk
0
180
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
970
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
720
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
Six Lessons from altMBA
skipperchong
29
4.1k
Crafting Experiences
bethany
1
49
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Between Models and Reality
mayunak
1
190
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Transcript
VSVimの間合いですよ vscode-maai-cursor あのぞん (@anozon,(/elzup))
About me あのぞん (@anozon) elzup · GitHub 株式会社プランクユニッツ PlanckUnits VSCode(5年)
Vim(8年) React,TypeScript .vimrc 1300行
今回の話 VSCode 拡張開発に入門して コーディングを快適にした VSVimの間合いですよ • Vim の間合いはすごい ◦ 5Jump
Keymap の提唱 • VSCode 拡張作ってみた! ◦ 5Jump Keymap の強化
Vim の間合いはすごい
Vim とは Vim の間合いはすごい • Vimとは ◦ テキストエディタ ◦ モードを切り替えながらテキストを編集する
◦ ↑↓←→ が jklm • VSCode の Vim 拡張もある ◦ VSCodeVim ◦ vscode-neovim
Vim は高速で任意の場所へ移動できる 水平移動 Vim の間合いはすごい
垂直移動 Vim の間合いはすごい
弱点はどこでしょう? Vim の間合いはすごい
Vimの弱点はここです Vim の間合いはすごい
前後5行目あたりへ高速移動したい → 5Jump keybind を提唱します Vim の間合いはすごい 5Jump keybind とは
“5行上へ移動をショートカットキーに登録すること” nnoremap <C-j> 5j nnoremap <C-k> 5k vnoremap <C-j> 5j vnoremap <C-k> 5k
5Jump keybind により 前後7行へ3ストローク以下で移動できる Vim の間合いはすごい -7 `<C-k>` kk -6
`<C-k>` k -5 `<C-k>` -4 `<C-k>` j -3 kkk -2 kk -1 k 0 `<curren>` +1 j +2 jj +3 jjj +4 `<C-j>` k +5 `<C-j>` +6 `<C-j>` j +7 `<C-j>` jj
5Jump keybind の問題点 Vim の間合いはすごい どこに移動するかが大まかにしかわからない - 行数は数えたくない - 飛んでから考えたくない
→ 目印が欲しい
VSCode 拡張作ってみた!
成果物 GitHub elzup/vscode-maai-cursor MarketPlace anozon.maai-cursor VSCode 拡張作ってみた!
None
簡単な作成の流れ VSCode 拡張作ってみた! 1. npx yo code (with-typescript) 2. コーディング
3. npx vsce package 4. (マーケットプレイスアカウント作成) 5. npx vsce publish
初めて触った学び VSCode 拡張作ってみた! • package.json で Config を定義する ◦ マーケットプレイスMETA情報だけでなく
◦ 定義する Config Param や Command ◦ 使う activationEvents のタイプなど • Range ◦ x,y は line, charactor • yo code で全部定義されてて快適 ◦ debug, publish
このプラグインにおける要点 VSCode 拡張作ってみた! vscode.window.onDidChangeTextEditorSelection でカーソル移動イベントを取る activeEditor.selection.anchor でカーソル位置を取る → Decorator 当てたい位置を計算して装飾
50行程度の簡単なロジック
開発で参考にした部分 VSCode 拡張作ってみた! 同じ Decorator タイプの普段お世話になってる plugin • Indent Rainbow
• Bracket Colorlizer microsoft/vscode-extension-samplesに サンプルパターンが豊富 • Decorator 2桁の数字と3桁以上の数字の Style を変える (わかりやすい)
オプションの追加 VSCode 拡張作ってみた! • その行の文字全部にハイライトするモード • 5行区切りで全部ハイライトするモード • 5行以外の指定
躓いた点 VSCode 拡張作ってみた! - package.json の "activationEvents" のイベン トの設定が必要 -
マーケットプレイス・デプロイ権限設定
(初心者の)疑問点 VSCode 拡張作ってみた! elzup/vscode-maai-cursor/issues
感想・まとめ VSCode 拡張作ってみた! • Electron の開発に入門したときに感覚似てた • Type が効いて良い (import
"vscode") • `yo code` で Release まで楽だった • アドバイス改善点レビュー嬉しいです ◦ github.com/elzup/vscode-maai-cursor