Is there a way to turn off page-at-a-time scrolling animation in Textmate 2? - textmate2

Textmate 2 animates scrolling when using PageUp/PageDown keys. This against the Human Interface Guidelines, and it is sloooooooow.
Anyone know how to turn it off?

You can set the scrolling behavior via:
defaults write com.macromates.TextMate.preview NSScrollAnimationEnabled -bool NO
To turn it on again:
defaults write com.macromates.TextMate.preview NSScrollAnimationEnabled -bool YES
Make sure to restart Textmate after setting those values.

Related

How to disable mouse and tracpad in vim?

I want to disable mouse in my vim configuration.
I have tried these 3 settings in my vimrc file:
set mouse = ""
set mouse =
set mouse = a
but none of the solutions work.
I think it may be because of my terminal emulator, so tried some other terminals like terminator, guake, tilda but still the same behavior. Anyways, I use konsole.
Clear mouse settings:
set mouse=""
Please note: no space around =.
PS. Your console still can react to mouse dragging but configuring it is a different story and offtopic for StackOverflow.

Detecting touchpad movement vs regular mouse programmatically on Linux

I love the mod4 + mouse-drag combo for moving/resizing windows in Awesome WM, it's very intuitive with regular mouse. Now that I'm using Awesome WM on my laptop, however, I find this combo more annoying when using the touchpad vs regular mouse.
The problem stems from the fact that I now need 3 fingers to perform a gesture that I could do with 2 before (1 to move on the touchpad, 1 to keep on the left-click at all times, and one on mod4). Alternatively, I can apply more force to the touchpad and have it pressed as I drag my finger, which is not any better since it puts a lot of stress on the finger doing the dragging).
What I would like to do instead is have awesome treat left-mouse button as pressed if both of the following conditions are met:
mod4 is pressed
movement event is coming from touchpad and not regular mouse
To do so, however, I need to be able to detect that the movement is coming from the touchpad. Is there a way to do so in Awesome WM/Linux? I've looked through the keysyms (http://wiki.linuxquestions.org/wiki/List_of_keysyms) but don't see anything for the mouse. I've also looked at the mouse.lua file in Awesome WM but it doesn't seem to have anything to differentiate between the two either (https://github.com/awesomeWM/awesome/blob/master/lib/awful/mouse/init.lua). If there is a way to tell that the last coordinate change came from a touchpad on Linux that would resolve the issue as I could simply create a lua file to run such check whenever Mod4 is pressed.
To do so, however, I need to be able to detect that the movement is coming from the touchpad. Is there a way to do so in Awesome WM/Linux?
Nope, there is no such way in AwesomeWM. Sorry.
In X11, this is possible via the input extension. However, awesome does not use that extension.

Scroll in GVim using touch screen device

I'm using GVim on a Surface Pro 3 that has a touch screen. I've gotten so used to scrolling windows (like the browser) using the touch screen, so I thought it would be nice to be able to do the same in GVim. However, when I drag my finger it selects text rather than scrolling. Is there a way to change that?
Whohooo, my first tumbleweed badge. :-) Anyway, this actually works out of-the-box with the Vim build from https://bitbucket.org/Haroogan/vim-for-windows

Terminator Toggle Opacity Keyboard Shortcut

Do you know any keyboard shortcut to adjust or toggle the terminal's opacity without right clicking and going into preferences? That would be so sweet if that is possible.
Terminator does not support hotkeys to change background opacity or color:
To my mind, rewriting the config file on the fly is the wrong way to
achieve the things you want. A much better way would be the dbus
server that we've started to introduce. It is designed to allow things
running inside a terminal to communicate with Terminator and send
commands that will affect the terminal. For now it only exposes
commands for splitting, but over time I hope we will be able to extend
this to include things like colours and transparencies, etc.
https://answers.launchpad.net/terminator/+question/173257
CompizConfig allows you to change any window's opacity with a keyboard shortcut. The effect is different than Terminator background opacity, but it's good enough for me -- I want to glimpse the web page behind my terminal.
sudo apt-get install compizconfig-settings-manager
Related:
How do I change the transparency level of gnome-terminal?
Terminator does support other hotkeys and a configuration file:
http://manpages.ubuntu.com/manpages/intrepid/man5/terminator_config.5.html
One workaround is to create multiple profiles according to the transparency levels and then switch to the required profile using the keybindings in terminator.
For example, I need to toggle transparency in terminator. So I have 2 profiles.
default --> opaque
transparent --> with transparency set to 0.80 (all the other settings are the same)
And I have mapped the following in terminator keybindings:
next profile --> ctrl+0
previous profile --> ctrl+9
This allows me to toggle opacity in terminator.

VIM Colorschemes in Screen & PuTTy?

I've been trying to get colourschemes to work properly in VIM when using it over ssh with PuTTy as a client but unfortunately I haven't had much success. I can only get 8bit colours working with PuTTY even though I've enabled 256 colors in putty and set t_Co=256 in VIM. They don't turn out as they should. I've been trying to replicate this setup http://www.interworksinc.com/blogs/ckaukis/2009/06/03/vim-color-schemes-putty but as I say it's been in vain so far.
Has anyone here had success with colourschemes working with VIM in PuTTy? I'd appreciate any advice
Thanks,
Patrick
[EDIT] Turns out I've found the source of the problem. I was using vim in a screen which was breaking the colours. Updated question I guess is, is it possible to have working colors in a screen session? [/EDIT]
As well as compiled support, it may be necessary to add some config to screenrc (I needed to).
http://www.frexx.de/xterm-256-notes/ has a good guide. The relevant part to screen:
By default, screen is not aware that it is running in a 256 color capable xterm. To make programs in screen recognize this feature, you need to set three things in your ~/.screenrc:
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"
Yes, you can do 256 colours with screen, however, this option usually isn't compiled in. Simply compile screen yourself with:
--enable-colors256
Alternatively, you could get a tabbed PuTTy. It has the advantage of ctrl-a going to the beginning of the line, and saves you from many termcap headaches. However, if you like to reconnect to your screen sessions from multiple terminals, there really isn't anything better than screen for the job.
NB. This question probably belongs on Superuser.
I had same problem on Mac Os, tried some solutions but all tests show that 256 colors not displayed. After that I'm installed screen from brew and all works great. Maybe it's because Mac Os default screen from /usr/bin/ compiled without --enable-colors256 flag.
Solution for mac os: brew install screen
I had trouble with black background in Putty: blue characters on a black background with default colours are hard to read:
My solution for a better contrast was to enable "system colors" checkbox unter
"Settings / Window / Colours / Use system colors"
This displays the Putty screen with black characters on a white background. Not hip but readable :-)

Resources