Skip to content

Instantly share code, notes, and snippets.

View xc1427's full-sized avatar
🐶
working

Chen XI xc1427

🐶
working
View GitHub Profile
@xc1427
xc1427 / localstorage_beautifier.vim
Created March 18, 2017 22:18
To beautify the raw json string copied from local storage (Chrome DevTool). Execute this in command line.
:setlocal ft=json | %s/,"/,\r"/g | :%s/},/\r},/g | %s/{"/{\r"/g | %s/\S\@<=}/\r}/g | %s/:\S\@=/: /g | %s/,\S\@=/, /g | %normal! ==
@xc1427
xc1427 / add_open_with_gvim_x64_win10.bat
Last active September 30, 2021 13:15
Open folders and files with gvim from windows explorer context menu (tested in Windows 10 64bit)
@echo off
SET gvimPath=%USERPROFILE%\vim\vim80\gvim.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with gvim" /t REG_SZ /v "" /d "Open with gvim" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with gvim" /t REG_EXPAND_SZ /v "Icon" /d "%gvimPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with gvim\command" /t REG_SZ /v "" /d "%gvimPath% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with gvim" /t REG_SZ /v "" /d "Open with gvim" /f