How can I disable automatic highlighting of the current line in Geany? - highlight

By default the current line is always highlighted in the Geany text editor. How can we disable this feature?

Go to menu Tools → Configuration Files → filetypes.common.
Find the word current_line, and then change that line on the third parameter to false:
current_line=0x000000;0xf0f0f0;false;

Related

Xcode change Command+click to Control+click

I want to change the default shortcut key for open the relevant source code (now it is Command+click) to Control+click (like other IDE: Eclipse,AndroidStudio)
I have tried to find in Xcode->Preference->Key Bindings but can not find the command for change Command+click
How can I change it. Any help or suggestion would be great appreciated.
For Xcode only , you can't change Command + Click to Control + Click.
If you want to change your MAC Shortcut Key then you can Change it from
Goto System Preference -> Keyboard -> Modify Keys then update your shortcut key according to your preference.
Go to Xcode->Preference->Key Bindings, search for Jump to Definition. Update the shortcut key according to your preference.
go to Xcode -> Preferences and select Navigation tab. In the Command-click on Code: change it to Jump to Definition from Selects Code Structure.

Change the encoding of a file in Visual Studio Code

Is there any way to change the encoding of a file?
For example UTF-8 to ISO 8859-1?
Setting Example Sublime Text:
"default_encoding": "UTF-8"
So here's how to do that:
In the bottom bar of VSCode, you'll see the label UTF-8. Click it. A
popup opens. Click Save with encoding. You can now pick a new
encoding for that file.
Alternatively, you can change the setting globally in Workspace/User settings using the setting "files.encoding": "utf8". If using the graphical settings page in VSCode, simply search for encoding. Do note however that this only applies to newly created files.
Apart from the settings explained in the answer by #DarkNeuron:
"files.encoding": "any encoding"
you can also specify settings for a specific language like so:
"[language id]": {
"files.encoding": "any encoding"
}
For example, I use this when I need to edit PowerShell files previously created with ISE (which are created in ANSI format):
"[powershell]": {
"files.encoding": "windows1252"
}
You can get a list of identifiers of well-known languages here.
The existing answers show a possible solution for single files or file types. However, you can define the charset standard in VS Code by following this path:
File > Preferences > Settings > Encoding > Choose your option
This will define a character set as default.
Besides that, you can always change the encoding in the lower right corner of the editor (blue symbol line) for the current project.

Sublime Text selection using Lua/love2d

say i have this line of code :
Object.Property.field;
Object.Property:FunctionName();
in all my sublime languages if i was to double click "Property" on either line, it would select just that word.
For some reason my lua/lua love2d syntax highlighting selects the whole line up to the ":"
How can I change this behavior, so it will only select the single word?
The reason this is occurring is because of a somewhat strange addition to the Lua Love plugin, which I assume you're using. You're using Sublime 2, so select Preferences -> Browse Packages... to open up your Packages folder, then open the Lua Love subfolder. There is a file called completions.py, which has this content:
#completions.py
import sublime
import sublime_plugin
import re
class LoveCompletions(sublime_plugin.EventListener):
ST = 3000 if sublime.version() == '' else int(sublime.version())
def on_query_completions(self, view, prefix, locations):
if self.ST < 3000 and ("lua" in view.scope_name(locations[0])):
seps = view.settings().get("word_separators")
seps = seps.replace('.', '')
view.settings().set("word_separators", seps)
Even if you don't know Python, the logic is pretty easy to follow. It sets the variable ST to Sublime's version, which is 3000+ if you're using ST3 (current build is 3061), and is 2221 (I think) for ST2. It then sets up an event listener (the process is always running in the background) checking to see if the Sublime version is less than 3000 (you're using ST2) and you have lua in your current scope (basically, your file is source.lua or source.lua.love, if you're using the plugin's language definition). If both of those are true, it removes the . character from your "word_separators" setting, which is defined in Preferences -> Settings-Default and can be overridden in Preferences -> Settings-User.
The word_separators setting controls what characters are considered to be word separators when double-clicking to select a word. Its default value is ./\\()\"'-:,.;<>~!##$%^&*|+=[]{}`~? so, for example, if you double-click on the foo part of foo-bar Sublime will only select foo, but if you double-click on the foo part of foo_bar Sublime will select the whole thing (since - is in word_separators). . is in word_separators by default, so double-clicking on foo in foo.bar will only select foo, which is expected behavior for most people, I would assume. However, this cute little plugin removes . from word_separators in Sublime Text 2, so in your case clicking on Property selects everything from the beginning of the "word" (the whitespace before Object) to the next word separator - the :, in the case of your second example.
OK, so we know what the problem is, how do we fix it? First, while you're in Packages/Lua Love, just delete completions.py altogether. There's no harm in doing so, and in fact it's actually causing harm by being there. Make sure you restart Sublime after deleting the file. Next, open Preferences -> Settings-User and add . back into the word_separators list, anywhere between the beginning and ending double-quotes. Save that file, go back to your source code, and double-clicking should once again behave normally.
Good luck!
EDIT
I submitted this pull request to delete the completions.py file from the plugin's Github repo, and it was just merged, so hopefully users in the future won't have to deal with this :)

TFS shortcut to compare a modified file with the latest version

Right now I have to pull up Pending Changes window, right-click on the file and select Compare->With Latest Version... Is there a faster way to look at my modifications?
Keyboard Shortcut for doing TFS Compare
In the Team Explorer window under Pending Changes:
shift + enter on file
will compare the files
shift + double click on file
will compare file in background
Create visual studio mapping for the commands:
Set the shortcut for compare folder under Source Control
Explorer, you should set the shortcut keys for File.TfsFolderDiff
command.
Set the shortcut for compare specific file under
Source Control Explorer, you should set the shortcut keys for
File.TfsCompare command
Note: To set the keyboard shortcuts, open "Tools > Options". In the dialog that opens, go to "Keyboard". Example:
Note: The folder compare shortcut is only valid from the "Source Control Explorer". It is the same as right clicking in the "Source Control Explorer" and selecting "Compare...".
References:
Keyboard shortcut for File Compare?
Comparison keyboard shortcuts for Pending Changes in TFS by Alex Meyer-Gleaves.
How to Double Click to Diff Pending Changes in TFS by Richard Banks
TFS Shortcut to do a diff on all modified files with latest version
You can switch the double-click behaviour in the pending changes window to do a compare with latest by changing a registry setting:
Path: HKCU\Software\Microsoft\VisualStudio\<ver>\
TeamFoundation\SourceControl\Behavior
Value: DoubleClickOnChange (DWORD)
0 == view as the primary command (default)
1 == compare as primary command
You can find more information here:
How to Double Click to Diff Pending Changes in TFS.
A comment on that post also shows the entry to set if you want to use a shortcut key to do the comparison instead.
You can add hotkey bindings for TFS context menu commands, which may be an approach that will work for what you need.
Go to Tools > Options > Keyboard. In the 'filter' field, type 'TFS' and it'll show a list of all TFS commands that you can bind hotkeys to. The Source Control comparison ones can be shortlisted with "CompareWith". I've bound hotkeys in this way to the pending changes window's context menu, which is a great timesaver versus working your way down that tortuous context menu, but there may be other options that suit your needs better.
Another alternative could be to set up an alias in Command Window and use it. To bring up the compare window:
Open Command Window (ctrl + alt + A)
Set alias for File.TfsCompare
alias diff File.TfsCompare
Next time you need to do the compare, type 'diff' and hit enter in the command window. 'diff' is an alias name, could be set to whatever of your choice. If you want to delete alias, use
alias aliasName /d

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