I think I have a bug in one plugin. I would like to load only this plugin, without having to delete all the other bundles in my pathogen's bundle folder, to debug.
Is it possible?
The easiest method to disable a plugin when you use Pathogen is by adding it's bundle name to the g:pathogen_disabled variable, before starting pathogen.
So an example from my own vimrc
" To disable a plugin, add it's bundle name to the following list
let g:pathogen_disabled = []
" for some reason the csscolor plugin is very slow when run on the terminal
" but not in GVim, so disable it if no GUI is running
if !has('gui_running')
call add(g:pathogen_disabled, 'csscolor')
endif
" Gundo requires at least vim 7.3
if v:version < '703' || !has('python')
call add(g:pathogen_disabled, 'gundo')
endif
if v:version < '702'
call add(g:pathogen_disabled, 'autocomplpop')
call add(g:pathogen_disabled, 'fuzzyfinder')
call add(g:pathogen_disabled, 'l9')
endif
call pathogen#infect()
Update: Another method, supported by Pathogen, is to simply rename the directory for the bundle you want to disable so that it ends in a tilde (~). So to disable the autocomplpop bundle, simply rename it to autocomplpop~.
vim -u NONE -N will load vim with no plugins, with no settings from your .vimrc. You could then :source /path/to/plugin/you-want.vim inside vim to load the one plugin you want loaded.
vim --noplugin
In this case vim will not load any plugins but your vimrc will be used.
After you can load your plugin in vim:
:source 'your plugin path'
Why not just:
rename the current bundle directory
create a new empty bundle directory
put your test plugin files into the new bundle dir?
When done put everything back the way it was. (The suggested method of loading Vim without plugins and sourcing the plugin file would work if it's a simple one-file plugin, but if you're doing an ftplugin then moving dirs around is probably best way and not that hard.)
You could rename the specific plugin by putting a tilde sign ~ after its original name.
Every plugin folders within the bundle with the tilde sign ~ at the end will not be loaded by the pathogen.
Related
In my init.vim file, I'm trying to load my default .vimrc from a github repo (so that I can load the same customization file from anywhere). However, the second character of my github username is a hyphen and when I try to include it in the string to source it as a pluggin, the syntax highlighting makes it seem like it escapes the string (this doesn't appear to be the case for echo so it seems related to the Plug command perhaps).
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
call plug#begin(stdpath('config') . '/plugged')
Plug 'j-ace-svg/vimrc.vim'
call plug#end()
If I ignore it as messed up syntax highlighting and still try to run it, it doesn't register the Plugin. If I try to escape it it still doesn't register the Plugin, and using double quotes doesn't work because it's registered as a comment (see here). Is something wrong in the way I'm trying to load the plugin?
Edit: After completely reinstalling my WSL Ubuntu (where I'm running neovim), I copied this back into my init.vim and it appears to work, the syntax highlighting is still weird but it correctly installed my vimrc and then the rest of my plugins from there
Edit 2: The same problem reappeared, and it turns out it's due to the fact that I was loading plugins in two locations (my init.vim and my .vimrc) so the init.vim plugin list was getting overridden, hence my .vimrc not appearing in my plugin list.
I was loading plugins both in my init.vim and in my .vimrc, which I loaded as a plugin, so the plugin list in my init.vim was getting overridden. The fix was to have a git repo with my .vimrc—which I had anyways since I had to edit it—and then source that .vimrc file from my init.vim, rather than loading it as a plugin.
I am using Netbeans 8.0.2 and phpdocumentor 2.8.2 on a windows 7 platform.
I would like to use custom phpdoc.dist.xml config files by project so I can specify framework directories and etc. to exclude from the generated doc. I also want to keep my Netbeans PHPDOC plugin config as generic as possible, without specific output directories, ignore options, config path parameters, etc., so on, so that that the config will apply to all my projects.
The phpdoc.dist.xml file works great. The doc generated is exactly what I want.
The problem or feature, and it seems to be a phpdocumentor one as it also applies from plain command line, is that the phpdoc.bat command (without a specific config parm) has to be run from the same root directory as the phpdoc.dist.xml file, or it ignores it. No problem if I'm using command line as I can change into that directory first, but I would like to use Netbeans. I have searched on this extensively and cannot find an answer.
I considered whether to modify the phpdocumentor files to insert cd /D path/to/myproject/dir to change the directory using some Netbeans variable to represent myproject/dir, but I could not find the right place in the code or the variable to use. Plus, then I'm supporting a custom mod to phpdocumentor.
I did find these directions for a PHPStorm setup, where the author specified a PHPStorm variable for the --config command line option to point to his custom phpdoc.dist.xml.
--config="$ProjectFileDir$/phpdoc.dist.xml"
If I could do the same in Netbeans like maybe "${BASE_DIR}/phpdoc.dist.xml" it would be great, but so far I haven't hit on anything Netbeans will recognize/pay attention to in the PhpDoc script: box.
I have also tried writing a wrapper .bat file to capture my own command line variable %1 and do the directory change to that before calling phpdoc.bat, but Netbeans throws and error and says that's not a valid .bat file. I cannot find any phpdocumentor parameter to configure by specific Netbeans project but the output directory. And I would prefer not to be defining a bunch of projects on subdirectories in Netbeans, just to address phpdocumentor.
Now I am out of ideas. Can anyone point me to a solution?
I've recently installed RubyMine on a second machine and cloned a GitHub repository there.
My application runs exactly the same as on the first machine, but the RM code inspection result is radically different: I get dozens of "No such file to load" errors.
This even though the application runs fine both from the command line and from RM.
In dialog Run/Debug Configurations, I have specified load paths (-I. -I..) in the Ruby arguments.
Does the code inspection not honor the configuration? Or perhaps it's using a different configuration?
A bit late, but you may need to mark the directories that are load path roots in your app within the Rubymine tree - right click and do "Mark Directory As/Load Path Root".
For me the other solutions did not work. However, the problem was that RubyMine detected the wrong ruby version - while rvm for the project was ruby 2.4.1, in RubyMine it defaulted to the last version it had (2.4.2). So going to RubyMine > Preferences > Ruby SDK & Gems and changing the version for the project to the correct one solved it.
If you use the "Mark Directory As/Load Path Root" action, this will apply for IDE autocompletion only. It will not be propagated onto the interpreter (as it would be in PyCharm with Python).
You have to either keep using the -I switch, or configure $LOAD_PATH in your code, or (preferably) set up a Gem project with bundler support. You can then configure the path in a gemspec file. See https://www.jetbrains.com/help/ruby/creating-gem-project.html.
Sources:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206741945-Load-Path-not-working-at-all-
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206727915-Building-RubyGems-lib-in-load-path-
You can try changing Project Path Mappings and set relative Local Path and Remote Path to get it to work.
I'm having trouble running a coffeescript configuration with webstorm. If I enable the coffeescript plugin in the run configuration I get the following error
/usr/bin/coffee app.coffee
env: node: No such file or directory
I tried the solution in the support forums of adding my path variable to the environment variables but still no fix.
Because, the executable file is not found yet.
Goto Terminal and type: echo NODE_PATH or echo $NODE_PATH to see where is the file.
On windows, C:\Users[YOUR_USER_NAME]\AppData\Roaming\npm\node_modules\coffee-script\bin\coffee
So, use Spotlight search tool to have a look at /usr/local/npm ..... or somewhere else.
Try to pass absolute path to your app.js. Webstorm sometimes mess with relative paths.
On Windows, I had a lot of trouble with this, you must find your "coffee" file. BTW, this could help you too.
After you installed Node.js and installed the CoffeScript plugin:
Download the last version (or source) from CoffeeScript.org
Unzip it wherever you want. In my case I unzipped the jashkenas-coffeescript-1.10.0-0-gf26d33d.tar.gz on D:\tools\
Check 'Run with CoffeeScript plugin'
Target the coffee executable on menu 'Run > Edit Configurations...':
I've been working on expanding my vim-foo lately and I've run across a couple of plugins (autotag.vim for example) that require them to be "sourced" in my .vimrc file. What exactly does this mean and how do I do it?
Sourcing a file is 'executing' it. Essentially, each line of the file is considered a command. Sourcing it is the same as typing each command in order. You source with the command :source (usually shortened to :so).
So if you source myStuff.vim
:so myStuff.vim
and if myStuff.vim contained these lines
set xx iI just intersted this<C-]>
set yy bbbb4dw
It's the same as if you typed those commands into Vim
:set xx iI just intersted this<C-]>
:set yy bbbb4dw
The only file sourced by default is the .vimrc(_vimrc on windows) so that's a place you can keep all the commands you use to set up Vim every time.
Where it gets interesting is the fact that since a sourced file is just a series of commands, and sourcing is a command, you can source files from your source files. So plugins you use every time could be sourced when you start up Vim by adding a line to your .vimrc like this
so myPlugin.vim
Files in your .vim/plugin directory are sourced (loaded) automatically.
There is always the :source file command. I usually write .vimrc that contains custom commands and what not for the console application and then a .gvimrc that contains additional goodies that are appropriate for a windowed version. My .gvimrc starts with source $HOME/.vimrc to pick up everything from the console version before adding in new stuff.
There are normally two vimrc files, one is _vimrc and the other _gvimrc (in the first one are the things for vim, and in the second for gvim - graphical things) - although most people I know just put everything in _vimrc.
A good practice is to keep all your extra files (plugins, colorschemes, snippets ...) in a separate (your own) vimfiles directory (which you can take with you).
If you do
:help vimfiles
vim will tell your vimfiles directory should be located. It depends somewhat on the platform (win, unix). On windows the usual is in your user folder (documents and settings, then user ...).
In vimfiles directory there are a couple of subdirectories. Amongst them is the "plugin" subdirectory. Plugins put in that dir will be loaded automatically (also plugins put in subdirectories of "plugin").
If you do not wish to load it automatically, just put it in your "vimfiles", or some other directory, and
:so plugin_name.vim (with the appropriate path)
(you can use the $vim, $vimfiles, and $home as shortcuts when defining path to plugin)