├── screens ├── dark.png └── light.png ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── CONTRIBUTING.md ├── patches ├── papercolor-theme.diff └── ale.diff ├── plugin └── vim-ada.vim ├── doc ├── vim-ada.txt └── plug.txt ├── README.md └── .vimrc /screens/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thindil/vim-ada/HEAD/screens/dark.png -------------------------------------------------------------------------------- /screens/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thindil/vim-ada/HEAD/screens/light.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Technical Info:** 21 | - OS: [e.g. iOS] 22 | - Version: [e.g. 22] 23 | 24 | **Additional context** 25 | Add any other context about the problem here. 26 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Here are few short advices before you open new issue. 2 | 3 | 1. Please open one issue per problem/suggestion/bug/etc. It made easier to 4 | discuss issue. 5 | 2. Try to bring as much as possible informations about issue. It is probably 6 | impossible to give too much informations :) Generally, when you want to add 7 | something to the bundle, try describe it as detailed as possible, when you 8 | want to report a bug, try to give enough informations to reproduce bug by 9 | the others. 10 | 3. Please, before you open new issue, check if someone earlier didn't created 11 | that same or similar issue (by using search option). 12 | 4. If you want to suggest a new plugin which should be added to the bundle, 13 | just add it in the project wiki on [Recommended plugins](https://github.com/thindil/vim-ada/wiki/Recommended-plugins) 14 | page 15 | 16 | -------------------------------------------------------------------------------- /patches/papercolor-theme.diff: -------------------------------------------------------------------------------- 1 | diff --git a/colors/PaperColor.vim b/colors/PaperColor.vim 2 | index 0d52afe..c4037e9 100755 3 | --- a/colors/PaperColor.vim 4 | +++ b/colors/PaperColor.vim 5 | @@ -1995,15 +1995,23 @@ fun! s:apply_syntax_highlightings() 6 | exec 'hi cucumberPlaceholder' . s:fg_aqua 7 | 8 | " Ada Highlighting 9 | - exec 'hi adaInc' . s:fg_aqua . s:ft_bold 10 | + exec 'hi adaInc' . s:fg_red 11 | exec 'hi adaSpecial' . s:fg_aqua . s:ft_bold 12 | - exec 'hi adaKeyword' . s:fg_pink 13 | + exec 'hi adaKeyword' . s:fg_orange 14 | exec 'hi adaBegin' . s:fg_pink 15 | exec 'hi adaEnd' . s:fg_pink 16 | exec 'hi adaTypedef' . s:fg_navy . s:ft_bold 17 | exec 'hi adaAssignment' . s:fg_aqua . s:ft_bold 18 | exec 'hi adaAttribute' . s:fg_green 19 | - 20 | + exec 'hi adaOperator' . s:fg_blue 21 | + exec 'hi adaSign' . s:fg_olive 22 | + 23 | + " Tcl Highlighting 24 | + exec 'hi tclBoolean' . s:fg_green 25 | + exec 'hi tclCommand' . s:fg_pink 26 | + exec 'hi tcltkWidgetSwitch' . s:fg_blue 27 | + exec 'hi tcltkWidgetColor' . s:fg_pink 28 | + 29 | " COBOL Highlighting 30 | exec 'hi cobolMarker' . s:fg_comment . s:bg_cursorline 31 | exec 'hi cobolLine' . s:fg_foreground 32 | -------------------------------------------------------------------------------- /plugin/vim-ada.vim: -------------------------------------------------------------------------------- 1 | " Bundle of plugins to change Vim/NeoVim into IDE 2 | " Maintainer: Bartek Jasicki 3 | " Last Change: 2019-10-07 4 | " License: GPLv3 5 | 6 | if exists('g:vimada') 7 | finish 8 | endif 9 | let g:vimada = 1 10 | 11 | " ****f* vim-ada/remove_local_changes 12 | " FUNCTION 13 | " Remove local changes to selected plugin 14 | " PARAMETERS 15 | " force - If true, remove file with changes too 16 | " pluginname - Name of plugin to revert changes 17 | " SOURCE 18 | function s:remove_local_changes(force, pluginname) 19 | " **** 20 | silent exec "!cd " . glob(g:plug_path) . "/" . a:pluginname " && git checkout ." 21 | if a:force 22 | silent exec "!rm " . glob(g:plug_path) . "/vim-ada/patches/" 23 | \ . a:pluginname . ".diff" 24 | endif 25 | endfunction 26 | 27 | " ****f* vim-ada/append_local_changes 28 | " FUNCTION 29 | " Append local changes to selected plugin 30 | " PARAMETERS 31 | " pluginname - Name of plugin to append local changes 32 | " SOURCE 33 | function s:append_local_changes(pluginname) 34 | " **** 35 | silent exec "!cd " . glob(g:plug_path) . "/" . a:pluginname " && git checkout ." 36 | silent exec "!cd " . glob(g:plug_path) . "/" . a:pluginname " && git apply " 37 | \ . glob(g:plug_path) . "/vim-ada/patches/" . a:pluginname . ".diff" 38 | endfunction 39 | 40 | command! -nargs=* -bang RemoveLocalChanges call s:remove_local_changes(0, ) 41 | command! -nargs=1 AppendLocalChanges call s:append_local_changes() 42 | -------------------------------------------------------------------------------- /patches/ale.diff: -------------------------------------------------------------------------------- 1 | diff --git a/ale_linters/ada/gnatmake.vim b/ale_linters/ada/gnatmake.vim 2 | new file mode 100644 3 | index 0000000..f019991 4 | --- /dev/null 5 | +++ b/ale_linters/ada/gnatmake.vim 6 | @@ -0,0 +1,53 @@ 7 | +" Author: Bartek Jasicki http://github.com/thindil 8 | +" Description: Lint Ada files with gnatmake 9 | + 10 | +call ale#Set('ada_gnatmake_executable', 'gnatmake') 11 | + 12 | +" -gnatwa: activate most optional warnings 13 | +" -gnatq: try semantic analysis even if syntax errors have been found 14 | +call ale#Set('ada_gnatmake_options', '-gnatwa -gnatq') 15 | + 16 | +function! ale_linters#ada#gnatmake#GetCommand(buffer) abort 17 | + " Build a suitable output file name. The output file is specified because 18 | + " the .ali file may be created even if no code generation is attempted. 19 | + " The output file name must match the source file name (except for the 20 | + " extension), so here we cannot use the null file as output. 21 | + let l:tmp_dir = fnamemodify(ale#command#CreateDirectory(a:buffer), ':p') 22 | + let l:out_file = l:tmp_dir . fnamemodify(bufname(a:buffer), ':t:r') . '.o' 23 | + 24 | + " -gnatc: Check syntax and semantics only (no code generation attempted) 25 | + return '%e -c -gnatc ' 26 | + \ . ale#Pad(ale#Var(a:buffer, 'ada_gnatmake_options')) 27 | + \ . ' -o ' . ale#Escape(l:out_file) 28 | + \ . ' ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p')) 29 | +endfunction 30 | + 31 | +" For the message format please refer to: 32 | +" https://gcc.gnu.org/onlinedocs/gnat_ugn/Output-and-Error-Message-Control.html 33 | +" https://gcc.gnu.org/onlinedocs/gnat_ugn/Warning-Message-Control.html 34 | +function! ale_linters#ada#gnatmake#Handle(buffer, lines) abort 35 | + " Error format: ::: 36 | + " Warning format: ::: warning: 37 | + let l:re = '\v(.+):([0-9]+):([0-9]+):\s+(warning:)?\s*(.+)\s*' 38 | + let l:output = [] 39 | + 40 | + for l:match in ale#util#GetMatches(a:lines, l:re) 41 | + call add(l:output, { 42 | + \ 'bufnr': a:buffer, 43 | + \ 'lnum': str2nr(l:match[2]), 44 | + \ 'col': str2nr(l:match[3]), 45 | + \ 'type': l:match[4] is# 'warning:' ? 'W' : 'E', 46 | + \ 'text': l:match[5], 47 | + \}) 48 | + endfor 49 | + 50 | + return l:output 51 | +endfunction 52 | + 53 | +call ale#linter#Define('ada', { 54 | +\ 'name': 'gnatmake', 55 | +\ 'output_stream': 'stderr', 56 | +\ 'executable': {b -> ale#Var(b, 'ada_gnatmake_executable')}, 57 | +\ 'command': function('ale_linters#ada#gnatmake#GetCommand'), 58 | +\ 'callback': 'ale_linters#ada#gnatmake#Handle', 59 | +\}) 60 | -------------------------------------------------------------------------------- /doc/vim-ada.txt: -------------------------------------------------------------------------------- 1 | vim-ada.txt vim-ada Last change: January 25 2021 2 | VIM-ADA - TABLE OF CONTENTS *vimada* *vim-ada* 3 | ============================================================================== 4 | 5 | 1. General Information |vimada-general| 6 | 2. Adding or removing plugins in the bundle |vimada-plugins| 7 | 3. Adding or removing local changes to the plugins |vimada-local| 8 | 4. Frequently Asked Questions |vimada-faq| 9 | 10 | ============================================================================== 11 | 1. General Information *vimada-general* 12 | 13 | Vim-Ada is ready to deploy set of plugins and settings which helps write 14 | programs in various programming languages. As name of bundle says, it is 15 | focused mainly on the Ada programming language, but it has support for other 16 | programming languages too. 17 | 18 | All changes to the plugins are under respective plugin license which can be 19 | found in plugins directory. If a plugin don't have a license info included, 20 | then all my changes are in public domain. 21 | 22 | If you are new to Vim/NeoVim and you want to have a more user-friendly 23 | experience with this editor, I recommend to use SpaceVim. Main differences 24 | between vim-ada and SpaceVim: 25 | * Design in "Keep It Simple Stupid" principle: Vim-ada is just a bundle of 26 | plugins which can be easily added, removed or locally edited to suit your 27 | needs. 28 | * No changes to core systems of Vim: All keyboard shortcuts are that same, 29 | thus, Vim-ada require less learning for experienced Vim/NeoVim users. 30 | * Easy to deploy: just download configuration file and replace your config, 31 | rest will be done after first start of Vim/NeoVim. 32 | * Much younger, less polished than SpaceVim. 33 | 34 | ============================================================================== 35 | 2. Adding or removing plugins in the bundle *vimada-plugins* 36 | 37 | To adding or removing Vim/NeoVim plugins Vim-Ada uses Plug plugin. Please 38 | refer to its documentation by :help plug 39 | Additional information: 40 | * Vim-ada should be always loaded as first plugin. Especially if others 41 | plugins have any local changes. All others plugins can be loaded in any 42 | order. 43 | * If you remove Vim-ada plugin or Plug all bundle will stop working. 44 | 45 | ============================================================================== 46 | 3. Adding or removing local changes to the plugins *vimada-local* 47 | 48 | Generally, vim-ada uses command "git apply" to add local changes to plugins, 49 | thus please refer to this command documentation for information and limitations 50 | of it. 51 | 52 | To add local changes to selected plugin you have to follow this steps: 53 | 1. Create file [name-of-plugin].diff with "git diff" command 54 | 2. Copy that file to vim-ada/patches directory 55 | 3. In Vim/NeoVim run command :AppendLocalChanges [name-of-plugin] to apply 56 | patch to it. 57 | 58 | Thus, for example, creating local changes patch for Syntastic plugin could 59 | look that: 60 | 1. git diff > syntastic.diff 61 | 2. cp syntastic.diff ../vim-ada/patches 62 | 3. In Vim/NeoVim run command :AppendLocalChanges syntastic 63 | 64 | To remove local changes from selected plugin, use Vim/NeoVim command 65 | RemoveLocalChanges[!] [pluginname] where [pluginname] is name of the plugin 66 | which will be having removed all local changes. If bang is added to the 67 | command (RemoveLocalChanges!), it will remove .diff file with local changes 68 | too. 69 | 70 | Thus, for example, removing local changes patch for Syntastic plugin could 71 | look that: 72 | :RemoveLocalChanges syntastic 73 | If you want to remove file with local changes too: 74 | :RemoveLocalChanges! syntastic 75 | 76 | ============================================================================== 77 | 4. Frequently Asked Questions *vimada-faq* 78 | 79 | Question: Vim-Plug don't want to update plugin with local changes. 80 | Answer: Unfortunately, Vim-Plug don't have option to run something before 81 | update starts (only after it). Thus, in that situation, local changes 82 | must be removed manually from that plugin before upgrade it. To do 83 | it, run Vim/NeoVim command RemoveLocalChanges [pluginname] and then 84 | run upgrade process again. 85 | 86 | Question: Where I can find more plugins? 87 | Answer: You can look at the project wiki page: 88 | https://github.com/thindil/vim-ada/wiki/Recommended-plugins 89 | or at Vim Awesome page: 90 | https://vimawesome.com/ 91 | 92 | Question: I have question not listed here. 93 | Answer: You can ask it at mail thindil@laeran.pl or open a new issue at Github 94 | project page: https://github.com/thindil/vim-ada/issues 95 | But in second case, please first use search option to check if someone 96 | not asked same or similar question earlier. 97 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## General Information 2 | 3 | Vim-Ada is ready to deploy set of plugins and settings which helps write 4 | programs in various programming languages. As name of bundle says, it is 5 | focused mainly on the Ada programming language, but it has support for 6 | other programming languages too. See "Installation" section for detailed 7 | instructions how to install it and "Plugins" section for information 8 | about included plugins and changes (if any) to them. If you need more 9 | plugins, you can visit [Vim Awesome](https://vimawesome.com/) or the 10 | project wiki [Recommended plugins](https://github.com/thindil/vim-ada/wiki/Recommended-plugins) 11 | page. 12 | 13 | All changes to plugins are under the respective plugin license which can be 14 | found in plugins directory. If the plugin don't have license info included, 15 | then all my changes are in public domain. 16 | 17 | If you are new to Vim and you want to have more user-friendly experience with 18 | this editor, I recommend to use [SpaceVim](https://spacevim.org/). Main 19 | differences between vim-ada and SpaceVim: 20 | 21 | * Design in **Keep It Simple Stupid** principle: Vim-ada is just a bundle of 22 | plugins which can be easily added, removed or locally edited to suit your 23 | needs. 24 | * No changes to core systems of Vim: All keyboard shortcuts are that same, 25 | thus, Vim-ada require less learning for experienced Vim/NeoVim users. 26 | * Easy to deploy: just download the configuration file and replace your 27 | config, rest will be done after first start of Vim/NeoVim. 28 | * Much younger, less polished than SpaceVim. 29 | 30 | **Important:** This version of README.md is about current version of Vim-Ada. 31 | Earlier versions of Vim-Ada may have different requirements or contents. 32 | Please read README.md included in the release to get information about other 33 | releases. 34 | 35 | ## Screenshots 36 | 37 | ![Papercolor - dark background](screens/dark.png) 38 | 39 | ![Papercolor - light background with opened vista and nerdtree](screens/light.png) 40 | 41 | ## Installation 42 | 43 | Set included `.vimrc` file as your configuration file (or 44 | source it from your configuration file). Since version 8.0 of vim-ada it is 45 | required, because all plugins are managed by Plug plugin which must be 46 | installed first. For upgrade, use Plug commands. 47 | 48 | ### Additional steps 49 | 50 | To enable all options, you have been needing to install: 51 | 52 | * Universal Ctags from https://ctags.io for generating *tags* files needed for 53 | Vim auto-completion. 54 | * Ada Language Server from https://github.com/AdaCore/ada_language_server for 55 | full support of the code completion, tags list, etc. for Ada language. 56 | * Other dependency is Zeal from https://zealdocs.org/. Additionally, for Ada 57 | documentation, you will be needed to download Ada specification docset. You 58 | can do this in two ways: 59 | 60 | a) Download Docset Feed from https://zealusercontributions.now.sh/ 61 | (recommended way). There you will find detailed information how to install 62 | docset. 63 | 64 | b) Build it alone: look at https://github.com/thindil/ada-docset for 65 | instructions and code needed to build Ada docset. 66 | 67 | * Optional, but highly recommended: ROBODoc from https://rfsber.home.xs4all.nl/Robo/ 68 | for generating a code documentation. For generating a documentation from Ada 69 | code, you may need the file *robodocada.rc* from https://github.com/thindil/roboada 70 | * Optional: If you want to use Grammarous plugin you will download the 71 | LanguageTool (website: https://languagetool.org) program at the first run of 72 | plugin. This program requires Java 8+ to work. 73 | 74 | ## Plugins 75 | 76 | ### A.vim 77 | 78 | Webpage: https://github.com/thindil/a.vim 79 | 80 | Allow fast switch between spec (.ads) and body (.adb) files (works with C, 81 | C++ headers files too). This plugin wasn't modified. 82 | 83 | ### AdaBundle 84 | 85 | Webpage: https://github.com/thindil/Ada-Bundle 86 | 87 | This is modified version of standard Ada support for Vim/Neovim. This plugin 88 | wasn't modified but have some custom configuration in `.vimrc` file. 89 | 90 | ### Airline 91 | 92 | Webpage: https://github.com/vim-airline/vim-airline 93 | 94 | Status bar and buffer list for Vim. This plugin wasn't modified but have some 95 | custom configuration in `.vimrc` file. 96 | 97 | ### Ale 98 | 99 | Webpage: https://github.com/dense-analysis/ale 100 | 101 | ALE (Asynchronous Lint Engine) is a plugin providing linting (syntax checking 102 | and semantic errors) in NeoVim 0.2.0+ and Vim 8 while you edit your text files, 103 | and acts as a Vim Language Server Protocol client. This plugin has added 104 | Ada support for gnatmake for support for GNAT Project files (.gpr). Gnatmake 105 | linter can be used only on save file. Thus, it is recommended to use custom 106 | configuration from `.vimrc` file. 107 | 108 | ### AnyFold 109 | 110 | Webpage: https://github.com/pseewald/vim-anyfold 111 | 112 | Generic folding mechanism and motion based on indentation. Fold anything that 113 | is structured into indented blocks. Quickly navigate between blocks. This plugin 114 | wasn't modified but have some custom configuration in `.vimrc` file. 115 | 116 | ### Auto-pairs 117 | 118 | Webpage: https://github.com/jiangmiao/auto-pairs 119 | 120 | Insert or delete brackets, quotes in pair. This plugin wasn't modified. 121 | 122 | ### EasyMotion 123 | 124 | Webpage: https://github.com/easymotion/vim-easymotion 125 | 126 | EasyMotion provides a much simpler way to use some motions in vim. It takes the 127 | `` out of `w` or `f{char}` by highlighting all possible 128 | choices and allowing you to press one key to jump directly to the target. This 129 | plugin wasn't modified. 130 | 131 | ### Grammarous 132 | 133 | Webpage: https://github.com/rhysd/vim-grammarous 134 | 135 | vim-grammarous is a powerful grammar checker for Vim. Simply do :GrammarousCheck 136 | to see the powerful checking. This plugin automatically downloads LanguageTool, 137 | which requires Java 8+. This plugin wasn't modified. 138 | 139 | ### GutenTags 140 | 141 | Webpage: https://github.com/ludovicchabant/vim-gutentags 142 | 143 | Gutentags is a plugin that takes care of the much-needed management of tags 144 | files in Vim. It will (re)generate tag files as you work while staying 145 | completely out of your way. It will even do its best to keep those tag files 146 | out of your way too. It has no dependencies and just works. This plugin wasn't 147 | modified but have some custom configuration in `.vimrc` file. 148 | 149 | ### IndentLine 150 | 151 | Webpage: https://github.com/Yggdroot/indentLine 152 | 153 | This plugin is used for displaying thin vertical lines at each indentation 154 | level for code indented with spaces. This plugin wasn't modified but have some 155 | custom configuration in `.vimrc` file. 156 | 157 | ### MW-Utils 158 | 159 | Webpage: https://github.com/marcweber/vim-addon-mw-utils 160 | 161 | vim: interpret a file by function and cache file automatically. This plugin 162 | wasn't modified. This plugin is required for SnipMate plugin to work. 163 | 164 | ### NERDTree 165 | 166 | Webpage: https://github.com/scrooloose/nerdtree 167 | 168 | The NERDTree is a file system explorer for the Vim editor. Using this plugin, 169 | users can visually browse complex directory hierarchies, quickly open files 170 | for reading or editing, and perform basic file system operations. This plugin 171 | can also be extended with custom mappings using a special API. This plugin 172 | wasn't modified but have some custom configuration in `.vimrc` file. 173 | 174 | ### Plug 175 | 176 | Webpage: https://github.com/junegunn/vim-plug 177 | 178 | A minimalist Vim plugin manager. This wasn't modified. This plugin is 179 | required to load other plugins included in bundle. Required configuration 180 | of this plugin is in `.vimrc` file. 181 | 182 | ### QuickUI 183 | 184 | Webpage: https://github.com/skywind3000/vim-quickui 185 | 186 | Adds some basic UI components to the Vim/NeoVim. This plugin wasn't modified 187 | but have some custom configuration in `.vimrc` file. 188 | 189 | ### Rainbow Parentheses Improved 190 | 191 | Webpage: https://github.com/luochen1990/rainbow 192 | 193 | Updated version of Rainbow Parenthesis. Help you read complex code by showing 194 | diff level of parentheses in diff color. This plugin wasn't modified but have 195 | some custom configuration in `.vimrc` file. 196 | 197 | ### Robovim 198 | 199 | Webpage: https://github.com/thindil/robovim 200 | 201 | Robovim is simple Vim plugin which allow easier add Robodoc formatted 202 | documentation to source code. This plugin wasn't modified. 203 | 204 | ### Signify 205 | 206 | Webpage: https://github.com/mhinz/vim-signify 207 | 208 | Signify (or just Sy) uses the sign column to indicate added, modified and 209 | removed lines in a file that is managed by a version control system (VCS). 210 | This plugin wasn't modified but have some custom configuration in `.vimrc` 211 | file. 212 | 213 | ### SnipMate 214 | 215 | Webpage: https://github.com/garbas/vim-snipmate 216 | 217 | SnipMate aims to provide support for textual snippets, similar to TextMate or 218 | other Vim plugins like UltiSnips. This plugin wasn't modified. 219 | 220 | ### Snippets 221 | 222 | Webpage: https://github.com/honza/vim-snippets 223 | 224 | This repository contains snippets files for various programming languages. 225 | It is community-maintained and many people have contributed snippet files and 226 | other improvements already. 227 | 228 | ### Startify 229 | 230 | Webpage: https://github.com/mhinz/vim-startify 231 | 232 | This plugin provides a start screen for Vim. It provides dynamically created 233 | headers or footers and uses configurable lists to show recently used or 234 | bookmarked files and persistent sessions. All of this can be accessed in a 235 | simple-to-use menu that even allows opening multiple entries at once. This 236 | plugin wasn't modified. 237 | 238 | ### Tlib 239 | 240 | Webpage: https://github.com/tomtom/tlib_vim 241 | 242 | This library provides some utility functions. This plugin wasn't modified. The 243 | plugin is required by SnipMate to work. 244 | 245 | ### Todo.txt 246 | 247 | Webpage: https://github.com/dbeniamine/todo.txt-vim 248 | 249 | Todo.txt-vim is a plugin to manage todo.txt files it was initially designed by 250 | Freitass then forked and improved by David Beniamine. This plugin wasn't 251 | modified. 252 | 253 | ### Vista 254 | 255 | Webpage: https://github.com/liuchengxu/vista.vim 256 | 257 | View and search LSP symbols, tags in Vim/NeoVim. This plugin wasn't modified 258 | but have some custom configuration in `.vimrc` file. 259 | 260 | ### Xml 261 | 262 | Webpage: https://github.com/thindil/vim-xml 263 | 264 | This is just one line setting to enable spellchecking in XML files too. 265 | 266 | ### Zeavim 267 | 268 | Webpage: https://github.com/KabbAmine/zeavim.vim 269 | 270 | Zeavim allows to use the offline documentation browser [Zeal](http://zealdocs.org/) 271 | from Vim. This plugin wasn't modified but have some custom configuration in 272 | `.vimrc` file. 273 | 274 | ### PaperColor 275 | 276 | Webpage: https://github.com/NLKNguyen/papercolor-theme 277 | 278 | Used as default theme for Vim/NeoVim. Comes in two versions: dark (default if 279 | you use included `.vimrc` configuration file) and light (default for no 280 | configuration). This version has a bit better support for the Ada and Tcl 281 | syntax, also some custom configuration is in `.vimrc` file. 282 | 283 | ### Gruvbox8 284 | 285 | Webpage: https://github.com/lifepillar/vim-gruvbox8 286 | 287 | Another theme available with this pack. More information about this theme, 288 | configuring and enabling it, you can find at its webpage. 289 | 290 | ------- 291 | 292 | That's probably all, feel free to use project Issues if you have any 293 | problems, questions, ideas or bug reports about this pack. 294 | 295 | Bartek thindil Jasicki 296 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | " -------------------------------- 2 | " General Vim/NeoVim configuration 3 | " -------------------------------- 4 | " Enable plugins and indentation 5 | filetype plugin indent on 6 | " Turn on file syntax 7 | syntax enable 8 | " Auto read file from disk if it was changed somewhere outside editor 9 | set autoread 10 | " Set default dictionary for spellchecker as English 11 | set spelllang=en 12 | " Number of spaces that Tab in the file counts for 13 | set tabstop=3 14 | " Number of spaces used for each stem of (auto)indent 15 | set shiftwidth=3 16 | " Use spaces instead Tab 17 | set expandtab 18 | " Insert blanks according to earlier Tab settings 19 | set smarttab 20 | " Show command line 21 | set showcmd 22 | " Update search pattern matches when typing 23 | set incsearch 24 | " Highlight all matches for search pattern 25 | set hlsearch 26 | " Ignore case in search patterns 27 | set ignorecase 28 | " Override 'ignorecase' option if search pattern contains upper case characters 29 | set smartcase 30 | " Show line and column number 31 | set ruler 32 | " Enable mouse in any mode (text, GUI) 33 | set mouse=a 34 | " Hide mouse pointer when typing 35 | set mousehide 36 | " Copy indent from current line to new line 37 | set autoindent 38 | " Do smart autoindenting when starting new line 39 | set smartindent 40 | " Wrap lines longer than screen width 41 | set wrap 42 | " No compatibility with vi 43 | set nocp 44 | " Use directory related to buffer for file browser 45 | set browsedir=buffer 46 | " Directories where swap file will be placed 47 | set directory=~/tmp,/var/tmp,/tmp 48 | " Default character encoding for new files 49 | set encoding=utf-8 50 | " Always show status line (for airline) 51 | set laststatus=2 52 | " Don't show mode in last line 53 | set noshowmode 54 | " Where to search for tags file (from current directory up) 55 | set tags=./tags;/ 56 | " Show line number, go recursive and use regular expressions for :grep command 57 | set grepprg=grep\ -nre 58 | " Amount of millisecs between saves of swap file to disk. Needed for some 59 | " plugins 60 | set updatetime=100 61 | " Highlight line with cursor 62 | set cursorline 63 | " Set fold level. All higher level fold that this will be closed. 64 | set foldlevel=99 65 | " Start terminal window in insert mode 66 | autocmd TermOpen * startinsert 67 | 68 | " ------------------------------------ 69 | " General Vim-Ada bundle configuration 70 | " ------------------------------------ 71 | " This lines are required to run whole bundle. 72 | " 73 | " Installation part. You can delete it after installing all plugins, except 74 | " setting for g:plug_path. 75 | " Set paths for Vim 76 | if !has("nvim") 77 | let s:plug_file = '~/.vim/autoload/plug.vim' 78 | let g:plug_path = '~/.vim/plugged' 79 | " Set paths for NeoVim 80 | else 81 | let s:plug_file = '~/.local/share/nvim/site/autoload/plug.vim' 82 | let g:plug_path = '~/.local/share/nvim/plugged' 83 | endif 84 | " Install vim-ada and after it, all others plugins 85 | if empty(glob(s:plug_file)) 86 | silent exe "!curl -fLo " . s:plug_file . " --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" 87 | autocmd VimEnter * PlugInstall vim-ada --sync 88 | endif 89 | " End of installation part of Vim-Ada. 90 | 91 | " ****f* .vimrc/UpdatePlug 92 | " FUNCTION 93 | " Update selected plugin with local changes after installation or upgrade 94 | " SOURCE 95 | function! UpdatePlug(info) 96 | if a:info.status != "unchanged" || a:info.force 97 | silent exe "!git apply " . glob(g:plug_path . '/vim-ada/patches/' . a:info.name . ".diff") 98 | endif 99 | endfunction 100 | 101 | " ****f* .vimrc/UpdateAllPlugs 102 | " FUNCTION 103 | " Update all plugins if needed after update vim-ada 104 | " SOURCE 105 | function! UpdateAllPlugs(info) 106 | if a:info.status != "unchanged" 107 | PlugInstall! --sync 108 | silent! source $MYVIMRC 109 | endif 110 | endfunction 111 | 112 | " Set auto-completion to Ale 113 | let g:ale_completion_enabled = 1 114 | 115 | " Start Plug 116 | call plug#begin(g:plug_path) 117 | " Vim-ada plugin 118 | Plug 'thindil/vim-ada', { 'do': function('UpdateAllPlugs')} 119 | " A.vim plugin 120 | Plug 'thindil/a.vim' 121 | " Ada-Bundle plugin 122 | Plug 'thindil/Ada-Bundle' 123 | " Vim-XML plugin 124 | Plug 'thindil/vim-xml' 125 | " Airline plugin 126 | Plug 'vim-airline/vim-airline' 127 | " Auto-pairs plugin 128 | Plug 'jiangmiao/auto-pairs' 129 | " Gutentags plugin 130 | Plug 'ludovicchabant/vim-gutentags' 131 | " indentLine plugin 132 | Plug 'Yggdroot/indentLine' 133 | " MWUTils plugin, needed by Snipmate 134 | Plug 'marcweber/vim-addon-mw-utils' 135 | " Nerdtree plugin 136 | Plug 'scrooloose/nerdtree' 137 | " RainbowParenthesisImproved plugin 138 | Plug 'luochen1990/rainbow' 139 | " Robovim plugin 140 | Plug 'thindil/robovim' 141 | " Snipmate plugin 142 | Plug 'garbas/vim-snipmate' 143 | " Snippets plugin, needed by Snipmate 144 | Plug 'honza/vim-snippets' 145 | " Startify plugin 146 | Plug 'mhinz/vim-startify' 147 | " Vista plugin 148 | Plug 'liuchengxu/vista.vim' 149 | " Tlib plugin, needed by Snipmate 150 | Plug 'tomtom/tlib_vim' 151 | " Zeavim plugin 152 | Plug 'KabbAmine/zeavim.vim' 153 | " AnyFold plugin 154 | Plug 'pseewald/vim-anyfold' 155 | " Todo.txt plugin 156 | Plug 'dbeniamine/todo.txt-vim' 157 | " Grammarous plugin 158 | Plug 'rhysd/vim-grammarous' 159 | " Signify plugin 160 | Plug 'mhinz/vim-signify' 161 | " EasyMotion plugin 162 | Plug 'easymotion/vim-easymotion' 163 | " QuickUi plugin 164 | Plug 'skywind3000/vim-quickui' 165 | " Gruvbox theme 166 | Plug 'lifepillar/vim-gruvbox8' 167 | " Papercolor theme with local changes 168 | Plug 'NLKNguyen/papercolor-theme', { 'do': function('UpdatePlug') } 169 | " Ale plugin with local changes 170 | Plug 'dense-analysis/ale', { 'do': function('UpdatePlug') } 171 | " End of Plug configuration 172 | call plug#end() 173 | 174 | " Don't go further if plugins are not installed. You can delete this lines 175 | " after installation. 176 | if empty(glob(g:plug_path . '/vim-ada')) 177 | finish 178 | endif 179 | 180 | " -------------------------------------------- 181 | " General configurations for installed plugins 182 | " -------------------------------------------- 183 | " Use special patched fonts 184 | let g:airline_powerline_fonts = 1 185 | " Enable colouring brackets 186 | let g:rainbow_active = 1 187 | " Block ale checking files on text changed (in fly) 188 | let g:ale_lint_on_text_changed = 0 189 | " Block ale checking files on quit Insert mode 190 | let g:ale_lint_on_insert_leave = 0 191 | " Block ale checking files on load file 192 | let g:ale_lint_on_enter = 0 193 | " Set full path to your ada_language_server command for ale 194 | let g:ale_ada_lsp_executable = "ada_language_server" 195 | " Enable gnatmake and ada language server as linters for Ada 196 | let g:ale_linters = { 197 | \ 'ada': ['gnatmake', "adals"], 198 | \} 199 | " Enable gnatpp for ALEFix 200 | let g:ale_fixers = { 201 | \ 'ada': ['gnatpp'], 202 | \} 203 | " Use default theme color for showing indent level 204 | let g:indentLine_setColors = 0 205 | " Add syntax support for GNAT project files 206 | let g:ada_with_gnat_project_files = 1 207 | " Add highlighting for GNAT extensions (attributes, pragmas, etc) 208 | let g:ada_gnat_extensions = 1 209 | " Map some file types to search in specific docsets: 210 | " 1. Search in Ada specification docset if file type is ada 211 | let g:zv_file_types = { 212 | \ 'ada' : 'ada', 213 | \ } 214 | " Generate tags files with additional field language. Additionally, don't 215 | " generate tags for Ada code 216 | let g:gutentags_ctags_extra_args = ['--fields=+l', '--exclude=*.adb', '--exclude=*.ads'] 217 | " Don't generate tags when opening Ada files 218 | let g:gutentags_exclude_filetypes = ['ada'] 219 | " Don't generate tags for files in the selected directories 220 | let g:gutentags_ctags_exclude = ['bin', 'obj', 'tests', 'docs', 'others'] 221 | " Set default vista executive to Ale for Ada 222 | let g:vista_executive_for = { 223 | \ 'ada': 'ale', 224 | \ } 225 | " Close tree window or bookmark table after opening a file 226 | let g:NERDTreeQuitOnOpen = 1 227 | " Change the default Signify sign for changed lines 228 | let g:signify_sign_change = '~' 229 | " Use the newer version of SnipMate parser 230 | let g:snipMate = { 'snippet_version' : 1 } 231 | " Reset QuickUi menus 232 | call quickui#menu#reset() 233 | " Add QuickUi menu Plugins 234 | call quickui#menu#install('&Plugins', [ 235 | \ [ '&NerdTree', 'NERDTreeToggle' ], 236 | \ [ '&Vista', 'Vista!!' ], 237 | \ [ '&Startify', 'Startify' ], 238 | \ [ 'Check &Grammar', 'GrammarousCheck' ], 239 | \ [ 'Reset G&rammar', 'GrammarousReset' ], 240 | \ ]) 241 | " Add QuickUi menu View 242 | call quickui#menu#install('&View', [ 243 | \ [ '&Buffers', "call quickui#tools#list_buffer('e')" ], 244 | \ [ '&Terminal', 'terminal' ], 245 | \ [ '&Split terminal', 'sp +terminal' ], 246 | \ ]) 247 | " Add QuickUi menu Ada 248 | call quickui#menu#install('&Ada', [ 249 | \ [ '&Compile', 'make' ], 250 | \ [ '&Format', 'ALEFix' ], 251 | \ [ '&Go to definition', 'ALEGoToDefinition' ], 252 | \ [ '&Show definition', 'ALEHover' ], 253 | \ [ 'Search &Ada specification', 'Zeavim!' ], 254 | \ ], '', 'ada') 255 | " Add QuickUi menu Help 256 | call quickui#menu#install('&Help', [ 257 | \ [ '&Index', "help index | only" ], 258 | \ [ '&Tutorial', "Tutor" ], 259 | \ [ '&Ale', "help ale | only" ], 260 | \ [ '&Anyfold', "help anyfold | only" ], 261 | \ [ '&EasyMotion', "help easymotion | only" ], 262 | \ [ '&NerdTree', "help nerdtree | only" ], 263 | \ [ '&Snippets', "help snippets | only" ], 264 | \ ]) 265 | " Show QuickUi menus tooltips 266 | let g:quickui_show_tip = 1 267 | " Set QuickUi menus theme to papercolor dark 268 | let g:quickui_color_scheme = 'papercol dark' 269 | " Set QuickUi menus border style 270 | let g:quickui_border_style = 2 271 | " Enable AnyFold for any file type 272 | augroup anyfold 273 | autocmd! 274 | autocmd Filetype * AnyFoldActivate 275 | augroup END 276 | " Disable AnyFold plugin for large files (more than 1000000 bytes), use then 277 | " standard folding 278 | let g:LargeFile = 1000000 279 | autocmd BufReadPre,BufRead * let f=getfsize(expand("")) | if f > g:LargeFile || f == -2 | call LargeFile() | endif 280 | function LargeFile() 281 | augroup anyfold 282 | autocmd! 283 | autocmd Filetype * setlocal foldmethod=indent 284 | augroup END 285 | endfunction 286 | 287 | " ------------------------------ 288 | " GVim specific settings 289 | " ------------------------------ 290 | if has("gui_running") 291 | " Show only menu, hide buttons, etc 292 | set guioptions=aegimLt 293 | " Hide menu with F11 key 294 | nnoremap :if &go=~#'m'set go-=melseset go+=mendif 295 | endif 296 | 297 | " -------------------------------- 298 | " NeoVim specific settings 299 | " -------------------------------- 300 | if has("nvim") 301 | " By default, use standard clipboard 302 | set clipboard+=unnamedplus 303 | " Go to last visited line in file on load file to NeoVim 304 | :au BufReadPost * 305 | \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' 306 | \ | exe "normal! g`\"" 307 | \ | endif 308 | endif 309 | 310 | " --------------------------------- 311 | " General setting for color schemes 312 | " --------------------------------- 313 | " Set dark background 314 | set background=dark 315 | " Set color scheme 316 | colorscheme PaperColor 317 | 318 | " --------------------- 319 | " Commands abbrevations 320 | " --------------------- 321 | " Abbreviation for open/close NERDTree 322 | cnoreabbrev nt NERDTreeToggle 323 | " Abbreviation for open/close Vista 324 | cnoreabbrev tb Vista!! 325 | " No more unknown command during saving files 326 | cnoreabbrev W w 327 | " Activate AnyFold plugin for the selected buffer 328 | cnoreabbrev af AnyFoldActivate 329 | " Open terminal window in split mode 330 | cnoreabbrev Term :sp +term 331 | 332 | " ------------------ 333 | " Keyboard shortcuts 334 | " ------------------ 335 | " Show QuickUI menu 336 | noremap :call quickui#menu#open() 337 | " Show QuickUI list of buffers 338 | noremap :call quickui#tools#list_buffer('e') 339 | -------------------------------------------------------------------------------- /doc/plug.txt: -------------------------------------------------------------------------------- 1 | plug.txt plug Last change: November 27 2017 2 | PLUG - TABLE OF CONTENTS *plug* *plug-toc* 3 | ============================================================================== 4 | 5 | vim-plug 6 | Pros. 7 | Installation 8 | Vim 9 | Unix 10 | Windows (PowerShell) 11 | Neovim 12 | Unix 13 | Windows (PowerShell) 14 | Getting Help 15 | Usage 16 | Example 17 | Commands 18 | Plug options 19 | Global options 20 | Keybindings 21 | Example: A small sensible Vim configuration 22 | On-demand loading of plugins 23 | Post-update hooks 24 | PlugInstall! and PlugUpdate! 25 | Articles 26 | License 27 | 28 | VIM-PLUG *vim-plug* 29 | ============================================================================== 30 | 31 | A minimalist Vim plugin manager. 32 | 33 | https://raw.githubusercontent.com/junegunn/i/master/vim-plug/installer.gif 34 | 35 | 36 | < Pros. >_____________________________________________________________________~ 37 | *plug-pros* 38 | 39 | - Easier to setup: Single file. No boilerplate code required. 40 | - Easier to use: Concise, intuitive syntax 41 | - {Super-fast}{1} parallel installation/update (with any of `+job`, `+python`, 42 | `+python3`, `+ruby`, or {Neovim}{2}) 43 | - Creates shallow clones to minimize disk space usage and download time 44 | - On-demand loading for {faster startup time}{3} 45 | - Can review and rollback updates 46 | - Branch/tag/commit support 47 | - Post-update hooks 48 | - Support for externally managed plugins 49 | 50 | {1} https://raw.githubusercontent.com/junegunn/i/master/vim-plug/40-in-4.gif 51 | {2} http://neovim.org/ 52 | {3} https://github.com/junegunn/vim-startuptime-benchmark#result 53 | 54 | 55 | < Installation >______________________________________________________________~ 56 | *plug-installation* 57 | 58 | {Download plug.vim}{4} and put it in the "autoload" directory. 59 | 60 | {4} https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 61 | 62 | 63 | Vim~ 64 | *plug-vim* 65 | 66 | 67 | >> Unix~ 68 | > 69 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ 70 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 71 | < 72 | You can automate the process by putting the command in your Vim configuration 73 | file as suggested {here}{5}. 74 | 75 | {5} https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation 76 | 77 | 78 | >> Windows (PowerShell)~ 79 | > 80 | md ~\vimfiles\autoload 81 | $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 82 | (New-Object Net.WebClient).DownloadFile( 83 | $uri, 84 | $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( 85 | "~\vimfiles\autoload\plug.vim" 86 | ) 87 | ) 88 | < 89 | 90 | Neovim~ 91 | *plug-neovim* 92 | 93 | 94 | >> Unix~ 95 | > 96 | curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ 97 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 98 | < 99 | 100 | >> Windows (PowerShell)~ 101 | > 102 | md ~\AppData\Local\nvim\autoload 103 | $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 104 | (New-Object Net.WebClient).DownloadFile( 105 | $uri, 106 | $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( 107 | "~\AppData\Local\nvim\autoload\plug.vim" 108 | ) 109 | ) 110 | < 111 | 112 | < Getting Help >______________________________________________________________~ 113 | *plug-getting-help* 114 | 115 | - See {tutorial}{6} page to learn the basics of vim-plug 116 | - See {tips}{7} and {FAQ}{8} pages for common problems and questions 117 | - See {requirements}{9} page for debugging information & tested configurations 118 | - Create an {issue}{10} 119 | 120 | {6} https://github.com/junegunn/vim-plug/wiki/tutorial 121 | {7} https://github.com/junegunn/vim-plug/wiki/tips 122 | {8} https://github.com/junegunn/vim-plug/wiki/faq 123 | {9} https://github.com/junegunn/vim-plug/wiki/requirements 124 | {10} https://github.com/junegunn/vim-plug/issues/new 125 | 126 | 127 | < Usage >_____________________________________________________________________~ 128 | *plug-usage* 129 | 130 | Add a vim-plug section to your `~/.vimrc` (or `~/.config/nvim/init.vim` for 131 | Neovim): 132 | 133 | *plug#begin* *plug#end* 134 | 135 | 1. Begin the section with `call plug#begin()` 136 | 2. List the plugins with `Plug` commands 137 | 3. `call plug#end()` to update 'runtimepath' and initialize plugin system 138 | - Automatically executes `filetype plugin indent on` and `syntax enable`. 139 | You can revert the settings after the call. e.g. `filetype indent off`, 140 | `syntax off`, etc. 141 | 142 | 143 | Example~ 144 | *plug-example* 145 | > 146 | " Specify a directory for plugins 147 | " - For Neovim: ~/.local/share/nvim/plugged 148 | " - Avoid using standard Vim directory names like 'plugin' 149 | call plug#begin('~/.vim/plugged') 150 | 151 | " Make sure you use single quotes 152 | 153 | " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align 154 | Plug 'junegunn/vim-easy-align' 155 | 156 | " Any valid git URL is allowed 157 | Plug 'https://github.com/junegunn/vim-github-dashboard.git' 158 | 159 | " Multiple Plug commands can be written in a single line using | separators 160 | Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' 161 | 162 | " On-demand loading 163 | Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } 164 | Plug 'tpope/vim-fireplace', { 'for': 'clojure' } 165 | 166 | " Using a non-default branch 167 | Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } 168 | 169 | " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) 170 | Plug 'fatih/vim-go', { 'tag': '*' } 171 | 172 | " Plugin options 173 | Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } 174 | 175 | " Plugin outside ~/.vim/plugged with post-update hook 176 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } 177 | 178 | " Unmanaged plugin (manually installed and updated) 179 | Plug '~/my-prototype-plugin' 180 | 181 | " Initialize plugin system 182 | call plug#end() 183 | < 184 | *:PlugInstall* 185 | 186 | Reload .vimrc and `:PlugInstall` to install plugins. 187 | 188 | 189 | < Commands >__________________________________________________________________~ 190 | *plug-commands* 191 | 192 | ------------------------------------+------------------------------------------------------------------- 193 | Command | Description ~ 194 | ------------------------------------+------------------------------------------------------------------- 195 | `PlugInstall [name ...] [#threads]` | Install plugins 196 | `PlugUpdate [name ...] [#threads]` | Install or update plugins 197 | `PlugClean[!]` | Remove unlisted plugins (bang version will clean without prompt) 198 | `PlugUpgrade` | Upgrade vim-plug itself 199 | `PlugStatus` | Check the status of plugins 200 | `PlugDiff` | Examine changes from the previous update and the pending changes 201 | `PlugSnapshot[!] [output path]` | Generate script for restoring the current snapshot of the plugins 202 | ------------------------------------+------------------------------------------------------------------- 203 | 204 | 205 | < Plug options >______________________________________________________________~ 206 | *plug-options* 207 | *:Plug* 208 | 209 | ------------------------+----------------------------------------------- 210 | Option | Description ~ 211 | ------------------------+----------------------------------------------- 212 | `branch` / `tag` / `commit` | Branch/tag/commit of the repository to use 213 | `rtp` | Subdirectory that contains Vim plugin 214 | `dir` | Custom directory for the plugin 215 | `as` | Use different name for the plugin 216 | `do` | Post-update hook (string or funcref) 217 | `on` | On-demand loading: Commands or -mappings 218 | `for` | On-demand loading: File types 219 | `frozen` | Do not update unless explicitly specified 220 | ------------------------+----------------------------------------------- 221 | 222 | 223 | < Global options >____________________________________________________________~ 224 | *plug-global-options* 225 | 226 | *g:plug_threads* *g:plug_timeout* *g:plug_retries* *g:plug_shallow* *g:plug_window* 227 | *g:plug_pwindow* *g:plug_url_format* 228 | 229 | --------------------+-----------------------------------+----------------------------------------------------------------------------------- 230 | Flag | Default | Description ~ 231 | --------------------+-----------------------------------+----------------------------------------------------------------------------------- 232 | `g:plug_threads` | 16 | Default number of threads to use 233 | `g:plug_timeout` | 60 | Time limit of each task in seconds (Ruby & Python) 234 | `g:plug_retries` | 2 | Number of retries in case of timeout (Ruby & Python) 235 | `g:plug_shallow` | 1 | Use shallow clone 236 | `g:plug_window` | `vertical topleft new` | Command to open plug window 237 | `g:plug_pwindow` | `above 12new` | Command to open preview window in `PlugDiff` 238 | `g:plug_url_format` | `https://git::@github.com/%s.git` | `printf` format to build repo URL (Only applies to the subsequent `Plug` commands) 239 | --------------------+-----------------------------------+----------------------------------------------------------------------------------- 240 | 241 | 242 | < Keybindings >_______________________________________________________________~ 243 | *plug-keybindings* 244 | 245 | *:PlugStatus* *:PlugDiff* 246 | 247 | - `D` - `PlugDiff` 248 | - `S` - `PlugStatus` 249 | - `R` - Retry failed update or installation tasks 250 | - `U` - Update plugins in the selected range 251 | - `q` - Close the window 252 | - `:PlugStatus` 253 | - `L` - Load plugin 254 | - `:PlugDiff` 255 | - `X` - Revert the update 256 | 257 | 258 | < Example: A small sensible Vim configuration >_______________________________~ 259 | *plug-example-a-small-sensible-vim-configuration* 260 | > 261 | call plug#begin() 262 | Plug 'tpope/vim-sensible' 263 | call plug#end() 264 | < 265 | 266 | < On-demand loading of plugins >______________________________________________~ 267 | *plug-on-demand-loading-of-plugins* 268 | > 269 | " NERD tree will be loaded on the first invocation of NERDTreeToggle command 270 | Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } 271 | 272 | " Multiple commands 273 | Plug 'junegunn/vim-github-dashboard', { 'on': ['GHDashboard', 'GHActivity'] } 274 | 275 | " Loaded when clojure file is opened 276 | Plug 'tpope/vim-fireplace', { 'for': 'clojure' } 277 | 278 | " Multiple file types 279 | Plug 'kovisoft/paredit', { 'for': ['clojure', 'scheme'] } 280 | 281 | " On-demand loading on both conditions 282 | Plug 'junegunn/vader.vim', { 'on': 'Vader', 'for': 'vader' } 283 | 284 | " Code to execute when the plugin is lazily loaded on demand 285 | Plug 'junegunn/goyo.vim', { 'for': 'markdown' } 286 | autocmd! User goyo.vim echom 'Goyo is now loaded!' 287 | < 288 | `for` option is generally not needed as most plugins for specific file types 289 | usually don't have too much code in `plugin` directory. You might want to 290 | examine the output of `vim --startuptime` before applying the option. 291 | 292 | 293 | < Post-update hooks >_________________________________________________________~ 294 | *plug-post-update-hooks* 295 | 296 | There are some plugins that require extra steps after installation or update. 297 | In that case, use `do` option to describe the task to be performed. 298 | > 299 | Plug 'Shougo/vimproc.vim', { 'do': 'make' } 300 | Plug 'ycm-core/YouCompleteMe', { 'do': './install.py' } 301 | < 302 | If the value starts with `:`, it will be recognized as a Vim command. 303 | 304 | *:GoInstallBinaries* 305 | > 306 | Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } 307 | < 308 | If you need more control, you can pass a reference to a Vim function that 309 | takes a single argument. 310 | > 311 | function! BuildYCM(info) 312 | " info is a dictionary with 3 fields 313 | " - name: name of the plugin 314 | " - status: 'installed', 'updated', or 'unchanged' 315 | " - force: set on PlugInstall! or PlugUpdate! 316 | if a:info.status == 'installed' || a:info.force 317 | !./install.py 318 | endif 319 | endfunction 320 | 321 | Plug 'ycm-core/YouCompleteMe', { 'do': function('BuildYCM') } 322 | < 323 | Both forms of post-update hook are executed inside the directory of the plugin 324 | and only run when the repository has changed, but you can force it to run 325 | unconditionally with the bang-versions of the commands: `PlugInstall!` and 326 | `PlugUpdate!`. 327 | 328 | Make sure to escape BARs and double-quotes when you write `do` option inline 329 | as they are mistakenly recognized as command separator or the start of the 330 | trailing comment. 331 | > 332 | Plug 'junegunn/fzf', { 'do': 'yes \| ./install' } 333 | < 334 | But you can avoid the escaping if you extract the inline specification using a 335 | variable (or any Vimscript expression) as follows: 336 | 337 | *g:fzf_install* 338 | > 339 | let g:fzf_install = 'yes | ./install' 340 | Plug 'junegunn/fzf', { 'do': g:fzf_install } 341 | < 342 | 343 | < PlugInstall! and PlugUpdate! >______________________________________________~ 344 | *pluginstall-and-plugupdate* 345 | 346 | The installer takes the following steps when installing/updating a plugin: 347 | 348 | 1. `git clone` or `git fetch` from its origin 349 | 2. Check out branch, tag, or commit and optionally `git merge` remote branch 350 | 3. If the plugin was updated (or installed for the first time) 351 | 1. Update submodules 352 | 2. Execute post-update hooks 353 | 354 | The commands with `!` suffix ensure that all steps are run unconditionally. 355 | 356 | 357 | < Articles >__________________________________________________________________~ 358 | *plug-articles* 359 | 360 | - {Writing my own Vim plugin manager}{11} 361 | - {Vim plugins and startup time}{12} 362 | - ~~{Thoughts on Vim plugin dependency}{13}~~ 363 | - Support for Plugfile has been removed since 0.5.0 364 | 365 | {11} http://junegunn.kr/2013/09/writing-my-own-vim-plugin-manager 366 | {12} http://junegunn.kr/2014/07/vim-plugins-and-startup-time 367 | {13} http://junegunn.kr/2013/09/thoughts-on-vim-plugin-dependency 368 | 369 | 370 | < License >___________________________________________________________________~ 371 | *plug-license* 372 | 373 | MIT 374 | 375 | 376 | ============================================================================== 377 | vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: 378 | --------------------------------------------------------------------------------