How do I find all possible configs in coala? - linter

In coala, the code analysis software (https://github.com/coala/coala), what's the easiest way to find a list of all the bears/plugins and the list of the configurations ?
Also, how do I get a list of all possible configurations available by all possible bears that I have installed ? I want to understand all the possible options coala has and enable the bears for those specific configs I need.

You can run:
$ coala --show-bears
to get the whole list of bears installed in your system. If you want more details (such as bear description, settings, supported languages and so on), you can add the --show-details flag:
$ coala --show-bears --show-details
There's also web documentation available at bear-docs. It is categorized by language and each bear has its own documentation page too: for example, PEP8Bear.

You can find list of all bears here:
http://coala.io/#!/languages
When you click on a bear, you will see all optional and non-optional settings.

All possible bears in a language, goto
https://coala.io/#/languages
and type in the programming/scripting language name in the search bar to get the list.
All installed bears:
coala --show-bears
with details:
coala --show-bears --show-details
with descriptions(one-liners):
coala --show-bears --show-description

Related

How to respond automaticly with properties file to a yeoman prompt

When i run a app generator many question is ask by the prompt.
How can i run the "yo" command with, for example, a file with the answers for generate the app automatically without user interaction ?
Thanks
Yeoman supports options and arguments http://yeoman.io/authoring/user-interactions.html
You can skip prompts when an option is provided instead. But this needs to be done manually by the generator author at the moment.
You can check the source code of generator-node and see how it is done over there: https://github.com/yeoman/generator-node/blob/master/generators/app/index.js
A custom adapter can be used to provide answers to questions. This does require creating a new executable though, as the yo command does not support custom adapters.
Find an example of an adapter that answers questions at https://github.com/OctopusSamples/content-team-apps/blob/main/js/octopus-template-generator/src/domain/yeoman/adapter.ts.

Awesome desktop manager widgets

I came upon this problem before, but only now it really renders awesome desktop manager useless.
I was searching how to connect to Wifi with awesome. Found Gigamo Wifi Widget. Cool, how do I eat it?
The awesome wiki entry on widgets does not really answer this question.
I know my question is very stupid and the answer is somewhere in the documentation but I have no idea how to read it. How and where do I add widgets I find on the Net to my awesome lua files?
EDIT:
when searching where is the rc.lua file henfiber mentioned, I came upon Archlinux wiki on Awesome, which put most important things in one page.
You can always use NetworkManager which is available for installation in most official repos. It contains an applet which creates an icon at your system tray. You can launch the applet at start-up, placing this line in your rc.lua file:
awful.util.spawn("nm-applet")
or you can start it manually from your terminal, writing:
$ nm-applet &
Then you can left-click at the NetworkManager Applet icon at the system tray and select from the list of available wifi access points. Additionally, the Network manager applet allows you to perform more advanced functions, like connecting to VPN.
Also, it is quite easy to use 3rd-party widgets you find in the wiki or in github. It requires these steps:
Download the widget .lua file - let's say it is called
cool_widget.lua
move it in ~/.config/awesome/ so it is :
~/.config/awesome/cool_widget.lua
An alternative is to use the structure
~/.config/awesome/cool_widget/init.lua
it is better when your widget requires more than one files.
Load the widget at the top of your rc.lua file:
cool_widget = require("cool_widget")
Add the widget in a wibox (toolbar) in the same way you add built-in
ones

can i change VIMRUNTIM if i want to move/usr/share/vim/vim71 to other path?

if yes, how to change such variable?
should i modify vimrc? but vimrc is in $VIMTIME, if i changed it, how vim find it?
i maybe have lots copies of VIMRUNTIME, and i hope that i can switch to different VIMRUNTIMEs easily, how to make this done.
anybody here who have ever tried to do this?
btw, there are lots of .vim files inside $VIMRUNTIME, are they all vim plugins? is .vim files all writen in vimscript? what vimscript can do and what it cannot? why not all vim plugins implemented using .vim? since i find some vim plugin also use script language such as perl or python...
The gory details are documented under :help startup, but you rarely need to modify $VIMRUNTIME. You didn't mention why you would want to do this, but it's probably a bad idea.
If you don't want to set the VIMRUNTIME environment variable in the shell from which you launch Vim, you can modify it in a user-specific ~/.vimrc (via :let $VIMRUNTIME = '/path/to/it'), because that one is read before the system-wide configuration.
The runtime files contain the help documents, default configuration, filetype detections and syntax highlightings. You can add your own extensions (e.g. downloads from http://www.vim.org) in ~/.vim/.... As I said, there should be no need to mess with the system-wide runtime; this is managed by your system's package management.

How can I see all available reltool overlay template variables?

I have a fairly standard OTP setup with rebar and reltool. I've setup reltool to use a vars.config to swap in overlay template variables with {overlay_vars, "files/vars.config"}. I've noticed that variables other than what I have listed in vars.config also work as overlay template variables, the most obvious one of which is {{erts_vsn}}.
I assume there are other built-in variables; how do I find what they are? I've combed the reltool docs and come up with nothing.
I believe that your answer is in Rebar's rebar_reltool module.
There, you find the definition for:
erts_vsn
rel_vsn
target_dir

How to make RSense autocomplete and jump to definitions of a rails project?

I switched from netbeans to emacs and I am pretty happy with the change. The thing I am missing the most is autocompletion and jump to definitions. In order to get this I have installed Rsense. It works fine for the gems code, though, I cannot jump-to-definitions of my Rails project nor autocomplete according to the methods I defined.
I tried to add my project's load path to Rsense's load_path configuration, though, it still doesn't work.
Does anyone know how to get this working?
You can use tags for browsing through files and jumping directly to function definitions.
I use Exuberant Ctags (its got Ruby support). You can download it from here.
I am assuming that you are working on windows. Getting the tags to work initially on windows is a pain especially if you are using emacs for the first time.
These are the steps I followed:
Install Cygwin from here.
Include the cygwin\bin\ folder in your environment variable PATH. E.g. here
Install exhuberant ctags. Note that emacs may sometime have a built in ctags. Later on you will have to use the ctags command in cygwin to create tags. At that time you may encounter some errors in case it uses the ctags in emacs instead of exuberant ctag.
Once you have installed ctags, add that to the environmental variable PATH as well.
If you have a small project with relatively lesser number of files (<500). So you just need a single global TAGS file. For that open cygwin, change your directory to the root directory of your project and type in the command ctags -R -e Check this out for other approaches
Your tags file will be created. It will be named "TAGS" and will be present in the root directory of your project.
Next open emacs, and browse through the code. In case you come across a function and want to jump to its definition, put your cursor on the function name and press M-. your minibuffer should then show something like Find tag (default <function-name>): Press Enter and voila!!! you are magically transported to the function definition!!!
Note: You may have to specify the TAGS file the first time you use the M-. This needs to be done only once after emacs startup. You can also modify your .emacs file to take in the TAGS file automatically on startup.
Refer to this and this for more info for tags related commands in emacs.
Until now, I have been using rtags to jump to definitions. It's not perfect, but it does the trick in many cases.

Resources