Skip to content
On this page

Webstorm

Initialize

Windows Settings

  • CRLF
    • File | Settings | Editor | Code Style
  • Node Settings
  • Spaces
    • File | Settings | Editor | Code Style | Markdown
bash
# rm all crlf
find . -type f -exec sed -i 's/\r$//' {} \; #add to alias
grep -Uq $'\r' crlf.txt && echo CRLF BAD || echo Looks good LF
grep -Uq $'\r\n' crlf.txt && echo CRLF BAD || echo Looks good LF

VSCode Integration

  • File | Settings | Tools | External Tools
    • jetbrains://WebStorm/settings?name=Tools--External+Tools
bash
# vscode_open_file
write-host "$Env:LOCALAPPDATA\Programs\Microsoft VS Code\Code.exe"
$FilePath$
# echo "%LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe"
powershell
"C:\Users\Jason\AppData\Local\Programs\Microsoft VS Code\Code.exe" 

# misc:
cd C:\Users\Jason\AppData\Roaming\JetBrains\WebStorm2023.1\tools\
code "C:\Users\Jason\AppData\Roaming\JetBrains\WebStorm2023.1\tools\External Tools.xml"
cd "C:\Users\Jason\AppData\Local\Programs\Microsoft VS Code\"
"C:\Users\Jason\AppData\Local\Programs\Microsoft VS Code\Code.exe" .
cd "%APPDATA%"
cd "$Env:APPDATA" # Roaming
cd "$Env:LOCALAPPDATA" # Local
C:\Users\Jason\AppData\Roaming\JetBrains\WebStorm2023.1\options\abbrevs.xml

Keymap / Shortcuts

  • Windows Copy
  • Run Context
    • run current file
    • vscode_open (External Tools)
      • double check if this is synced with plugin
    • tasks
  • replace
    • ctrl+r -> ctrl+f,ctrl+r
  • Just cant seem to execute...?
  • node will take the macros, but shell and others will not!

Terminal set to wsl...

  • $PID for powershell

macros

Details
txt
$ProjectName$ - The name of the current project.
$FilePath$ - The absolute path to the current file.
  • assumption for webstorm is... node is installed

Snippets

Markdown

  • jcLink
  • jcComment
    • <!-- -->
  • jcDetails
    • vitePress:
md
:::details
:::code-group
<<<@../../../static/webstorm/jcComment.xml
:::

todo

  • jcBlock. i.e. triple 2x
  • many many others

External Tools - Macro

xml
<tool name="vscode_open_file" description="vscode_open_file" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
  <exec>
    <option name="COMMAND" value="&quot;C:\Users\Jason\AppData\Local\Programs\Microsoft VS Code\Code.exe&quot;" />
    <option name="PARAMETERS" value="$FilePath$" />
    <option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
  </exec>
</tool>

Everything

  • cygwin
  • download/https%3a%2f%2fcygwin.mirror.constant.com%2f/x86_64/releases

Shortcuts

powershell
#https://codeforwings.github.io/nuxt3-win32-posix-path/
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
c:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
C:\cygwin64\bin\bash.exe
c:/cygwin64/bin/bash.exe

WSL Trigger

PyCharm Env

EditorConfig

ini
; .editorconfig
[*]
charset = utf-8
end_of_line = lf
; might need to add mjs
[{*.cjs,*.js,*.mjs}]
indent_size = 2
tab_width = 2