# Text Editor

editortextprocessingvscode

# Features I use

  • Relative numbering - useful for vim jumping
  • map CASP as ESC, close to hand and easier to press
  • Refactor -> extract string to local variable

# vsCode

  • Lead by Erich Gamma - author of Gang of Four design pattern book

  • Language Server Protocol - RPC

    • debugger - can change values
    • compiler
    • linting
    • widgets
    • for java written by Red Hat
    • code lens
  • Java language server built on top of eclipse platform

  • vim like smart selection editor.action.smartSelect.expand ctrl + w and ctrl + shift + w

# Snippets

  • Nested snippet arguments are possible, one inside other
  • look at how the extensions work for yourself
    • cd ~/.vscode; code -n .

# Extension API

  • https://code.visualstudio.com/api
  • steps
    • first make
    • then publish vsce
  • Hello World
    • Register a command
      • in package.json
    • alert window on command execution
  • When to activate extension? Activation Events
  • contributions Points in package.json file
  • languague syntax higlighting
    • Tokenization
    • Grammer rules by regex
      • textmate grammer language xml, json or yaml format
      • look for tmbundles or plist in source repose
        • like for stylus
  • Capabilities
  • Webview API
    • markdown rendered preview

# How to create a file from a template?

# Tools already using it

  1. hugo new
  2. hacking CLI tools
  3. vue CLI
  4. vim snippets

# Tools to make scaffold

  1. Templating languages - python
    1. jinja
    2. cheetah
  2. Yeoman - nodejs

TIP

why not create your own? CLI tool

# Debugger

conditional debugging

  • What if I want to add breakpoint only when a specific value (url request) is made?
  • How to watch for variable value change?
  • or a value of a variable is of some special interest type

# Text Editor vs IDE

  • IDE like xCode for swift,
  • Provides widgets

# Online website idea

# Resource

  • or
  • Buy me a coffeeBuy me a coffee