Skip to content

Commit

Permalink
Merge pull request wlangstroth#53 from a-mg/add-guard-and-undo
Browse files Browse the repository at this point in the history
Add include guard and b:undo_ftplugin rules
  • Loading branch information
wlangstroth authored Jun 23, 2020
2 parents 514d91c + 1f3f0ef commit 4dc9840
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ftplugin/racket.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
" Maintainer: Will Langstroth <[email protected]>
" URL: http://github.com/wlangstroth/vim-racket

if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1

setl iskeyword+=#,%,^
setl lispwords+=module,module*,module+,parameterize,let-values,let*-values,letrec-values,local
setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case,syntax-parse
Expand Down Expand Up @@ -61,3 +66,11 @@ endif

"setl commentstring=;;%s
setl commentstring=#\|\ %s\ \|#

" Undo our settings when the filetype changes away from Racket
" (this should be amended if settings/mappings are added above!)
let b:undo_ftplugin =
\ "setl iskeyword< lispwords< lisp< comments< formatoptions<"
\. "| setl makeprg< commentstring<"
\. "| nunmap <buffer> K"
\. "| vunmap <buffer> K"

0 comments on commit 4dc9840

Please sign in to comment.