Comments (2)
this plugin currently has no way to declare the plugin configuration between
plug#begin()
andplug#end()
You can put plugin configuration anywhere in your Vim configuration file because most Vim plugins are configured via global variables (i.e. let g:something_something = ...
). Here is an excerpt from my configuration. I'm using an extra indentation level to clarify the structure.
Plug 'tpope/vim-commentary'
map gc <Plug>Commentary
nmap gcc <Plug>CommentaryLine
Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' }
let g:undotree_WindowLayout = 2
nnoremap U :UndotreeToggle<CR>
Plug 'inkarkat/vim-ReplaceWithRegister'
Plug 'AndrewRadev/splitjoin.vim'
let g:splitjoin_split_mapping = ''
let g:splitjoin_join_mapping = ''
nnoremap gss :SplitjoinSplit<cr>
nnoremap gsj :SplitjoinJoin<cr>
Plug 'AndrewRadev/switch.vim'
let g:switch_mapping = '-'
let g:switch_custom_definitions = [
\ ['MON', 'TUE', 'WED', 'THU', 'FRI']
\ ]
Plug 'sgur/vim-editorconfig'
" Browsing
Plug 'Yggdroot/indentLine', { 'on': 'IndentLinesEnable' }
autocmd! User indentLine doautocmd indentLine Syntax
let g:indentLine_color_term = 239
let g:indentLine_color_gui = '#616161'
But if your plugin is configured via an autoload function (i.e. call something#setup(...)
), the function is not available before plug#end()
. in that case you can circumvent the limitation using autoload VimEnter
.
Plug 'junegunn/vim-after-object'
autocmd VimEnter * silent! call after_object#enable('=', ':', '#', ' ', '|')
from vim-plug.
I tried your reply, it works.
I always thought that it is not possible to put statements between plug#begin()
and plug#end().
Thank you!
from vim-plug.
Related Issues (20)
- Multiple post install commands with "do" HOT 3
- PowerShell automatic installation script. HOT 1
- vim-plug buffer inside popup window HOT 4
- How to use submodules with vim-plug HOT 1
- Error when running :PlugUpgrade HOT 3
- PlugUpdate/PlugUpgrade FATAL: Could not read from remote repository HOT 1
- Activate plugin only if executable is installed HOT 1
- Vim plug and lua plugins: calling setup & config functions HOT 1
- PlugClean fails to recover when remote renamed default branch HOT 2
- How to pass configuration options (opts) to plugins? HOT 1
- PlugUpdate revert HOT 1
- (Re)load *.lua in addition to *.vim HOT 3
- Lua support? HOT 2
- Vin Plug installation problem in windows OS
- Manage the configs for each vim-plugged plugin in a separate file.
- On demand loading with user defined commands? HOT 2
- error message on opening .vimrc HOT 1
- Installation fails(?) on neovim 0.9.5 on Macos HOT 3
- Improve for https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation-of-missing-plugins HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-plug.