Mercurial > vim
annotate runtime/ftplugin/racket.vim @ 36557:9f484a1841eb draft v9.1.0864
patch 9.1.0864: message history is fixed to 200
Commit: https://github.com/vim/vim/commit/4bd9b2b2467e696061104a029000e9824c6c609e
Author: Shougo Matsushita <Shougo.Matsu@gmail.com>
Date: Thu Nov 14 22:31:48 2024 +0100
patch 9.1.0864: message history is fixed to 200
Problem: message history is fixed to 200
Solution: Add the 'msghistory' option, increase the default
value to 500 (Shougo Matsushita)
closes: #16048
Co-authored-by: Milly <milly.ca@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Nov 2024 22:45:04 +0100 |
parents | 3bae991a240b |
children |
rev | line source |
---|---|
29996 | 1 " Vim filetype plugin |
2 " Language: Racket | |
3 " Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com> | |
4 " Previous Maintainer: Will Langstroth <will@langstroth.com> | |
5 " URL: https://github.com/benknoble/vim-racket | |
36547
3bae991a240b
runtime(racket): update Racket runtime files
Christian Brabandt <cb@256bit.org>
parents:
35324
diff
changeset
|
6 " Last Change: 2024 Jun 01 |
29996 | 7 |
8 if exists("b:did_ftplugin") | |
9 finish | |
10 endif | |
11 let b:did_ftplugin = 1 | |
12 | |
13 let s:cpo_save = &cpo | |
14 set cpo&vim | |
15 | |
16 " quick hack to allow adding values | |
17 setlocal iskeyword=@,!,#-',*-:,<-Z,a-z,~,_,94 | |
18 | |
36547
3bae991a240b
runtime(racket): update Racket runtime files
Christian Brabandt <cb@256bit.org>
parents:
35324
diff
changeset
|
19 setlocal shiftwidth=2 softtabstop=2 |
3bae991a240b
runtime(racket): update Racket runtime files
Christian Brabandt <cb@256bit.org>
parents:
35324
diff
changeset
|
20 |
29996 | 21 " Enable auto begin new comment line when continuing from an old comment line |
22 setlocal comments=:;;;;,:;;;,:;;,:; | |
23 setlocal formatoptions+=r | |
24 | |
36547
3bae991a240b
runtime(racket): update Racket runtime files
Christian Brabandt <cb@256bit.org>
parents:
35324
diff
changeset
|
25 setlocal commentstring=;;\ %s |
29996 | 26 |
27 setlocal formatprg=raco\ fmt | |
28 | |
29 " Undo our settings when the filetype changes away from Racket | |
30 " (this should be amended if settings/mappings are added above!) | |
31 let b:undo_ftplugin = | |
36547
3bae991a240b
runtime(racket): update Racket runtime files
Christian Brabandt <cb@256bit.org>
parents:
35324
diff
changeset
|
32 \ "setlocal iskeyword< shiftwidth< softtabstop< comments< formatoptions< formatprg<" |
29996 | 33 \. " | setlocal commentstring<" |
34 | |
35 if !exists("no_plugin_maps") && !exists("no_racket_maps") | |
36 " Simply setting keywordprg like this works: | |
37 " setlocal keywordprg=raco\ docs | |
38 " but then vim says: | |
39 " "press ENTER or type a command to continue" | |
40 " We avoid the annoyance of having to hit enter by remapping K directly. | |
41 function s:RacketDoc(word) abort | |
42 execute 'silent !raco docs --' shellescape(a:word) | |
43 redraw! | |
44 endfunction | |
45 nnoremap <buffer> <Plug>RacketDoc :call <SID>RacketDoc(expand('<cword>'))<CR> | |
46 nmap <buffer> K <Plug>RacketDoc | |
47 | |
48 " For the visual mode K mapping, it's slightly more convoluted to get the | |
49 " selected text: | |
50 function! s:Racket_visual_doc() | |
51 try | |
52 let l:old_a = @a | |
53 normal! gv"ay | |
54 call system("raco docs '". @a . "'") | |
55 redraw! | |
56 return @a | |
57 finally | |
58 let @a = l:old_a | |
59 endtry | |
60 endfunction | |
61 | |
62 xnoremap <buffer> <Plug>RacketDoc :call <SID>Racket_visual_doc()<cr> | |
63 xmap <buffer> K <Plug>RacketDoc | |
64 | |
65 let b:undo_ftplugin .= | |
66 \ " | silent! execute 'nunmap <buffer> K'" | |
67 \. " | silent! execute 'xunmap <buffer> K'" | |
68 endif | |
69 | |
70 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") | |
71 let b:browsefilter = | |
34134
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29996
diff
changeset
|
72 \ "Racket Source Files (*.rkt, *.rktl)\t*.rkt;*.rktl\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29996
diff
changeset
|
73 if has("win32") |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29996
diff
changeset
|
74 let b:browsefilter .= "All Files (*.*)\t*\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29996
diff
changeset
|
75 else |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29996
diff
changeset
|
76 let b:browsefilter .= "All Files (*)\t*\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
29996
diff
changeset
|
77 endif |
29996 | 78 let b:undo_ftplugin .= " | unlet! b:browsefilter" |
79 endif | |
80 | |
81 if exists("loaded_matchit") && !exists("b:match_words") | |
82 let b:match_words = '#|:|#' | |
83 let b:undo_ftplugin .= " | unlet! b:match_words" | |
84 endif | |
85 | |
86 let &cpo = s:cpo_save | |
87 unlet s:cpo_save |