diff --git a/common/ideavimrc b/common/ideavimrc index 922446e..3e4e251 100644 --- a/common/ideavimrc +++ b/common/ideavimrc @@ -34,10 +34,16 @@ noremap K N noremap j e noremap J E -noremap H :bp -noremap I :bn +nnoremap H :bp +nnoremap I :bn noremap N 5j noremap E 5k +vnoremap H ^ +xnoremap H ^ +onoremap H ^ +vnoremap I $ +xnoremap I $ +onoremap I $ diff --git a/platforms/win/Microsoft.PowerShell_profile.ps1 b/platforms/win/Microsoft.PowerShell_profile.ps1 index e3f0062..91cc838 100644 --- a/platforms/win/Microsoft.PowerShell_profile.ps1 +++ b/platforms/win/Microsoft.PowerShell_profile.ps1 @@ -84,4 +84,6 @@ function Show-WindowsNotification { $notifyIcon.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon((Get-Command pwsh).Source) $notifyIcon.Visible = $true $notifyIcon.ShowBalloonTip(0,$Title,$Message,[System.Windows.Forms.ToolTipIcon]::Info) -} \ No newline at end of file +} + +Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion" diff --git a/platforms/win/vsvimrc b/platforms/win/vsvimrc index ceb2de8..e44307e 100644 --- a/platforms/win/vsvimrc +++ b/platforms/win/vsvimrc @@ -7,10 +7,14 @@ noremap n j noremap e k noremap i l -noremap H 0 -noremap N 5j -noremap E 5k -noremap I $ +nnoremap N 5j +nnoremap E 5k +vnoremap H ^ +xnoremap H ^ +onoremap H ^ +vnoremap I $ +xnoremap I $ +onoremap I $ " Similar position to i noremap l i diff --git a/tools/obsidian/.markdownlint.jsonc b/tools/obsidian/.markdownlint.jsonc new file mode 100644 index 0000000..3aacfb0 --- /dev/null +++ b/tools/obsidian/.markdownlint.jsonc @@ -0,0 +1,34 @@ +{ + "ul-style": { // MD004 + "style": "dash" // - + }, + "ul-indent": { // MD007 + "indent": 4 + }, + "no-hard-tabs": { + "ignore_code_languages": [ + "go" + ] + }, + "line-length": false, // MD013 + "no-missing-space-atx": false, // MD018, prevent from formatting `#tag` to `# tag` + "no-inline-html": { // MD033 + "allowed_elements": [ + "kbd", // keyboard key + "u", // underline + "sup", // superscript + "sub", // subscript + "center", // center text + "cursor", // Personal use + "font", // Font family + "iframe" // Embed Web content + ] + }, + // "fenced-code-language": { // MD040 + // }, + "first-line-h1": false, // MD041 + "code-block-style": false // MD046: This will parse LaTeX indentation as indented code block + // "code-block-style": { + // "style": "fenced" // MD046 + // } +} \ No newline at end of file diff --git a/tools/powershell/Prompt.ps1 b/tools/powershell/Prompt.ps1 index ae31068..1ae9545 100644 --- a/tools/powershell/Prompt.ps1 +++ b/tools/powershell/Prompt.ps1 @@ -3,7 +3,81 @@ # Author: js0ny # Use starship to set prompt -Invoke-Expression (&starship init powershell) +# Invoke-Expression (&starship init powershell) + + +function formatFG { + param( + [string]$RGB + ) + if ($RGB -eq "-1") { + return "`e[39m" + } + $R = $RGB.Substring(0, 2) + $G = $RGB.Substring(2, 2) + $B = $RGB.Substring(4, 2) + # Convert hex to RGB + $R = [int]::Parse($R, [System.Globalization.NumberStyles]::HexNumber) + $G = [int]::Parse($G, [System.Globalization.NumberStyles]::HexNumber) + $B = [int]::Parse($B, [System.Globalization.NumberStyles]::HexNumber) + return "`e[38;2;$R;$G;${B}m" +} + +function formatBG { + param( + [string]$RGB + ) + if ($RGB -eq "-1") { + return "`e[49m" + } + $R = $RGB.Substring(0, 2) + $G = $RGB.Substring(2, 2) + $B = $RGB.Substring(4, 2) + # Convert hex to RGB + $R = [int]::Parse($R, [System.Globalization.NumberStyles]::HexNumber) + $G = [int]::Parse($G, [System.Globalization.NumberStyles]::HexNumber) + $B = [int]::Parse($B, [System.Globalization.NumberStyles]::HexNumber) + return "`e[48;2;$R;$G;${B}m" +} +function formatPowerlineText { + param( + [string]$FG, + [string]$BG, + [string]$PLBG, + [string]$Text + ) + $ResumeSequece = "`e[0m" + $TextFG = formatFG -RGB $FG + $TextBG = formatBG -RGB $BG + $PLFG = formatFG -RGB $BG + $PLBG = formatBG -RGB $PLBG + return "$TextFG$TextBG $Text $PLFG$PLBG$ResumeSequece" +} + +function prompt { + if ($pwd.Path -eq $HOME) { + $cwd = "~" + } else { + $cwd = $pwd.ProviderPath + } + $time = Get-Date -Format "HH:mm" + $ResumeSequece = "`e[0m" + $FG0 = "FFFFFF" + $BG0 = "9A348E" + $BG1 = "DA627D" + $BG2 = "FCA17D" + $FG1 = "035E82" + $time = formatPowerlineText $FG0 $BG0 $BG1 $time + $cwd = formatPowerlineText $FG0 $BG1 $BG2 $cwd + $ps = formatPowerlineText $FG1 $BG2 "-1" "PS" + + "$time$cwd$ps$ResumeSequece " + +} + +function Invoke-Starship { + Invoke-Expression (&starship init powershell) +} Import-Module Catppuccin