Skip to content

Instantly share code, notes, and snippets.

@jonbri
Created December 12, 2017 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbri/ebb6291a6aec436c0a96f047978133d0 to your computer and use it in GitHub Desktop.
Save jonbri/ebb6291a6aec436c0a96f047978133d0 to your computer and use it in GitHub Desktop.
Switch statement formatting
function! FormatSwitch()
:normal j
:normal vi}>
:write
endfunction
nnoremap <silent> <Plug>FormatSwitchPlug :call FormatSwitch()<CR>
\:call repeat#set("\<Plug>FormatSwitchPlug")<CR>
nmap cFS <Plug>FormatSwitchPlug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment