Is there a way to set up certain defaults in the debugger? I'm not finding a way to do this..
create the file ~/.rdebugrc
add this:
set autolist
set autoeval
set autoreload
credit to (and more info) here: http://pivotallabs.com/users/chad/blog/articles/366-ruby-debug-in-30-seconds-we-don-t-need-no-stinkin-gui-
Related
is it possible to rename the report default folder ?
I don't want to have "YYYYMMDDHHMI", I'm trying to rename it to something simple and constant. Thanks
This is controlled by the timestampedReports parameter. If you set it to false pitest will use a constant location.
Vim noob here. I have code folding working in most places, via indent mode, but for some reason I cannot get Vim to fold .html.erb files in ruby... even with indents.
Here's the relevant region of my vimrc. Is there something else I need to do to make Vim aware of the erb files? Is it possible to customize my folding per file type?
I'm running all the Janus plugins, so have rails.vim, etc. all installed.
let ruby_fold=1
set foldmethod=indent
set foldcolumn=0
set foldlevel=99
nnoremap <space> za<cr>
It's a difficult question, because there's probably something in your vim configuration that inhibits folding and I, for example, can't reproduce it. But I can suggest a few things you could try.
First of all, check what the values of those settings are in the actual buffer. Meaning, open up an erb file and check if the settings are correct. In order to do that, you can type, for example, set foldmethod, which will echo the current value of foldmethod to the screen. If one of the settings doesn't match the ones in your .vimrc, then that might be the problem.
Also, see if the file really does have the "eruby" filetype. If it's not displayed in your statusline, you could check that with set filetype.
Most importantly, one way of customizing settings per filetype is by creating a file with the filetype's name inside the ~/.vim/ftplugin directory. In your case, you can create the file ~/.vim/ftplugin/eruby.vim and put any filetype-specific settings in it. Setting them with setlocal instead of set will keep them local to the file. If it turns out the settings for erb are off, you can "fix" them by putting the values you want there.
Basically, I know I can go through my control panel and modify the path variable. But, I'm wondering if there is a way to through batch programming have a temporary path included? That way it is only used during that batch file execution. I don't want to have people go in and modify their path variables just to use my batch file.
Just like any other environment variable, with SET:
SET PATH=%PATH%;c:\whatever\else
If you want to have a little safety check built in first, check to see if the new path exists first:
IF EXIST c:\whatever\else SET PATH=%PATH%;c:\whatever\else
If you want that to be local to that batch file, use setlocal:
setlocal
set PATH=...
set OTHERTHING=...
#REM Rest of your script
Read the docs carefully for setlocal/endlocal , and have a look at the other references on that site - Functions is pretty interesting too and the syntax is tricky.
The Syntax page should get you started with the basics.
There is an important detail:
set PATH="C:\linutils;C:\wingit\bin;%PATH%"
does not work, while
set PATH=C:\linutils;C:\wingit\bin;%PATH%
works. The difference is the quotes!
UPD also see the comment by venimus
That's right, but it doesn't change it permanently, but just for current command prompt.
If you wanna to change it permanently you have to use for example this:
setx ENV_VAR_NAME "DESIRED_PATH" /m
This will change it permanently and yes, you can overwrite it in another batch script.
I am using the lightweight SciTE Text editor and I like it very much.
I would like to configure it in order to see the line numbers displayed when I open it.
I don't want to check the "View\Line Number" menu every time.
I think that I can do it but I don't see the entry in my global options file. Does anybody know how to do it?
Try this in SciTEGlobal.properties:
# Sizes and visibility in edit pane
line.margin.visible=1
line.margin.width=5
# Sizes and visibility in edit pane
line.margin.visible=1
line.margin.width=2+ # + will expand if needed
Having seen the other answers i would say it is more "clean" to save to User options file, because it is a user setting and you might also transfer this setting together with your home directory f.e. when you migrate or copy it for other reason. Also in this cases your scite would still behave like YOU (and possibly other users) expect.
add this line to User options file ".SciTEUser.properties":
line.margin.visible=1
line.margin.width=0+ # + will expand if needed
additional comment:
for my taste the font of scite in linux is too small and therefore i also added these lines to .SciTEUser.properties:
magnification=1
output.magnification=1
I have a few of my own constants in symfony, and I need to make them available throughout the application, where to best define them?
I tried, in the directory myapps\config\config.php, define my constant in this way:
sfConfig::set('aaa', 'mya');
But when I tried to access the constant in myapps\apps\frontend\modules\login\actions\actions.class.php, using this comand
sfConfig::get('aaa')
I simply get a null, indicating that it hasn't been defined.
How and where to define symfony constant so that it is accessible throughout the whole project?
This is how I solved the problem:
Put the following into my myapp/apps/frontend/config/app.yml:
all:
.app_set:
bpobackend: me
bpoRedirectScreen: allow
Then in action module, call the var_dump to check the value
var_dump(sfConfig::get('app_bpobackend'));
looks like you are trying to use symfony 1.0 style configuration with symfony 1.1 or 1.2. all config.php files have been removed in 1.1. see Overview of the Configuration Files for what to use instead. and always be sure to look at the documentation for the proper version (1_2 (or whatever version you are using) in the url).
I have tried to add constant in the config.php in Symfony 1.0..
So If you want to add constant variables in config.php then
sfConfig::add(array('SF_DEFAULT_DATEFORMAT' => 'dd-MM-yyyy'));
This is the code where I have define the date format with name 'SF_DEFAULT_DATEFORMAT'...
So You can Tried with this One ...