forked from wlangstroth/vim-racket
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wlangstroth#53 from a-mg/add-guard-and-undo
Add include guard and b:undo_ftplugin rules
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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" |