├── .gitattributes ├── .gitignore ├── BitrixAPI.sublime-completions ├── BitrixHelp.py ├── BitrixHelp.sublime-settings ├── Default (Linux).sublime-keymap ├── Default (OSX).sublime-keymap ├── Default (Windows).sublime-keymap ├── Default.sublime-commands ├── Main.sublime-menu └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /BitrixHelp.py: -------------------------------------------------------------------------------- 1 | import sublime, sublime_plugin 2 | import webbrowser 3 | 4 | settings = None 5 | def plugin_loaded(): 6 | global settings 7 | settings = sublime.load_settings("BitrixHelp.sublime-settings") 8 | 9 | class BitrixHelpCommand(sublime_plugin.TextCommand): 10 | def run(self, edit, it="bitrixAPI"): 11 | pages = settings.get("pages").get(it) 12 | lst = [p.get("title") for p in pages] 13 | def on_done(index): 14 | if index == -1: 15 | return 16 | url = pages[index].get("link") 17 | sublime.status_message("open: "+str(url)) 18 | webbrowser.open_new_tab(url) 19 | self.view.window().show_quick_panel(lst, on_done) -------------------------------------------------------------------------------- /Default (Linux).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { "keys": ["ctrl+alt+b", "ctrl+alt+b"], "command": "bitrix_help"}, 3 | { "keys": ["ctrl+alt+b", "ctrl+alt+c"], "command": "bitrix_help", "args": {"it": "bitrixComponents"}} 4 | ] -------------------------------------------------------------------------------- /Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { "keys": ["ctrl+super+b", "ctrl+super+b"], "command": "bitrix_help"}, 3 | { "keys": ["ctrl+super+b", "ctrl+super+c"], "command": "bitrix_help", "args": {"it": "bitrixComponents"}} 4 | ] -------------------------------------------------------------------------------- /Default (Windows).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { "keys": ["ctrl+alt+b", "ctrl+alt+b"], "command": "bitrix_help"}, 3 | { "keys": ["ctrl+alt+b", "ctrl+alt+c"], "command": "bitrix_help", "args": {"it": "bitrixComponents"}} 4 | ] -------------------------------------------------------------------------------- /Default.sublime-commands: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "Bitrix Help: API" 4 | ,"command": "bitrix_help" 5 | }, 6 | { 7 | "caption": "Bitrix Help: Components" 8 | ,"command": "bitrix_help" 9 | ,"args": {"it": "bitrixComponents"} 10 | } 11 | ] -------------------------------------------------------------------------------- /Main.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "Preferences", 4 | "mnemonic": "n", 5 | "id": "preferences", 6 | "children": 7 | [ 8 | { 9 | "caption": "Package Settings", 10 | "mnemonic": "P", 11 | "id": "package-settings", 12 | "children": 13 | [ 14 | { 15 | "caption": "BitrixHelp", 16 | "children": 17 | [ 18 | { 19 | "command": "open_file", "args": 20 | { 21 | "file": "${packages}/BitrixHelp/BitrixHelp.sublime-settings" 22 | }, 23 | "caption": "Settings – Default" 24 | }, 25 | { 26 | "command": "open_file", "args": 27 | { 28 | "file": "${packages}/User/BitrixHelp.sublime-settings" 29 | }, 30 | "caption": "Settings – User" 31 | }, 32 | { "caption": "-" } 33 | ] 34 | } 35 | ] 36 | } 37 | ] 38 | } 39 | ] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BitrixHelp 2 | ### [Sublime] Text 2 plugin help in work with [Bitrix] CMS 3 | 4 | Feauters: 5 | 6 | * BitrixAPI.sublime-complations(complations for Bitrix API) - all modules included. 7 | * List links whith names of Bitrix Dev API Help (links to http://dev.1c-bitrix.ru/api_help/) [ctrl+alt+b, ctrl+alt+b]. 8 | * List links whith names of Bitrix Components (links to http://dev.1c-bitrix.ru/api_help/) [ctrl+alt+b, ctrl+alt+c]. 9 | 10 | 11 | ## Instalation 12 | Recommended way is using [PackageControll] package. 13 | 14 | ### Using Sublime Package Control 15 | 16 | It is preferred and simplest way for most users. 17 | 18 | - Install Package Control http://wbond.net/sublime_packages/package_control 19 | - Open Package Control 20 | - Select 'Install Package' 21 | - Find and select 'BitrixHelp' 22 | 23 | ### Using Git 24 | 25 | If you like work with HEAD you can locate BitrixHelp in your packages directory. 26 | 27 | - Go to your Packages directory, you can locate to your Packages directory by using the menu item 28 | Preferences -> Browse Packages... 29 | - Inside the Packages directory, clone the BitrixHelp repository using the command below: 30 | git clone https://github.com/matiaspub/BitrixHelp.git BitrixHelp 31 | 32 | ### Download Manually 33 | 34 | - Download the files using the GitHub .zip download option. 35 | - Unzip the files and rename the folder to something like BitrixHelp. 36 | - Copy the folder to your Sublime Text 2 Packages directory. 37 | 38 | ## Configuration 39 | You can add self links in BitrixHelp.sublime-settings 40 | ```` 41 | { 42 | "pages": { 43 | // items in list Bitrix Components [ctrl+alt+b, ctrl+alt+c] 44 | "bitrixComponents":[ list of links ], 45 | // items in list Bitrix API [ctrl+alt+b, ctrl+alt+b] 46 | "bitrixAPI": [ list of links ] 47 | } 48 | } 49 | ```` 50 | 51 | ## Key Map 52 | It contains redefine standart keys as ctrl++(encrease font size), but you can change it. 53 | ```` 54 | [ 55 | { "keys": ["ctrl+alt+b", "ctrl+alt+b"], "command": "bitrix_help"}, 56 | { "keys": ["ctrl+alt+b", "ctrl+alt+c"], "command": "bitrix_help", "args": {"it": "bitrixComponents"}} 57 | ] 58 | ```` 59 | 60 | ## Use 61 | 62 | ### Complations 63 | 64 | For complation in 65 | ```` 66 | $APPLICATION->IncludeComponent($componentName, $componentName, $arParams = array(), $arParams = array(), $arFunctionParams = array()) 67 | ```` 68 | Type APPincom + Tab, or choose complation in drop-down select + Enter 69 | Its work for objects $APPLICATION, $USER and $DB 70 | 71 | For complation in 72 | ```` 73 | CIBlockElement::GetList($arOrder=array('SORT'=>'ASC'), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array()) 74 | ```` 75 | Type CIblElGetli + Tab, or choose complation in drop-down select + Enter 76 | 77 | ### API Help 78 | 79 | To speed choose API help page of Bitrix API Help - press __[ctrl+alt+b, ctrl+alt+b]__, and type some characters to find what you need and press Enter. 80 | You will see opened tab in browser with choosen page of Bitrix Api Help. 81 | 82 | ### Components Help 83 | 84 | To speed choose component help page of Bitrix API Help - press __[ctrl+alt+b, ctrl+alt+c]__, and type some characters to find what you need and press Enter. 85 | You will see opened tab in browser with choosen page of Bitrix Api Help. 86 | 87 | 88 | [Sublime]: http://www.sublimetext.com/ 89 | [PackageControll]: http://wbond.net/sublime_packages/package_control/installation 90 | [Bitrix]: http://1c-bitrix.ru 91 | --------------------------------------------------------------------------------