How to display line numbers by default in SciTE? - scite

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

Related

VFP font size in command window

In the VFP development environment both the command window and any code windows which are open display characters in Courier font, possible 10 pt. I would like to reduce the size of these characters, to see more lines on the screen.
Have tried going into Tools | Options | IDE and have changed several font specifications (for Desktop, Program files, Code Windows, Procedures), clicked on 'Apply' in an attempt to reduce the size of these character on the screen. This has not been successful.
How can I reduce the font size used for code when I am editing it, please?
Check the Override individual settings checkbox on the Options | IDE tab. Otherwise, if you've previously edited a particular PRG, you'll see the font you used then.
For the Command Window, right-click, Properties to set the font.
Most of the time, I use the default, but occasionally I change it by right-clicking within the MODIFY COMMAND window I'm working in, going into "Properties...", and changing the font size. It only applies when editing that filename, though. Many years ago I think I tried changing it globally, as you seem to have, and remember it not 'sticking', so henceforth I always changed it on a file-by-file basis when I needed to.
I think what you are looking for is under Tools / Options / EDITOR tab, and save whatever defaults you want and set as Default.
Additionally, another thing I have done this in the past and created my own master settings resource file. By default when you start VFP, a "resource" file is set to ex: C:\Program Files\VFP\blah\FoxUser.dbf (and the corresponding .fpt file)
What I would do is this. Use the resource file and make an EMPTY copy of it to a new location, such as the working folder of your project.
use ( sys(2005)) again alias tmpResource
copy structure to MyVFPResource
set resource to MyVFPResource
close tables all
The resource file keeps track of almost every thing you open / work with and retains settings such as window area, position, etc. Some things I like to have as a "default", such as when editing snippet methods in screen or class designer. Such as to always have the row/column of a file displayed, have other settings.
An example of common .prg files. Do a simple MODI COMM MyTest.prg. Then once a simple .prg file is open, go to Edit, then Properties. Click on all the settings you want (including font size, line/column, syntax coloring, tabs vs space preferences, etc. Click the checkbox for "Apply to .PRG files". and click ok.
Now, open your resource file AGAIN so you can see what is stored.
use ( sys(2005)) again alias tmpResource
BROWSE
You will see many rows, but at the bottom will be the most recent entries. You should see 3 records listed as "WINDMODIFY" which represents the "MODIFY COMMAND" of whatever prg file. Now, open the "Name" memo field. One will be listed as .prg, another will be "DEFAULT", and the last will be the actual "mytest.prg" you started with. Get on the "DEFAULT" version record. Now you can change the "READONLY" column from FALSE to TRUE (F/T) and it will lock these settings for ALL .prg files. You can then delete the other rows.
You can apply these same principles to modifying form code snippets. Open a form, double-click on any method, then EDIT / Properties, do the same, but checkbox for "Apply to method code".
Browse the resource file and look at the "WINDSNIP" rows. Again, look for "DEFAULT" and mark that readonly as .T. and you can delete the other. The resource file will literally save every snippet window specific to the form, object, method, etc.
Do the same for visual class file editing too.
Similarly can be done for toolbars and more as you browse and see. When you are done making all the changes you want, purge out all the other fluff, close the resource file and set it to read-only so no additional garbage gets pulled into it.
If you need to change in the future, make the table editable again, make changes, then readonly the table again.
Then, all you have to do is at VFP start, do
set resource to MyVFPResource

Typo3 : using typoscript to modify the base-url

I am trying out TYPO3's introduction package. For that I am using Xampp on my computer.
I have installed it in a subdirectory, but since it uses "real-url", I need to modify the generated links, so that instead of http://localhost/about-typo3/ I get http://localhost/subfolder/about-typo3/
I believe it must be done via "typo-script", and from what I have read on the Internet, this line should do the job :
config.baseURL = http://localhost/subfolder/
But I don't know where I should put it. I have tried different locations, but with no apparent effect.
So what I would like to know is : am I on the good path for what I need to do, and if yes, what should I try now ?
This is a bug in the 4.6 Introduction Package. 4.7 will ship with a correct version, so you might just want to go ahead and try the Introduction Package from 4.7RC2 (Preview Releases).
For now, just choose Template in the module menu on the left. Then use the dropdown to select Constant Editor. Now choose the page HOME in the pagetree on the middle.
Now use the second dropdown to select CONFIG. There modify the topmost setting Absolute URI prefix. Input your full domain without the last slash (/). That means copy your current URL from the browser and strip /typo3/backend.php. Now save with the little save icon in the top toolbar.
This will also invalidate all caches for you (because you changed the topmost template). No need to install extra extensions or to do this manually.
Alternative you can fix the actual bug. Go to template module and select the folder TypoScript Templates / page_configuration. Now select Info/Modify instead of Constant Editor and directly above the table page.config. The click the pencil left of Setup. Find the line absRefPrefix = {$config.absRefPrefix}/. This should be around line 62 (4.7RC2). Remove the last slash (/) from that line and save. Because you are not on the topmost template, you need to clear the cache. On the topright of your screen, you can find the yellow flash icon. Click it and select Clear all caches (red flash). Now go to you website again.
A general note about (config.)baseURL. This is more a hack, because it just tells the browser to behave as if the website would be at another place. The correct way is to create correct links in first place. You should use (config.)absRefPrefix instead. To make this work in auto mode, it must be completely empty (config.absRefPrefix =).
Do not use baseURL any more. The next Introduction Package will not have this setting.
Yet another note: If you use the config.absRefPrefix, you have to include the last slash (/). The only reason why you do not have to do so above (in the constants), is because it is hardcoded in the template and thus also preventing the automatic detection to work.
If you are using different hosts, you can use typoscript conditions in your root template:
# Default:
config.baseURL = http://www.example.com/
[globalString = ENV:HTTP_HOST=sub1.example.com]
config.baseURL = http://sub1.example.com/
[global]
[globalString = ENV:HTTP_HOST=sub2.example.com]
config.baseURL = http://sub2.example.com/
[global]
if you are using introduction package. there is Constant for set the base url
Go to 'Template' and 'Constant Editor.. you can find 'Domain name for Base URL [config.domain]' .. for setting base url
also you can put the
config.baseURL = http://localhost/subfolder/
on 'Info Modify' Setup field
hope will help you .. sorry for my bad english

VIM folding for ERB files?

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.

Not working tab configuration in VIM for Javascript files in Rails project

I am trying to set some tab indent configurations in Vim. Unfortunately I can't get it working.
In my last line I use
u FileType javascript set tabstop=4
in the hope of having the tab width set to 4.
But when I open a .js file and press tab it inserts only 2 spaces. I tried to comment out the other whitespace stuff without success.
Here is also my full vimrc: https://gist.github.com/919909
How do I set the tabs and so on for Javascript files, and why does the above not work?
Update
The problem seems to be somewhere else as when editing new Javascript files it works as expected. It only seems to behave differently on the Javascript files in my Rails project.
How could that be? I have a Rails.vim plugin installed, could that be the cause?
'tabstop' is the number of spaces a tab character in the file counts for. The number of spaces of an indentation level is set with the 'shitfwidth' option, and the number of spaces that a tab counts for when doing edit operations is set with 'softtabstop'. It's a little complicated, but if you set both 'shitfwidth' and 'softtabstop' to the same value, you'll probably get what you want. You can keep 'tabstop' at the default value.
If you are one of those that like spaces all the time and not tabs, you these settings will probably suit you.
The Rails plugin is probably setting some of these leading to the different behavior you're experiencing.
Ok, the root of the problem seems to be in Rails.vim (see https://github.com/tpope/vim-rails/pull/78)
But there is also this easy solution:
autocmd User Rails/**/*.js set tabstop=4

How do I make Beyond Compare ignore certain differences while comparing versions of Delphi Form Files

I use Beyond Compare (version 3.1.10) to compare different versions of Delphi Form Files, but I don't want to see differences concerning ExplicitTop, ExplicitLeft, ExplicitHeight and ExplicitWidth.
Details:
These lines will always begin with a number of whitespace characters, then "ExplicitXXX = " and a number. Older versions of Delphi didn't have these lines, so I want to ignore differences where these lines are added to the newest version, and I also want to ignore differences where the number has changed.
Does anyone know how to do this?
Edit:
Duplicate (more or less) of:
How do I configure BeyondCompare to ignore SCM replaced text in comments?
Load a pair of DFM files showing the difference.
Click the Session Settings button (aka Rules w/ umpire icon) or use the Session->Session Settings menu item.
Switch to the Importance tab then click the Edit Grammar... button to open a second dialog.
Click the New... button below the top listbox to open a third dialog.
Change the Element Name option to something like Explicit*, change the Text Matching to Explicit(Left|Top|Width|Height) = \d+ and check the Match character case and Regular expression checkboxes, then click Ok, then click Ok again in the second dialog.
Explicit* should now appear in the original dialog's Grammar Elements list. Uncheck it, then change the combobox at the bottom of the dialog from Use for this view only to Update session defaults.
I don't use Beyond Compare, but if you want to have newer versions of Delphi stop adding the (IMO useless) Explicit* properties, you can use Andreas Hausladen's DDevExtensions
In my case (C#), I wanted to ignore the entire line which contained namespaces (and thus, using's) which I changed.
(Referenced Walkthrough - Ignore entire line if text exist in line
ie.
namespace INSERT.NAMESPACE.HERE
changed to
namespace INSERT.NAMESPACE.HERE.NEW
To do that
In step 5. of Craig's solution, change the Text Matching to
" .\*INSERT.NAMESPACE.HERE.\* "
(include the quotes)
That's it.
Craig Peterson's answer is correct.
N.B. However! The tab 'importance' is not always visible from Session/Session-settings. Always, from inside a Folder list view, it will not be there. It seems there are certain filetypes that do not have it either, though I'm less clear on that. BC has so many options and plugins I bet there is a workaround, but for me I have been ok so far.
http://www.scootersoftware.com/vbulletin/showthread.php?t=8457

Resources