How to use a hyphen as the second character of a Vim-Plug plugin - neovim

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.

Related

PhpStorm Formatter failed to format the document

Similar questions have been asked, but what makes mine different is that I seem to have the configuration correct. Here is my configuration (my name has been redacted, for privacy reasons).
What I know is that my PhpStorm IDE has not been activated yet; is that required or is my configuration incorrect, despite the folder and file being at these places?
So you're trying to use PhpStorm from within VSCode to format your files. Which means: calling PhpStorm as a command-line app.
I'm pretty sure that PhpStorm has to have a valid active licence or be in the evaluation period (so it has be "activated" in some way). I remember seeing tickets with similar issue when using PhpStorm for code inspections in Continuous Integration tools.
In any case:
Check what command VSCode is trying to execute here, then open your OS console and try to run it there -- will you see any errors/warnings in the output?
If you do not see any such messages there then check the idea.log file -- the IDE will write everything there for sure.
On Windows it would normally be in the C:\Users\USERNAME\AppData\Local\JetBrains\PhpStorm2022.2\log folder (for the current 2022.2 version). Other OS / cusom location -- check https://www.jetbrains.com/help/phpstorm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#logs-directory
...or is my configuration incorrect, despite the folder and file being at these places?
As per docs the Code Style settings file can be located anywhere: it can be in the default place as well as any other as it can be passed as an argument in the command line (-s parameter). So keeping the file with Code Style settings in the VSCode extension folder is OK as long as that parameter is used.

Netbeans, phpdocumentor, and custom phpdoc.dist.xml by project

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?

error using doxygen and graphViz: problems opening map file

I'm using Doxygen-1.8.7, which i have downloaded from official website in dmg version. I'm using 10.9.3 MacOS. I have installed graphviz 2.38.0.0 via macports.
I use Doxygen GUI to configure it and run. Everything works great, if i choose "use build-in diagram generator". But when i use dot tool, i get this:
error: problems opening map file
/Users/pavelantonov/qtProjects/doxygen/result/11-06
1207/html/inherit_graph_21.map for inclusion in the docs!
I've tried to change SHORT_NAMES and FULL_PATH_NAMES as i find in solution from 2008, but it doesn't help.
GraphViz/bin is in paths.
There are no white spaces in *.dot names.
I got this message 'problem opening map file for inclusion in the docs', if doxygen is not able to find graphviz/dot in the path.
Try setting the path explicitly using DOT_PATH in the doxyfile.
As albert, already mentioned remove any whitespace in the path to the output path.
Another good idea is to completely remove your output directory, e.g. html, and regenerate your documentation.
It also seems that doxygen is for activating dot.exe space sensitive. Make sure your path is like this or at least without whitespaces:
D:/Graphviz2.38/bin
based on experience of Graphviz 2.38 on windows 10
The following method worked for me on Windows 10 with Doxygen 1.8.14.
Open cmd and type dot -c. Then, delete the doxygen output folder and regenerate it.
Make sure you have graphviz in your path. My graphviz is installed at C:\Program Files\Graphviz 2.44.1. So, there is no problem, even if spaces are there.

js source maps disappears after modifying any file

I have a project with coffeescript and brunch.
There is following config for files concatenation:
files:
javascripts:
joinTo:
'js/app.js': /^app(\/|\\)(?!templates)/
'js/vendor.js': /^vendor/
templates:
joinTo:
'js/templates.js': /^app\/templates/
When I just clone this project and build it, all works fine - I see all my source files in developer console.
Then I do some harmless modifications in any file in project (like adding a useless variable declaration or duplicating "return" statement), and strange things happens:
A builded code is valid and works fine, but there are no source maps available.
If I disable source maps at all, I still can see some wrong behaviour:
And in the same time, origin build file is absolutely valid (can't post third link, sorry): it has '//# sourceMappingURL=app.js.map' line in the end, without any trailing spaces or whatever else.
Any ideas what can this be and how to solve this problem?
I've found where I was wrong.
First. About broken files loaded by browser.
As I noticed in comment above, the problem was in environment. My files are served by nginx, running inside Vagrant VM - and it seems, that sync between local files and VM was broken.
My solution was following:
disable caching in VirtualBox (machine settings -> tab 'Storage' -> select controller -> uncheck 'Use Host I/O cache');
edit nginx config and set 'sendfile off' option in 'http' section.
Not sure this is absolutely right solution, but after this correct files was loaded by browser.
Second. About still absent maps for app.js in Chrome.
It's just my inattention. I'm using Webstorm, and periodically it proposes to enable watcher for coffeescript files I open. And if you agree (what I've accidentally did missing 'Agree' button instead of 'Dismiss'), it will compile that file at his own, creating .map and .js files alongside origin .coffee - of course, no matter to your brunch or whatever else settings. These additional files are displayed as subfolders of .coffee file, so it is very likely that you do not notice them. And exactly these files Chrome does not like. Until you remove them all, Chrome will not display any source maps, no matter to .map file created by brunch - while for FF it's not a problem.

Temporarily disable some plugins using pathogen in vim.

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.