-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0083 - let-modeline.vim.json
59 lines (59 loc) · 4.08 KB
/
0083 - let-modeline.vim.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"script_id": "83",
"display_name": "let-modeline.vim",
"summary": "Extends the modeline feature to the assignment of variables",
"name": "let-modeline.vim",
"script_type": "utility",
"description": "The file defines the function FirstModeLine().\n\nIts purpose is very simple. It consists in extending VIM modelines (:h modeline for more info) to custom variables -- these variables can then be used to customize other VIM scripts.\n\nFor instance, if your file foo.vim has as one of its first or last lines:\n \" VIM: let b:toto=\"foo\" g:tata=4 g:egal=\"t=y\".&tw $CPPFLAG='-I../../libs'\nThen, once the buffer is (re)loaded, one buffer relative variable (b:toto) and two global variables (g:tata and g:egal) are defined to the value specified after the equal sign.\n\nPersonnaly, I use it in conjunction with tex-tools.vim in order to know the name of the main file of the current document and then call latex on the main file and not on the currently edited file -- I use intensively \\\\include{} and \\\\includeonly{}.\n\nRegarding the security issue, the script forbids calls to functions in the right hand operand -- it prevents from trojans. Nevertheless, it is possible to call functions thanks to a buffer relative callback feature. This time, only one function could be called. Trojans are still possible if the callback functions (that you have accepted in your configuration) want it to be possible -- like calling a function named after the value passed in parameter... \nThe callback feature has been implemented to be used in conjunction with ftplugins ; cf. tex-maps.vim and tex-tools.vim on my Web site:\n http://hermitte.free.fr/vim/tex.php\n\nNote: The version 1.5 is the last one which can be used with Vim 5.x.",
"install_details": "Drop this file into your {rtp}/plugin/ directory with VIM 6 ; with VIM 5.x {rtp}/plugin/ is also a good idea if you emulate VIM 6 plugins -- cf. my web site as well.\n\nTo use the plugin, my .vimrc contains:\n\n \" Loads FirstModeLine() {{{\n if !exists('*FirstModeLine')\n Runtime plugin/let-modeline.vim\n \" :Runtime emulates :runtime \n endif\n if exists('*FirstModeLine')\n aug ALL\n au!\n \" To not interfer with Templates loaders like mu-template\n au BufNewFile * :let b:this_is_new_buffer=1\n \" Modeline interpretation\n au BufEnter * :call FirstModeLine()\n aug END\n endif\n \" }}}\n\n\n",
"versions": [
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=2856",
"filename": "let-modeline.vim",
"script_version": "1.6",
"date": "2004-03-23",
"vim_version": "6.0",
"author": {
"user_id": "102",
"user_name": "hermitte",
"first_name": "Luc",
"last_name": "Hermitte",
"email": "[email protected]",
"homepage": "http://hermitte.free.fr/vim"
},
"release_notes": "Support for environment variables added ; does not check into folded lines anymore ; does not mess with search history anymore ; no more error messages with 2html.vim"
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=1385",
"filename": "let-modeline.vim",
"script_version": "1.3",
"date": "2002-11-08",
"vim_version": "5.7",
"author": {
"user_id": "102",
"user_name": "hermitte",
"first_name": "Luc",
"last_name": "Hermitte",
"email": "[email protected]",
"homepage": "http://hermitte.free.fr/vim"
},
"release_notes": "Parse several lines according to &modelines and &modeline ; the Let-modeline does not need to be at the beginning of the file anymore."
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=166",
"filename": "let-modeline.vim",
"script_version": "1.1",
"date": "2001-09-13",
"vim_version": "6.0",
"author": {
"user_id": "102",
"user_name": "hermitte",
"first_name": "Luc",
"last_name": "Hermitte",
"email": "[email protected]",
"homepage": "http://hermitte.free.fr/vim"
},
"release_notes": "Initial upload"
}
]
}