-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path0024 - LoadHeaderFile.vim.json
More file actions
43 lines (43 loc) · 2.68 KB
/
0024 - LoadHeaderFile.vim.json
File metadata and controls
43 lines (43 loc) · 2.68 KB
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
{
"script_id": "24",
"display_name": "LoadHeaderFile.vim",
"summary": "load filename from an #include line",
"name": "LoadHeaderFile.vim",
"script_type": "utility",
"description": "Here are the mappings I use for this script (which I'll use in my description)\n\nmap <F12> :call LoadHeaderFile( getline( \".\" ), 0 )<CR>\nmap <C-F12> :call LoadHeaderFile( getline( \".\" ), 1 )<CR>\n\nTo use the script, just have your cursor on a #include line and hit F12 to load the .h file or C-F12 to load the corresponding .cpp file. It splits the window when it loads the file. If it can't find the file it just gives you an error that it can't find the file.\n\nYou have to have your path set up correctly for it to work. If you don't know how to do that, simply add a \"se path=.,c:/path/**,c:/another path/**\" to you _vimrc. Obviously there is a better explanation of paths in the help.\n\nThe code works on includes with <> or \"\". It only checks for .h and .cpp, but you could modify it to do more. I kept it simple so it's quicker.\n\nAnd as I'm typing this up I noticed that the #include has to be at the beginning of the line...can't have spaces or tabs. I'll fix that in the next version :)\n\nIf you see any flaws or ways to improve this script, please let me know since I'm still learning how to script.",
"install_details": "If you're using Vim 6.0, just put it in the plugins directory. Otherwise, just source it with all your other functions.",
"versions": [
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=37",
"filename": "LoadHeaderFile.vim",
"script_version": "1.1",
"date": "2001-07-05",
"vim_version": "6.0",
"author": {
"user_id": "65",
"user_name": "garner42",
"first_name": "Garner",
"last_name": "Halloran",
"email": "garnerh42@yahoo.com",
"homepage": ""
},
"release_notes": "A little more efficient pattern searching. Added support for loading header files that don't end in .h (ie fstream). Added support for loading .c files instead of just .cpp files. Added loaded_LoadHeaderFile so you can disable the plugin. Fixed bug where it didn't recognize a #include if it wasn't at the beginning of a line."
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=31",
"filename": "LoadHeaderFile.vim",
"script_version": "1.0",
"date": "2001-06-22",
"vim_version": "6.0",
"author": {
"user_id": "65",
"user_name": "garner42",
"first_name": "Garner",
"last_name": "Halloran",
"email": "garnerh42@yahoo.com",
"homepage": ""
},
"release_notes": "Initial upload"
}
]
}