[TxMt] Re: Changing the modifier key for multiple caret selection by mouse

David Green david at tm.comme.ci-comme.ca
Thu Sep 29 18:43:35 UTC 2016


On Sep. 29, 2016, at 11:06 am, Erik Neumann <erikn at myphysicslab.com> wrote:
> I was able to download the <plist> file in the previous message, but double-clicking it opens in TextMate.  The name is "Disable Command Click.tmMacro.txt”. 

Try changing the extension to “.tmCommand” and then open it.


On Sep. 27, 2016, at 3:41 pm, Bert <zanglebert at gmail.com> wrote:
> Long story short: If somehow possible, I'd like to rebind the 'cmd' modifier to something like 'cmd+shift', making it less likely I enable multiple carets by accident.

You should be able to do this with Karabiner (https://pqrs.org/osx/karabiner/). It intercepts the keyboard and lets you reprogram it in all sorts of ways.  Here is a snippet that will turn ⌘+click into just a click; and it will turn option-click into command click. (I tried with command+shift, but that interfered with extending the selection. You might be able to get it work with a fancier config… or try something like only command-clicking when command is held down for a short time, or only with right- and left-command, etc.)


    <appdef> <appname>TEXTMATE</appname><equal>com.macromates.TextMate.preview</equal> </appdef>
	<item>
	    <only>TEXTMATE</only> <!-- so this applies only in TM -->
		<name>⌘⟷⌥</name>
        <appendix>Turn ⌘-click into ⌥-click for making multiple selections</appendix>
	<identifier>private.command-option-click</identifier>
        
        <autogen>__KeyToKey__ PointingButton::LEFT, ModifierFlag::COMMAND_L | ModifierFlag::NONE,  PointingButton::LEFT</autogen>
        <autogen>__KeyToKey__ PointingButton::LEFT, ModifierFlag::COMMAND_R | ModifierFlag::NONE,  PointingButton::LEFT</autogen>
        
	<autogen>__KeyToKey__ PointingButton::LEFT, ModifierFlag::OPTION_L | ModifierFlag::NONE,  PointingButton::LEFT, ModifierFlag::COMMAND_L</autogen>
        <autogen>__KeyToKey__ PointingButton::LEFT, ModifierFlag::OPTION_R | ModifierFlag::NONE,  PointingButton::LEFT, ModifierFlag::COMMAND_L</autogen>
    </item>


-David



More information about the textmate mailing list